Skip to content

Controls: Share the counter, switch, empty state and label - #67

Merged
whereareiam merged 1 commit into
devfrom
refactor/shared-display-controls
Oct 3, 2026
Merged

whereareiam merged 1 commit into
devfrom
refactor/shared-display-controls

Conversation

@whereareiam

Copy link
Copy Markdown
Owner

Stacked on #66, which is stacked on #65. Review the last commit only.

Four small display pieces were written once per page and had drifted apart. They move to components/common, and where the copies disagreed the shared version takes the value measured on github.com.

Changes

  • Counter (theme-counter): the count pills on profile and organization tabs, release assets, the diff file filter and the issue state tabs. Page classes keep only layout.
  • Segmented switch (theme-switch): the Releases/Tags switch, previously declared twice in the release stylesheet.
  • Empty state (theme-empty): the bordered box on profile, organization and release pages. Short inline messages inside lists and menus stay as they are.
  • Label: the package type pill now uses Forgejo's native ui basic label, like the repository visibility label, instead of a hand-built profile-type-label.
  • Dead CSS removed: .org-empty rules that no template uses, and organization empty-state overrides (240px, no border) that a later profile rule always overrode.
  • CONTRIBUTING.md documents each piece, and tests keep count pills, the switch and boxed empty states on the shared classes.

Visual changes

Measured before and after in the dev preview at 1440px and 390px across 14 pages; everything not listed is unchanged.

Piece Before After GitHub
Counter height 18px (tabs, issues), 20px (assets), 21px (diff) 20px 20px
Counter weight 400 to 600 depending on page 500 500
Counter background label background on tabs, hover colour elsewhere label background label background
Tags-page switch weight 400 500 500
Package type label weight 400 500 500
Release empty state height 252px 235px not measured

The counter on an inactive issue tab now uses the default text colour instead of inheriting the tab's muted colour. The release empty state is shorter because its icon, heading and text now use the shared 12px gap; its 64px padding is kept.

Checks

  • bun commit passes (388 tests on top of Controls: Share button sizing and the select across pages #66).
  • Dev preview (http://localhost:3000, Forgejo 16.0.3): profile, stars, projects, packages, organization overview, repositories, packages and projects, releases (populated and empty), tags, issues, repository home and a commit diff with the file filter active.

🤖 Generated with Claude Code

Four small display pieces were written once per page: count pills on
profile tabs, release assets, the diff filter and issue state tabs; the
Releases/Tags switch on both of its pages; the bordered empty state on
profile and release pages; and a hand-built outline label for package
types beside Forgejo's native one.

They move to components/common as theme-counter, theme-switch and
theme-empty, and the package type uses the native ui basic label. The
copies had drifted, so the shared versions take GitHub's values: the
counter is 20px tall at weight 500 on the muted label background, and
the switch is weight 500 on both pages. Organization empty-state
overrides that a later profile rule always overrode are removed, along
with the unused org-empty rules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@whereareiam whereareiam added the change Intentional style, template, or compatibility improvements label Oct 3, 2026
Base automatically changed from refactor/shared-button-select to dev October 3, 2026 11:34
@whereareiam
whereareiam merged commit 5b5b051 into dev Oct 3, 2026
7 checks passed
@whereareiam
whereareiam deleted the refactor/shared-display-controls branch October 3, 2026 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change Intentional style, template, or compatibility improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant