Skip to content

Controls: Share button sizing and the select across pages - #66

Merged
whereareiam merged 1 commit into
devfrom
refactor/shared-button-select
Oct 3, 2026
Merged

whereareiam merged 1 commit into
devfrom
refactor/shared-button-select

Conversation

@whereareiam

Copy link
Copy Markdown
Owner

Stacked on #65 (the two touch adjacent lines in three templates). Review the second commit only; once #65 merges this retargets to dev.

Profile, project and package pages restated the standard 32px button box in their page stylesheets, and the package filters carried the theme's only styled select as profile-specific rules.

Changes

  • Buttons: the profile "New repository" and "Search" buttons, the projects "New project" button and the package "Search" buttons now use button theme-control. A new theme-control-wide gives the 16px inline padding GitHub keeps on profile pages; the default stays 12px, which GitHub uses on its organization repository list. Their page rules shrink to layout (flex, box-shadow).
  • Select: profile-select becomes components/common/select (theme-select inside theme-select-wrap), loaded with the other shared controls. The mobile full-width behaviour stays in the profile stylesheet as layout.
  • Rule: CONTRIBUTING.md now says when to use Forgejo's native ui button classes (anything Forgejo already renders), theme-control (buttons the theme adds) and theme-icon-button (icon-only). A test keeps every template <select> on the shared one.

Left alone on purpose: rules that size buttons rendered by Forgejo's own markup (profile avatar card actions, the Actions run header, natively rendered project controls). Those buttons are not in theme templates, so a class cannot be added to them.

Visual result

Intended to be unchanged. Computed size, position, padding, typography, border, background and colour of every affected button and select were compared before and after in the dev preview at 1440px and 390px across profile repositories, stars, projects, packages, package versions, organization overview, organization repositories and Actions: 27 of 28 measurements are identical. The one difference is the profile "New repository" button, 1px wider (155px to 156px) from the shared control's 8px icon gap.

Reference values from github.com: 32px buttons use 5px 16px on profile pages and 0 12px on the organization repository list; small buttons are 28px.

Checks

  • bun commit passes (386 tests on top of Search: Use one shared field across pages #65).
  • Dev preview (http://localhost:3000, Forgejo 16.0.3), with a generic package uploaded locally so the package pages render their filters: search, select and submit share one 32px row on desktop, and wrap without horizontal overflow at 390px.

🤖 Generated with Claude Code

Profile, project and package pages restated the 32px button box in
their page stylesheets, and the package filters carried the theme's only
styled select as profile-specific rules.

Those buttons now use theme-control, with a theme-control-wide variant
for the 16px padding GitHub keeps on profile pages, and the select moves
to components/common/select as theme-select. Page stylesheets keep only
layout. The contributing guide states when to use native button classes,
theme-control and theme-icon-button, and a test keeps template selects
on the shared one.

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-search-field to dev October 3, 2026 11:33
@whereareiam
whereareiam merged commit 5af3094 into dev Oct 3, 2026
7 checks passed
@whereareiam
whereareiam deleted the refactor/shared-button-select 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