-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Toolbar.PopoverItem #635
Conversation
Deploying with
|
Latest commit: |
57bb079
|
Status: | ✅ Deploy successful! |
Preview URL: | https://6b9f3f8a.react-science.pages.dev |
Branch Preview URL: | https://612-add-toolbarmenuitem-or-s.react-science.pages.dev |
Can you make a dedicated story with toolbar popover items? The feature is hard to discover in the stories. Also if you have ideas on how we can make a popover item distinguishable from a regular item, that would be welcome. For example in photoshop there is this little triangular shape in the corner of the button: |
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #635 +/- ##
==========================================
- Coverage 24.26% 23.39% -0.87%
==========================================
Files 223 221 -2
Lines 12903 12778 -125
Branches 234 234
==========================================
- Hits 3131 2990 -141
- Misses 9684 9700 +16
Partials 88 88 ☔ View full report in Codecov by Sentry. |
@stropitek I added a right icon to the popover items like in the dropdown component. The icon has different directions when the toolbar is vertical or horizontal |
@stropitek There is a bug with the By default vertical has the value 'false' and the toolbar is horizontal, when we toggle the button the toolbar becomes vertical, but when we click on it again it doesn't go back to horizontal |
Can you also make a separate story where we mix dropdown items and non-dropdown items? Try to put them at the beginning, at the end and in between. There are alignment issues as well in the vertical version of the toolbar with dropdown items.
Do you need help with debugging this? |
It is due to this code in the toolbar width recomputing :
Removing it fixes the problem |
…rom vertical to non-vertical
007554a
to
fb67551
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed to approach to fixing the issue with changing the vertical
prop to be more conservative in the behaviour. The effect is not supposed to be executed in horizontal mode since the layout bug we are working around is only for the vertical layout.
I also fixed the issue with the icon alignment issue.
LGTM after you resolve the conversations.
@hamed-musallam can you have a look at the stories? What do you think of the toolbar item popover? Is it a good match for NMRium?
I'm merging this, but I think there is too much layout difference between the dropdown and the non-dropdown item. The addition of the icon on the right doubles the size of the component. I'm creating a new issue for that. |
I believe it's essential to maintain consistent layout, width, and height for both dropdown and non-dropdown menus. Additionally, I suggest that toolbar items should not be highlighted upon clicking, as I only intend to open the dropdown menu. |
On the other hand, I believe the popup animation is slow, can you increase the speed of the animation to have smooth animation? |
it is just a suggestion, can we specify the trigger action as a long click, hover, or click on the dropdown toolbar. |
Those are in the CSS of blueprint and so are not editable. But we can use the
I'd be against "long click" since this is difficult to discover and non-standard. What are you using in NMRium? All of those? |
It's just a suggestion, but currently in NMRIUM, we only have a dropdown menu triggered by a click. What I propose is similar to Photoshop's functionality, where tools can be grouped and it is activated by long press |
I don't have a photoshop license but AFAIK it's because clicking selects the default tool in the category, thus the long click to select other related tools. Is that what you'd like for NMRIum. I'm still skeptical about the long-press. Haven't seen this anywhere in the web I think. |
The web version of Photoshop doesn't have this behavior. They open the submenus on hover. |
@hamed-musallam actually I was wrong the Popover component has a property |
thank you @stropitek , i will try it once I update to the latest version of react-science |
closes #612