-
Notifications
You must be signed in to change notification settings - Fork 14
fix: placeholder for DBSelect with variant floating is moved down #5616
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
base: main
Are you sure you want to change the base?
fix: placeholder for DBSelect with variant floating is moved down #5616
Conversation
🦋 Changeset detectedLatest commit: 7ac068f The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
we cannot rely on a 50% positioning, as the height might change e.g. due to an error message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes a bug where the placeholder text in DBSelect components with the floating label variant was positioned incorrectly. The fix addresses vertical alignment by using a more precise calculation based on the actual sizing variable instead of a percentage.
Key Changes:
- Updated placeholder positioning calculation in SCSS from percentage-based to variable-based
- Added test examples for floating label variant with invalid validation state
- Updated visual regression test snapshots to reflect the new test cases
Reviewed changes
Copilot reviewed 16 out of 26 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
packages/components/src/styles/internal/_form-components.scss |
Fixed placeholder vertical positioning calculation for floating label variant |
showcases/shared/select.json |
Added test case for floating label select with invalid validation |
showcases/shared/input.json |
Added test case for floating label input with invalid validation |
showcases/shared/custom-select.json |
Added test cases for floating label custom select with and without validation |
| Multiple snapshot files | Updated aria snapshots and visual regression screenshots to include new test cases |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…loating-is-moved-down-focus-within
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 23 out of 41 changed files in this pull request and generated no new comments.
Proposed changes
we cannot rely on a 50% vertical positioning, as the height might change e.g. due to an error message. Adapting another variable by the following code:
https://github.com/db-ux-design-system/core-web/blob/5377-placeholder-for-dbselect-with-variant-floating-is-moved-down-focus-within/packages/components/src/styles/internal/_form-components.scss#L496-L498
This is mainly related to these three patterns, that could be checked on a QS of this ticket:
:focus-within) #5377)resolves #5377
Types of changes
Further comments
🔭🐙🐈 Test this branch here: https://design-system.deutschebahn.com/core-web/review/5377-placeholder-for-dbselect-with-variant-floating-is-moved-down-focus-within