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

Snippet dropdowns cut off behind the divider bar #3840

Open
calculuschild opened this issue Oct 20, 2024 · 8 comments
Open

Snippet dropdowns cut off behind the divider bar #3840

calculuschild opened this issue Oct 20, 2024 · 8 comments
Labels
bug We say this works but it doesn't P2 - minor feature or not urgent Minor bugs or less-popular features UI/UX User Interface, user experience

Comments

@calculuschild
Copy link
Member

calculuschild commented Oct 20, 2024

Description

This is not a new issue, but testing #3635 made it more obvious since it uses a very narrow editor panel.

Snippet dropdowns are being cut off behind the divider bar. Note how the dropdown appears over the "jump" buttons, so I think the z-index is high enough, but instead some kind of overflow/clipping behavior.

image

@5e-Cleric
Copy link
Member

What is the desired result here, snippet over buttons or buttons over snippet?

@calculuschild
Copy link
Member Author

calculuschild commented Oct 20, 2024

The problem is snippets on the right edge are not visible because they are hidden behind the brewRenderer. So the desired outcome is they are rendered over the brewRenderer:

image

@5e-Cleric
Copy link
Member

5e-Cleric commented Oct 20, 2024

that can be achieve, but will cause issues with the bar wrapped

image

@calculuschild
Copy link
Member Author

that can be achieve, but will cause issues with the bar wrapped

Not the snippet bar. The dropdowns.

@5e-Cleric
Copy link
Member

I know, but the overflow hidden is set in the pane element, it needs to be overriden, which makes that overflow happen.

@Gazook89
Copy link
Collaborator

Let’s leave this alone for a few months and see if FF finishes implementing the CSS Anchor Positioning API. That will be the easiest, most comprehensive, and most accessible solution. Chrome already has it. My view modes PR uses it and it’s really really simple.

@Gazook89
Copy link
Collaborator

taking my message from gitter and putting it here:


<div class="snippetGroup snippetBarButton">
  <div class="text">
    <i class="fas fa-book"></i><span class="groupName">PHB</span>
  </div>
  <div class="dropdown">
    ...
  </div>
</div>

.snippetGroup would get position: relative, .dropdown would get left: 0, and .dropdown:last-child would get left: unset; right: 0.

Possibly do the same with the second to last menu as well.

@5e-Cleric
Copy link
Member

My view modes PR uses it and it’s really really simple.

I would not call that simple. Absolute positioning is simple, it needs a maximum of 3 lines of code.

@5e-Cleric 5e-Cleric added bug We say this works but it doesn't UI/UX User Interface, user experience P2 - minor feature or not urgent Minor bugs or less-popular features labels Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug We say this works but it doesn't P2 - minor feature or not urgent Minor bugs or less-popular features UI/UX User Interface, user experience
Projects
None yet
Development

No branches or pull requests

3 participants