DoubleBadge: draw its own divider instead of relying on the badges' borders

Open Beginner friendly
#117 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
66/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
css, typescript
Domain
design, frontend

Research direction

Find the DoubleBadge styles and compare them with DoubleToken, focusing on the overlap and inner-corner rules described in the issue. Check the badge and divider tokens in both color schemes, then verify that same-variant badges show a divider and outlined badge themes do not produce a doubled line.

Written by the indexing model from the issue text.

Description

Problem

DoubleBadge joins its badges by overlapping them by --border-width and squaring the inner corners, the same CSS as DoubleToken. That only draws a seam when each item has a visible edge of its own. Astryx Token has an outline, so DoubleToken always shows a divider. Astryx Badge has a fill and no border, so DoubleBadge has no divider of its own:

  • with the default Astryx theme, two badges of the same variant render as one pill ([Paused][Paused] reads as one label);
  • with a theme that outlines badges, the seam is whatever the later item's outline happens to be, and it disappears when that outline is close to the fill. Backend.AI WebUI hit this in dark mode with a neutral badge after a warning badge (Paused | Set by user), and worked around it in its theme (lablup/backend.ai-webui#10662).

Proposal

Let DoubleBadge draw the divider itself instead of relying on the items' borders, e.g. a border-inline-start: var(--border-width) solid <divider token> (or an equivalent inset shadow) on every item but the first, using a token that contrasts with badge fills in both color schemes. The overlap rule can then go.

Acceptance

  • Two adjacent badges of the same variant show a visible divider under the default Astryx theme, light and dark.
  • A theme that outlines badges does not get a doubled line.
Dominant language
TypeScript
Stars
2
Forks
0
Avg merge
17h 58m
Merged PRs (30d)
25

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lablup/ui-common

All issues in lablup/ui-common

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.