JetBrains / jewel

An implementation of the IntelliJ look and feels in Compose for Desktop
Apache License 2.0
676 stars 35 forks source link

Create Toolbar components #538

Open francisconoriega opened 1 month ago

francisconoriega commented 1 month ago

In the Figma IntUI Kit, and on the UI SDK documentation, there is a Toolbar component, which is basically a row that provides its own set of subcomponents (or at least provides those components with specific styling).

Those subcomponents include (but not limited to) Toolbar/Icon, toolbar/separator, toolbar/dropdown, toolbar button, toolbar search. In Jewel's implementation, I believe that rather than having to be new components, the toolbar can set LocalCompositionStyles for all of those + set the adequate spacing between items of its row.

Additionally, there seems to also be support for floating toolbars, which have a background and cast a shadow.

image
rock3r commented 1 month ago

Contributions on this are welcome — it's low priority for us. To note, we already do have icon buttons that look like ones you'd find in a toolbar, so that part is easy. Also, despite what the specs say, IIRC in swing the implementation doesn't provide much at all in terms of spacing and padding. The only feature it does actually have that we care about in compose is handling overflows.

As for floating ones, as far as I know they're just regular toolbars in a persistent popup

rock3r commented 1 month ago

(in general, don't trust specs too much, always check the Swing implementations because they diverge often and in many ways)