fix(registry): add pointer-events-none to collapsed sidebar-group-label & reduce transition duration to 100 - #11312
Open
hardik88t wants to merge 1 commit into
Conversation
…el & reduce transition duration to 100
Contributor
|
@hardik88t is attempting to deploy a commit to the shadcn-pro Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes hit-testing overlap bug where the hidden
SidebarGroupLabelblocks hover and click interactions on the bottom half of the last menu item in the preceding group when the sidebar is collapsed toiconmode.Also reduces transition duration of
SidebarGroupLabelto100msto sync better with the sidebar collapse animation.Nuance (Why I think only some items are blocked)
In CSS stacking context, elements appearing later in the DOM tree render on top of earlier elements by default. Thus, the
SidebarGroupLabelat the start of a group overlaps the last item of the group above it. The switcher at the top is not blocked because of DOM order and spacing.Changes
group-data-[collapsible=icon]:pointer-events-nonetoSidebarGroupLabelto pass pointer events through when hidden.duration-100to prevent delayed floating visual artifacts during collapse.Attachment & Example
Nuance: This Issue was not happening at the Official Example Sidebar Team switcher (Or The org switcher in my project) example even when I can see with select element browser-dev-tool that SidebarGroupLabel was covering half of space. But it was not half disabled. i dont know the reason.
SS from https://ui.shadcn.com/docs/components/base/sidebar:

SS Example from my Project: (Nuance, working properly but i can see SidebarGroupLabel was covering bottom half of it)

Issue Example from my Project: (The Half covered by the hidden SidebarGroupLabel is unresponsive to cllick or hover)

Same issue here as well:

For ref my app sidebar un-collapsed:

My first PR to this repo. tried best to follow contribution guidline. tell me if there is some changes needed in this.