Refactor select overlay positioning with CDK ConnectedPosition#1389
Open
Refactor select overlay positioning with CDK ConnectedPosition#1389
Conversation
Replace inline popover overlay with traditional cdkConnectedOverlay using ConnectedPosition array so the dropdown automatically flips above the trigger when there is not enough space below. https://claude.ai/code/session_01MEbQJiNKarA74je1KFZUQF
3ccbff6 to
3e31737
Compare
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.
Summary
Refactored the select component's overlay positioning to use explicit
ConnectedPositionconfigurations instead of the inline overlay configuration object. This provides better control over positioning behavior and fallback strategies.Key Changes
ConnectedPosition[]array with two positioning strategies:cdkConnectedOverlaybinding to use individual property bindings:[cdkConnectedOverlayOrigin]for the origin element[cdkConnectedOverlayPositions]for the position strategies[cdkConnectedOverlayMinWidth]for width matchingusePopover: 'inline'andmatchWidth: truefrom inline configurationtriggerWidth()computed signal to dynamically provide the trigger element's widthmt-1(margin-top) from select-popup styling since spacing is now handled by theoffsetYpositioning configurationImplementation Details
The new approach separates concerns by:
https://claude.ai/code/session_01MEbQJiNKarA74je1KFZUQF