Recalculate popover position on menu toggle.

Created on 17 November 2023, about 1 year ago
Updated 4 April 2024, 8 months ago

Problem/Motivation

When child menu expanded we need to run update position of popover probably? Toolbar content goes out of screen.

🐛 Bug report
Status

Closed: outdated

Version

1.0

Component

Code

Created by

🇷🇸Serbia finnsky

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @finnsky
  • Pipeline finished with Skipped
    about 1 year ago
    #52036
  • Pipeline finished with Failed
    about 1 year ago
    Total: 1242s
    #52034
  • First commit to issue fork.
  • Status changed to Needs review about 1 year ago
  • 🇷🇺Russia kostyashupenko Omsk

    Well, what i'm thinking is that:
    1. We should not move popover wrapper when inner menus are collapsing/expanding.
    2. We should have scrollbar if content of popover is too high

    Knowing that say that i provided only patch with minimum efforts. I moved arrow chevron into the control button itself (and removed all JS related to arrow). Because arrow should be anyway always placed centered with control button. ANother reason is that for popover wrapper we need vertical scrollbar. And arrow is placed out of visible area of wrapper (which means by adding overflow: auto arrows becomes hidden).

    Please test it / share your thoughts. We can try to solve this issue other way

  • 🇷🇸Serbia finnsky

    Catched this arrow in expanded state

  • 🇷🇺Russia kostyashupenko Omsk

    Fixed feedback above (needs review)

  • Status changed to Needs work about 1 year ago
  • 🇪🇸Spain ckrina Barcelona

    The initial 3 assumptions are OK on a UX perspective:

    • Rearrange the flyout if it ends up having any part outside of the screen.
    • We should not move popover wrapper when inner menus are collapsing/expanding.
    • Have scrollbar if content of popover is too high.

    But the the resulting interaction could still be improved because it feels really weird to scroll within a flyout when there is enough vertical space. Your instincts are right though: not moving the thing you're clicking after an interaction. So I think we could do something similar to the bottom user menu and scroll to the bottom side of that submenu? It's a bit of an extreme case but punishing all submenu flyout interactions with a flyout seems a bit extreme. Let's build that and we'll add this into the next round of tests to verify if it's annoying.

  • 🇷🇺Russia kostyashupenko Omsk

    @ckrina not really clear what you meant, can you rephrase maybe or provide some better explanation / examples?

    I'm uploading video where i'm interacting with flyout menu. Feels pretty intuitive to me

  • 🇷🇸Serbia finnsky

    We may optionally use Autoupdate feature of floating UI.
    https://floating-ui.com/docs/autoUpdate

  • Status changed to Needs review 12 months ago
  • 🇷🇸Serbia finnsky

    Seems autoupdate it is not exactly what we need here. I added more simple solution with CustomEvents.
    We recalculate position if in result of submenu trigger popover goes out of screen.

  • Status changed to Needs work 12 months ago
  • 🇷🇺Russia kostyashupenko Omsk

    I see two problems. One of these problems i already raised above:

    1. When there is not enough space to display a whole menu with sub-menus expanded - my personal feeling is that my cursor should be positioned on the button i just clicked. But with the last patch content is moving when opened so it's pretty uncomfortable when the element you just clicked becomes out of cursor.

    2. If there is not enough space to display popover fully - nothing happening, a part of content becomes just out of viewport. Intuitively i'm expecting to have scrollbar.

    Merge requests 131 resolves these problems and it is still up-to-date (i just rebased it just in case you want to have a look once again how it's working).

  • Pipeline finished with Failed
    11 months ago
    Total: 1115s
    #64720
  • Pipeline finished with Success
    9 months ago
    Total: 33s
    #101305
  • Pipeline finished with Success
    9 months ago
    Total: 2173s
    #101348
  • Pipeline finished with Success
    9 months ago
    #101383
  • Pipeline finished with Success
    9 months ago
    Total: 199s
    #101387
  • Pipeline finished with Success
    9 months ago
    Total: 94s
    #101399
  • Pipeline finished with Success
    9 months ago
    Total: 176s
    #101404
  • Pipeline finished with Success
    9 months ago
    Total: 215s
    #101415
  • Pipeline finished with Success
    9 months ago
    Total: 161s
    #101424
  • Pipeline finished with Success
    9 months ago
    #101441
  • Pipeline finished with Success
    9 months ago
    Total: 160s
    #101468
  • Pipeline finished with Success
    9 months ago
    Total: 362s
    #101644
  • Pipeline finished with Success
    9 months ago
    Total: 33s
    #101659
  • Pipeline finished with Success
    9 months ago
    #101661
  • Pipeline finished with Success
    9 months ago
    Total: 33s
    #101674
  • Pipeline finished with Success
    9 months ago
    Total: 32s
    #101684
  • Pipeline finished with Success
    9 months ago
    Total: 34s
    #101690
  • Pipeline finished with Success
    9 months ago
    Total: 33s
    #101759
  • Pipeline finished with Success
    9 months ago
    #101782
  • Pipeline finished with Success
    9 months ago
    Total: 33s
    #102160
  • Pipeline finished with Success
    9 months ago
    #102162
  • Pipeline finished with Success
    9 months ago
    Total: 168s
    #103789
  • Pipeline finished with Success
    9 months ago
    Total: 33s
    #110455
  • Pipeline finished with Success
    9 months ago
    Total: 172s
    #113280
  • Pipeline finished with Success
    9 months ago
    Total: 231s
    #113284
  • Pipeline finished with Success
    8 months ago
    Total: 197s
    #119212
  • Pipeline finished with Success
    8 months ago
    Total: 221s
    #119219
  • Pipeline finished with Success
    8 months ago
    Total: 167s
    #122960
  • Pipeline finished with Success
    8 months ago
    Total: 170s
    #131072
  • Pipeline finished with Success
    8 months ago
    Total: 168s
    #131073
  • Status changed to Closed: outdated 8 months ago
  • 🇪🇸Spain ckrina Barcelona

    Closing since we've switched to use the drawer.

  • Pipeline finished with Failed
    8 months ago
    #144094
  • Pipeline finished with Manual
    8 months ago
    #144099
  • Pipeline finished with Manual
    8 months ago
    #144106
  • Pipeline finished with Failed
    8 months ago
    Total: 589s
    #144138
  • Pipeline finished with Failed
    8 months ago
    Total: 532s
    #144158
  • Pipeline finished with Failed
    7 months ago
    Total: 1447s
    #144739
  • Pipeline finished with Failed
    7 months ago
    Total: 763s
    #144784
  • Pipeline finished with Success
    7 months ago
    Total: 1059s
    #146175
  • Pipeline finished with Success
    7 months ago
    Total: 995s
    #146246
  • Pipeline finished with Success
    7 months ago
    Total: 1177s
    #146918
  • Pipeline finished with Failed
    7 months ago
    Total: 1027s
    #147440
  • Pipeline finished with Success
    7 months ago
    Total: 1136s
    #148133
  • Pipeline finished with Success
    7 months ago
    Total: 1045s
    #148210
  • Pipeline finished with Success
    7 months ago
    Total: 1193s
    #148583
  • Pipeline finished with Success
    7 months ago
    #152348
  • Pipeline finished with Success
    7 months ago
    #152366
  • Pipeline finished with Success
    7 months ago
    Total: 411s
    #152385
  • Pipeline finished with Success
    6 months ago
    Total: 1200s
    #178624
  • Pipeline finished with Success
    6 months ago
    #178666
  • Pipeline finished with Success
    6 months ago
    Total: 1252s
    #178671
  • Pipeline finished with Success
    6 months ago
    Total: 1157s
    #178686
Production build 0.71.5 2024