Skip to content

Consumer-adoption feedback: button_to items, scrollbar perf, dropdown guard, docs - #72

Merged
Fivell merged 4 commits into
masterfrom
fix/consumer-adoption-feedback
Oct 14, 2026
Merged

Fivell merged 4 commits into
masterfrom
fix/consumer-adoption-feedback

Conversation

@Fivell

@Fivell Fivell commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

What

Four fixes distilled from adopting the pinned bars / sticky headers in three consumer apps (and from the max-depth reviews of those MRs):

  • button_to action items are now styled like anchor ones: Rails renders them as form > input[type=submit] (or button), which the button selectors missed — consumers were re-hardcoding the $skin* padding defaults to compensate, desyncing on every knob change.
  • scrollbar_width.js writes on the bars, not on <html>: a custom property changed on the root invalidates style for the whole document (a full recalc of a 500-row index per write) while only three elements consume the var. Writes are per-element and idempotent, re-applied on observer deliveries and turbo loads for late-parsed/swapped-in bars; the redundant resize listener (a forced sync layout per event during window drags) is now only the no-ResizeObserver fallback. Legacy root-level writers keep working through inheritance.
  • Title-bar dropdowns are force right-aligned, guarding a stock AA 3.x bug: _position() sets inline left OR right per open and never clears the other, so after a resize between opens the persisting wrapper accumulates both offsets and stretches across the bar. Consumers carried exactly this guard as a local hotfix and dropped it when the theme took the bar over — the guard moves where the bar ownership moved.
  • wigu/all: a one-line Sprockets umbrella for the four shipped scripts; each stays individually requirable.

Testing

rake css (82 README-paired declarations) and the Capybara integration suite (2 runs, 13 assertions) pass.

Rails renders button_to as form > input[type=submit] (or button), which
the action-item button selectors missed — consumer apps re-hardcoded the
6px/10px padding to compensate, desyncing from $skinTitleBarButtonPaddingY/X
on every change and leaving two button heights in one bar whenever the
knobs are overridden. Cover the form-rendered submits in the same rule.
A custom property changed on the root invalidates style for the entire
document — one full recalc of a long index table per write — while only
the three pinned bars consume the var. Write it on #header/#title_bar/
.flashes instead (idempotent per-element, re-applied on observer
deliveries and turbo loads so late-parsed and swapped-in bars get the
cached value), and drop the resize listener: the documentElement
ResizeObserver already covers resizes post-layout, whereas the listener's
clientWidth read forced a synchronous layout per event during a window
drag. The listener plus eager read remain as the no-ResizeObserver
fallback. Legacy consumer scripts that set the var on <html> keep working
through inheritance.
AA 3.x's dropdown _position() sets inline left OR right per open and
never clears the other; the wrapper persists across opens, so after a
window resize between opens both offsets accumulate and the width:auto
wrapper stretches from the stale left coordinate to the bar's right edge.
Consumer apps carried exactly this left/right !important pair as a local
hotfix and dropped it when adopting the theme-owned bar — own the guard
where the bar is owned. Right alignment is also simply correct for items
sitting at the bar's right edge.
@Fivell
Fivell force-pushed the fix/consumer-adoption-feedback branch 2 times, most recently from 8fdc3c9 to 0e458ce Compare October 14, 2026 20:29
Consumers hand-maintain the four-script require list, and this round of
adoptions showed the trap: theme CSS now depends on a JS-set property, so
a missed require degrades visually with no error. Ship a one-line
umbrella; each script stays individually requirable.
@Fivell
Fivell force-pushed the fix/consumer-adoption-feedback branch from 0e458ce to e9d374c Compare October 14, 2026 20:30
@Fivell
Fivell merged commit 7e58f9b into master Oct 14, 2026
3 checks passed
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.

1 participant