studio icon indicating copy to clipboard operation
studio copied to clipboard

[New Rich Text Editor]: Dynamically calculate desktop's toolbar width breakpoints

Open habibayman opened this issue 4 months ago • 1 comments

This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Desired behavior

A follow up issue opened after the discussion in this comment in PR #5220

To instead of having the breakpoints to folding the toolbar menu items hard coded based on calculations and trial & errors, have them dynamically calculated .

Current behavior

The breakpoints currently exist as a hard coded array. Working Just fine 👍🏻 but the code can use an enhancement.

https://github.com/user-attachments/assets/5179d222-5b0c-47c3-be6d-b400abd777cd

Value add

Will make it easier if we decided to add/remove any buttons.

habibayman avatar Aug 06 '25 12:08 habibayman

For use-cases like this, breakpoint based approaches, whether hardcoded or dynamic, will always be a bit cumbersome. It may be best to just detect space available in the toolbar. KListWithOverflow may be handy here.

MisRob avatar Aug 11 '25 10:08 MisRob