Skip to content

ol-button: href links, ghost variant, icon/circle shapes, floating elevation - #13347

Merged
lokesh merged 1 commit into
internetarchive:masterfrom
lokesh:component-updates
Aug 17, 2026
Merged

lokesh merged 1 commit into
internetarchive:masterfrom
lokesh:component-updates

Conversation

@lokesh

@lokesh lokesh commented Aug 17, 2026 •

Copy link
Copy Markdown
Collaborator

feature — extends <ol-button> with what the in-progress book actions popover work (#13346) needs, so those surfaces stop hand-rolling button features.

All four are standard button-component conventions (link buttons, ghost, icon-only, elevation) rather than anything novel to OL, so nothing here should be contentious.

Screenshot 2026-08-17 at 10 13 09 AM Screenshot 2026-08-17 at 10 13 14 AM
  • Links — href renders an <a> with identical styling (target/rel/download pass through). For button-shaped navigation like Read / Borrow.
  • variant="ghost" — no fill, border, or lift at rest; neutral hover fill.
  • shape="icon" / shape="circle" — icon-only, square on the size's control height.
  • elevation="floating" — heavier drop shadow (new --box-shadow-floating token) for controls sitting over content, e.g. a save button on cover art.

Note

Low risk: nothing in the codebase uses these yet — this only adds attributes and CSS rules to the existing component.

Screenshots

See above.

Also, here is a scenario where these features can be utilized:

add-popover.mp4

Testing

  • /developers/design/components#button has examples for each addition.
  • npx jest tests/unit/js/OLButton.test.js covers the button ↔ link rendering contract.

Stakeholders

@cdrini @mekarpeles

…g elevation

- href renders an <a> with identical styling (target/rel/download pass
  through); disabled/loading drop the href and set aria-disabled. Selectors
  move from `> button` to `> :is(button, a)`, and the link form out-ranks the
  global a:link/a:visited underline.
- variant="ghost": no fill, border, or lift at rest; neutral hover fill.
- shape="icon" | "circle": square on the size's control height (via a new
  --ol-button-height custom property), no horizontal padding.
- elevation="floating": heavier drop shadow via a new --box-shadow-floating
  token, for controls that sit over content.
- Design page examples for each, plus jest coverage of the rendering contract.

Claude-Session: https://claude.ai/code/session_0181hgjqkv2tyxa8XJi3v78y
@lokesh
lokesh requested a review from RayBB August 17, 2026 17:34
@lokesh
lokesh marked this pull request as ready for review August 17, 2026 17:34

@RayBB RayBB left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A small but mighty improvement. Working very well and looks great. Ship it!

@lokesh
lokesh merged commit e409866 into internetarchive:master Aug 17, 2026
10 of 11 checks passed
@RayBB RayBB self-assigned this Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants