Skip to content

Item: button labels count as visible text again - #114

Open
andrewhuhh wants to merge 1 commit into
mainfrom
andrew/item-actions-text
Open

andrewhuhh wants to merge 1 commit into
mainfrom
andrew/item-actions-text

Conversation

@andrewhuhh

Copy link
Copy Markdown
Collaborator

Fixes a v0.1.12 regression from #108, found by the new visual gate's first run against v0.1.10.

#108 made the Button label span display: contents. Item decides whether its actions are icon-only by walking up from each text node and treating any ancestor narrower than 2px as hidden. A display: contents element has no box, so its offsetWidth is 0, and every text button looked hidden. Item then treated rows with text buttons as icon-only and put the buttons beside the copy instead of on their own row below 36rem. The title wrapped into a narrow column, against the example's own caption ("buttons on their own row at the copy edge").

hasVisibleText now walks through display: contents ancestors. The gate's item, sortable-list, header-search and card pages now match v0.1.10 for every Item example. The only differences left are the framed card-head icons that #106 fixed on purpose.

v0.1.12 This PR (identical to v0.1.10)
Actions wrapping, 1706px, Light before after
Actions wrapping, 1706px, Dark before after
Default, 390px, Light before after
Default, 390px, Dark before after

Open in Capy

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai capy-ai Bot added the live-preview label Nov 17, 2026
@infisical-review-police

Copy link
Copy Markdown

💬 Discussion in Slack: #pr-review-cipher-114-item-button-labels-count-as-visible-text-again

Posted by Review Police — reviews, comments, new commits, and CI failures will stream into this channel.

@greptile-apps

greptile-apps Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Medium impact] This PR appears safe to merge.

Summary

Fixes Item action layout by counting button labels inside display: contents wrappers.

  • Item rows recognize text labels inside boxless wrappers.

Reviews (1) · Last reviewed commit: "Item: a display: contents button label c..." · Reviewed by Greptile

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant