Skip to content
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

fix(MenuItem): split menu items does not open sub-menu when navigating directly between two split menus #1904

Merged

Conversation

YuliaGold
Copy link
Contributor

https://monday.monday.com/boards/2520706822/pulses/5699284655

split menu item doesn't open consistently when hovering between menu items.
isActive is not turning to true even though the mouse is over the correct menu item.
isActive ---> index === activeIndex ---> true
looks like there is missing a render cycle for the menu item in order to update the isActive value so that hover on the split menu item will result in opening the sub menu.

before:
ScreenRecording2024-01-21at11 59 48-ezgif com-video-to-gif-converter

after:
ScreenRecording2024-01-21at11 56 15-ezgif com-video-to-gif-converter

@YuliaGold YuliaGold requested a review from a team as a code owner January 21, 2024 10:09
Comment on lines -43 to -52
splitMenuItemIconButtonRef,
index,
hasChildren,
splitMenuItem,
isMouseEnterOnIconButton,
prevIsMouseEnterOnIconButton,
isActive,
resetOpenSubMenuIndex,
setActiveItemIndex,
isMouseEnter
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed unused dependencies

@YossiSaadi YossiSaadi changed the title yulia/bug-movement_between_split_menu_items_wont_open_sub_menu fix(MenuItem): split menu items does not open sub-menu when navigating directly between two split menus Jan 21, 2024
@YossiSaadi
Copy link
Contributor

YossiSaadi commented Jan 21, 2024

@YuliaGold I think you are experiencing a different issue.
The behavior in the app does not reproduce on storybook:
Jan-21-2024 12-26-18

Jan-21-2024 12-28-41

@YuliaGold
Copy link
Contributor Author

@YossiSaadi yeah i know that it doesn't reproduce in storybook
when i debug it in monday i can see that even though i'm on the correct menu item, the index doesn't equal to activeIndex

@YossiSaadi
Copy link
Contributor

@YossiSaadi yeah i know that it doesn't reproduce in storybook when i debug it in monday i can see that even though i'm on the correct menu item, the index doesn't equal to activeIndex

@YuliaGold if it works on an isolated environment, it probably means the bug is not with the component
can you share a reproduce?

@YuliaGold
Copy link
Contributor Author

@YossiSaadi
you can see it in the pr description

@YossiSaadi
Copy link
Contributor

@YossiSaadi you can see it in the pr description

@YuliaGold I mean something I can play with and investigate
It sounds like it's not a Vibe issue, I want to make sure

@YuliaGold
Copy link
Contributor Author

@YossiSaadi ohhh,
i checked it in my local env, and created a link to monday-ui-react-core.
do you want me to show you or just tell you which feature flags to open?

@YossiSaadi
Copy link
Contributor

@YossiSaadi ohhh, i checked it in my local env, and created a link to monday-ui-react-core. do you want me to show you or just tell you which feature flags to open?

if it's already on staging/prod with FF then even better if I don't need the MF.
Slack me with the details.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@YuliaGold I think that just removing line 59 will result in the same effect

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@talkor hey, i tried but it didn't make any affect

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@talkor @YossiSaadi hey do you have any updates?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@YuliaGold the issue doesn't reproduce for me

Screen.Recording.2024-01-28.at.10.46.14.mp4

@talkor
Copy link
Member

talkor commented Jan 28, 2024

Verified in React 18.2, @YuliaGold please try this prerelease, should resolve this issue anyway

@talkor talkor merged commit eab3a8b into master Jan 29, 2024
11 of 13 checks passed
@talkor talkor deleted the yulia/bug-movement_between_split_menu_items_wont_open_sub_menu branch January 29, 2024 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants