fix(projects): three measured density bugs on the project page - #470
Merged
Conversation
…ad to hunt for Both found by opening the deployed page and measuring it, not by reading the diff. 1. The description clamp did nothing. `line-clamp-3` clamps LINE BOXES of inline content, but the description renders inside DescriptionEditor's full-width <button>, which produces none in the wrapper. Computed display came back `flow-root` instead of `-webkit-box`, and the element measured 386px tall with a 386px scrollHeight — a clamp that reported itself as applied (`webkitLineClamp: "3"`) while clamping nothing. A max-height does not care what the child element is. 2. The widget was still behind a click. Moving Feedback into its own tab fixed where it lives, not whether you can see it: the panel is still 1,054 words and widget setup was still behind a button labelled only "Widget". That is the exact shape of the original report — someone came to put the widget on a site, did not find it, and concluded the project had no widget. It had one, and it was live. Widget STATE is now always on screen — a one-row status line with a dot, "Widget live / paused / enabled, not seen yet", the origin, and a Manage button. Only the CONTROLS stay behind a click. The three states are distinct on purpose: "live" is the observed boot heartbeat, and a token that exists but has never been seen is genuinely different from one that is working. The toggle now says "Widget setup" / "Hide widget setup" rather than "Widget", and carries aria-expanded.
…s a wall Measured on the deployed Context tab: the Mission value was 425 characters rendered 228px wide and 296px tall — roughly 30 characters a line, when readable prose wants 45 to 75. The column was not narrow by accident. Each attribute row laid out horizontally at sm+: a 128px label, a gap, and 80px of permanently visible Edit and Delete icons, inside a 440px grid column. That leaves 228px. With 16 rows the tab also carried 32 icon buttons competing for attention with the text they act on. Label now sits above the value, and the row actions are lifted out of flow and revealed on hover. The prose gets the whole column. The reveal is a `ui-row-actions` class in globals.css rather than inline variants, for two reasons: this repo keeps pointer-coarse behaviour in one place on purpose, and Tailwind 4 drops `@layer components` rules under variants — so the hover and focus states are written as real selectors. Not hidden, only quiet: `:focus-within` reveals them for keyboard users, and a coarse pointer (which has no hover at all) always shows them. The aria-labels were already correct — "Edit Mission", "Delete Vision" — so this changes visual weight, not accessibility.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #468, found by opening the deployed page in a real browser and measuring it — not by reading the diff. Replaces #469, which was cut before #468's squash merge and therefore conflicted and ran zero CI silently.
1. A clamp that clamped nothing
line-clamp-3clamps line boxes of inline content, but the description renders inside DescriptionEditor's full-width<button>, which produces none in the wrapper. Computed display came backflow-rootinstead of-webkit-box; the element measured 386px tall with a 386px scrollHeight. It reported itself as applied (webkitLineClamp: "3") while doing nothing. Now a max-height, which does not care what the child element is.2. The widget you still had to hunt for
Giving Feedback its own tab fixed where it lives, not whether you can see it — the panel is 1,054 words and setup sat behind a button labelled only "Widget". That is the original report: someone came to put the widget on a site, did not find it, concluded the project had none. It had one, and it was live.
Widget state is now always on screen —
● Widget live · fleetcrown.orangecat.chwith Manage. Only the controls stay behind a click. Three distinct states, because "we minted a token" and "it is actually running" are different facts: live (observed boot heartbeat) / paused / enabled-but-never-seen.3. 425 characters in a 228px column
The worst of the three, and the same disease as the header one level down.
Not accidental: each row laid out horizontally at sm+ as
128px label + gap + 80px of always-visible Edit/Delete iconsinside a 440px grid column. That leaves 228px. With 16 rows the tab carried 32 icon buttons competing with the text they act on.Label now sits above the value; row actions are lifted out of flow and revealed on hover. The prose gets the whole column.
Not hidden, only quiet:
:focus-withinreveals them for keyboard users, and a coarse pointer — which has no hover at all — always shows them. The aria-labels were already correct ("Edit Mission", "Delete Vision"), so this changes visual weight, not accessibility.The reveal is a
ui-row-actionsclass inglobals.cssrather than inline variants: this repo keeps pointer-coarse behaviour in one place on purpose, and Tailwind 4 drops@layer componentsrules under variants, so hover/focus are written as real selectors.Verification
npm run verifyexits 0, includingcheck:design(9 checks).One non-finding, recorded: a 390px probe reported every tab at 20px, under the 44px touch floor. False positive — the floor lives in
@media (pointer: coarse)and a resized desktop browser reports a fine pointer, soui-tapcorrectly did nothing..ui-tapis in the coarsemin-height: 2.75remlist; real phones get 44px. The probe was wrong, not the code.