-
Notifications
You must be signed in to change notification settings - Fork 13
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
feat(documentation): Add placeholder feature for floating-label select #2200
Conversation
🦋 Changeset detectedLatest commit: a65e8d3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 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 |
Preview environment ready: https://preview-2200--swisspost-web-frontend.netlify.app |
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.
packages/documentation/src/stories/components/select/select.docs.mdx
Outdated
Show resolved
Hide resolved
…cs.mdx Co-authored-by: Alizé Debray <33580481+alizedebray@users.noreply.github.com>
…-first-option' into feat/select-floating-label-empty-first-option
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
The snapshots look rather good, but it's quite hard to see as they encompass a lot of changes from other PRs. |
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @swisspost/internet-header@1.13.0 ### Minor Changes - Added a link to settings in the user drop-down menu for business users. (by [@alizedebray](https://github.com/alizedebray) with [#2234](#2234)) ### Patch Changes - Replaced the old twitter logo with the new X logo. (by [@b1aserlu](https://github.com/b1aserlu) with [#2176](#2176)) - Updated dependencies: - @swisspost/design-system-styles@6.4.4 ## @swisspost/design-system-components@1.6.2 ### Patch Changes - Updated dependencies: - @swisspost/design-system-styles@6.4.4 ## @swisspost/design-system-intranet-header@5.0.4 ### Patch Changes - Added a descriptive text to the Post logo home link. (by [@b1aserlu](https://github.com/b1aserlu) with [#2101](#2101)) - Updated dependencies: - @swisspost/design-system-styles@6.4.4 ## @swisspost/design-system-styles@6.4.4 ### Patch Changes - Added official way to use label in a floating-label select as a placeholder. (by [@imagoiq](https://github.com/imagoiq) with [#2200](#2200)) - Fixed display of button-group input when using checkbox or radio variant. (by [@imagoiq](https://github.com/imagoiq) with [#2133](#2133)) - Fixed offset of radio button when checked and in inline layout. (by [@imagoiq](https://github.com/imagoiq) with [#2065](#2065)) - The following placeholders from the `\_text.scss` file are depreacted an will be removed in a future version: `%list-adjustment`, `%module-container`, `%default-module-spacer`, `%text-container`. (by [@b1aserlu](https://github.com/b1aserlu) with [#2171](#2171)) - Fixed default icon flashing when using a `post-icon` on alerts. (by [@imagoiq](https://github.com/imagoiq) with [#2244](#2244)) ## @swisspost/design-system-documentation@2.4.0 ### Minor Changes - Added docs page on how to use columns. (by [@davidritter-dotcom](https://github.com/davidritter-dotcom) with [#2062](#2062)) ### Patch Changes - Added official way to use label in a floating-label select as a placeholder. (by [@imagoiq](https://github.com/imagoiq) with [#2200](#2200)) - Extended the `@swisspost/design-system-components` package getting-started docs page to show multiple ways how it can be used/imported in different project setups. (by [@oliverschuerch](https://github.com/oliverschuerch) with [#2214](#2214)) - Updated dependencies: - @swisspost/internet-header@1.13.0 - @swisspost/design-system-styles@6.4.4 - @swisspost/design-system-components@1.6.2 - @swisspost/design-system-components-react@1.0.22 ## @swisspost/design-system-components-react@1.0.22 ### Patch Changes - Updated dependencies: - @swisspost/design-system-components@1.6.2 ## @swisspost/design-system-demo@7.0.4 ### Patch Changes - Updated dependencies: - @swisspost/design-system-styles@6.4.4 - @swisspost/design-system-intranet-header@5.0.4 ## @swisspost/design-system-intranet-header-workspace@3.0.4 ### Patch Changes - Updated dependencies: - @swisspost/design-system-styles@6.4.4 Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Add a way to see label as a placeholder for select element when
floating-label
is enabled.Currently, we can use the
select:empty
selector, remove all options (so all the children of the select element) and repopulate them when the user click on the select. But it's quite cumbersome for the end developer. It's much easier to add a class. In the future, we'll be able to do that using:has
instead of class.Linked to this old issue: #86
This issue fixes as well the color to match the input one.