Repository navigation
Conversation
The chip changes its background and border at once, but the nested Checkbox and Radio fade their indicator over 200ms. The indicator lags behind the chip, and in iOS Safari the fade makes icons next to it, such as an Avatar, jump when it ends. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
joakbjerk
approved these changes
Nov 24, 2026
joakbjerk
left a comment
Contributor
There was a problem hiding this comment.
Looks good. The rule sits inside .dnb-chip, next to the existing chip overrides for the checkmark and radio dot, so standalone Checkbox and Radio keep their fade.
Non-blocking: the latest commit removes the e2e test, and Chip has no CSS snapshot test, so no test would fail if this rule were dropped later. Was that on purpose?
langz
commented
Nov 24, 2026
langz
left a comment
Member
Author
There was a problem hiding this comment.
Final review of ab5fceb: no critical findings.
- Adjusted in this round: removed the e2e test. The PR now only changes
dnb-chip.scss. - Verified with the published package instead of the Portal. A standalone Vite + React app installed the npm release (11.18.1), the
mainbuild (9365a68) and this PR's build from pkg.pr.new (1a4e53a, same CSS as this commit). It clicked 15 scenarios in Chromium, Firefox and WebKit, with four ways of loading the styles: all-in-one, isolated style scope, per-component imports with Checkbox and Radio last, and the Sbanken theme.- In the release and on
main, the checkmark and radio dot fade in every chip with an indicator, and in thecheckbox-buttonandradio-buttonvariants of Field.Toggle, Field.Boolean, Field.Selection and Field.ArraySelection. - With this PR, none of them fade, in every engine and style setup. Standalone Checkbox and Radio still fade, and ToggleButton still fades until #11051.
- Once the selection has settled, every page is pixel-identical to
main.
- In the release and on
- The rule ships in
dnb-chip.css, the components bundle and every theme bundle, in both the plain and the isolated variant, and outranks the Checkbox and Radio transitions in all of them. - The Avatar jump doesn't happen in desktop WebKit, even at 3x, so it is still only confirmed by the iPhone recording.
- CI for this commit was still running when this review was posted.
Member
Author
|
@joakbjerk Thanks! Yes, that was on purpose. The fix was verified against the published package in Chromium, Firefox and WebKit instead (see the review above), and we prefer not to add tests that assert declarations in compiled CSS. |
This branch was successfully deployed
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.
When a chip is selected or cleared, its background and border change at once, but the checkmark or radio dot inside it fades in or out over 200ms. The indicator visibly lags behind the chip and leaves a faint "ghost" checkmark while unselecting.
On iPhone, the fade also makes icons next to the indicator jump. In the Flags and logos demo, the DNB Avatar is drawn half a pixel lower while the radio dot fades, then snaps back when the fade ends.
The chip now switches its indicator together with the rest of its look. This also applies to the
checkbox-buttonandradio-buttonvariants of Field.Toggle, Field.Boolean, Field.ArraySelection and Field.Selection, which render chips. Standalone Checkbox and Radio keep their animation.Recordings on iPhone
Screen recordings from Safari on an iPhone, on eufemia.dnb.no before this change. The previews are cropped to the chips, and each one links to the full recording (MP4 download). The thick border that stays after a tap is the sticky hover, which #11010 fixes.
Before / after
Each row shows the chips the given time after they were selected.
ToggleButton had the same issue and is fixed in #11051. The sticky hover after a tap is fixed separately in #11010.