Skip to content

Buttons: Size Forgejo's native form buttons from one list - #90

Merged
whereareiam merged 1 commit into
devfrom
refactor/control-sizing
Oct 4, 2026
Merged

whereareiam merged 1 commit into
devfrom
refactor/control-sizing

Conversation

@whereareiam

Copy link
Copy Markdown
Owner

Stacked on #89 (base is its branch).

What

theme-control gives a button GitHub's 32px control size, but only where the template can add the class. Forgejo's own form buttons can't take it, so three places repeated the same six declarations (height and min-height 32px, padding: 5px 12px, 14px / 500 / 20px):

  • styles/components/issues/pull_files_review.ts (reviewButton fragment: review panel, diff comment form, conversation button row)
  • styles/components/issues/issue_new.ts (new issue submit button)
  • styles/pages/releases.css (release form buttons)

components/common/button/button.css now has one "native controls" rule with those buttons listed, and the copies are gone. Sizing another native button means adding its selector to the list.

Left alone: the merge box buttons, which use a different rule (vertical padding only, because the button group manages horizontal padding).

Verification

The before/after comparison is identical on the new release form, new issue page, an issue page and three pull request pages. The on-demand buttons were measured after the change: review panel and conversation row buttons are 32px high, 5px 12px, 14px / 500, with their margins unchanged. bun vitest (403 passed), bun check and Prettier pass.

🤖 Generated with Claude Code

The review panel, the diff comment forms, the new issue page and the
release form each repeated the same six declarations to bring Forgejo's
own buttons to the 32px control size, because those buttons cannot take
the theme-control class.

The button component now carries one rule for a list of native buttons;
the three copies are removed.

No visual change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@whereareiam whereareiam added the skip-changelog Internal change excluded from release notes label Oct 4, 2026
Base automatically changed from refactor/editor-component to dev October 4, 2026 15:43
@whereareiam
whereareiam merged commit b447d73 into dev Oct 4, 2026
7 checks passed
@whereareiam
whereareiam deleted the refactor/control-sizing branch October 4, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Internal change excluded from release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant