Skip to content

[Bug]: Font colour toolbar component has fragile dropdown sizing #5052

Description

@fonty422

Bug type

Behavior bug (incorrect output/state without crash)

Browser surface

No

Summary

Downloaded PlateJS font colour toolbar dropdown renders clipped/narrow in a standard toolbar. The colour picker uses grid-cols-[repeat(10,1fr)] without an explicit dropdown/grid width, so the palette can be horizontally clipped. Adding a fixed grid width or fixed gridTemplateColumns resolves it.

Public reproduction URL

No response

Steps to reproduce

Not sure how to replicate this as your examples don't show what I see.
I've installed the default plate editor and the fixed-toolbar-kit and the colour toolbar for font colour and background colour is narrower.
It might be linked to the use of variant="fullWidth" on the Editor component, but I'm not sure.

Image

Expected behavior

_Expect the width and height to fit the content

Actual behavior

Width appears to clip and half the options aren't visible

Acceptance criteria

Expect the width and height to fit the content out-of-the-box with no overflow or hidden options.

Plate / Slate / React versions

plate: 53.0.0
All plate related plugins are also 53.0.0

Operating system

alpine-20 docker container

Install method

npx shadcn@latest add @plate/editor

Framework / app setup

Vite

Affected packages or entry points

@platejs/font-colour-toolbar-button

Minimal code or config excerpt

I haven't edited the default plate code - plate editor with fixed toolbar kit.

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions