Repository navigation
feat(web): make the memory detail panel resizable and remember its width - #728
Merged
Merged
Conversation
Drag the drawer's left edge (or focus it and use the arrow keys, Home/End) to resize; double-click resets. The width is stored per browser as a fraction of the viewport and rendered through a CSS clamp() whose bounds are viewport-relative (max(320px, 15vw) to 70vw), so it scales when moving between monitors. Default stays 512px. Co-authored-by: dash0-dev[bot] <257284812+dash0-dev[bot]@users.noreply.github.com>
…p resizes - max-w-full on the drawer so a containing block narrower than the vw bounds (the stories' 360px device frames) still holds it - measure drags from the start width via a pure dragPanelWidth, with a spec and a pointer-drag interaction story - no storage write or event when a gesture ends at the same width, or on a reset that is already the default - ignore Alt/Ctrl/Cmd+arrow and a second pointer mid-drag - rely on the global Storybook preference reset; document Home/End Co-authored-by: dash0-dev[bot] <257284812+dash0-dev[bot]@users.noreply.github.com>
Contributor
|
The dashboard preview for this PR — redeployed on each push that changes the web app.
Preview always points at this PR's latest commit; Deployment is the immutable build of |
The hover/focus/drag indicator was a hard full-height accent bar. It is now a transparent -> accent -> transparent vertical gradient (the TopBar ActivityIndicator's stops) that fades in via opacity. Co-authored-by: dash0-dev[bot] <257284812+dash0-dev[bot]@users.noreply.github.com>
Contributor
Author
✅ No issues foundThe follow-up commit qualifies the 512px default in the code comments and key-files row, closing the prior finding. Nothing new cleared the bar; one test-coverage note stays advisory. 1 advisory finding below the confidence bar — see Less certain below. Less certain (1) — advisory, below the confidence bar
Review details
Memories used
Nothing to report — integrations (not activated), severity, 0 files skipped.
|
Addresses review comment by dash0-dev[bot]: #728 (comment) Co-authored-by: dash0-dev[bot] <257284812+dash0-dev[bot]@users.noreply.github.com>
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.
Why
The memory detail panel was capped at 512px, which is cramped on a large monitor (tables and long lessons wrap heavily). It should be resizable, with bounds that follow the screen, and keep its width across reloads.
What changed
←/→(Shift for bigger steps) orHome/End; double-click resets to the default. On hover, focus or drag, an orange line that fades out toward the top and bottom fades in.localStorageas a fraction of the viewport, so it scales when you move between monitors. It renders asclamp(max(320px, 15vw), …, 70vw), and the default stays 512px (the 15vw floor lifts it only on screens wider than ~3413px).lib/lesson-panel-width.ts, with specs. The handle writesstyle.widthduring a gesture and commits once at the end, so the heavy panel doesn't re-render on every pointer move.lore.memory_panel_resizedRUM event (source plus viewport %) is documented indocs/otel.md. There's a user note intags.mdx, andllms.txtis unchanged because its generator reads only MDX frontmatter.How to verify
cd packages/web && npx vitest run src/lib/lesson-panel-width.spec.ts src/lib/persisted-preference.spec.ts src/lib/analytics/track.spec.tsLore/LessonDetailSheet/Tests→DrawerResizesFromItsEdge,DrawerResizesByDragging(not run locally; no Playwright browser in the sandbox, CIweb-testcovers them)Notes for reviewers
The mobile bottom sheet is unchanged.
max-w-fullon the drawer keeps it inside containing blocks narrower than thevwbounds (the stories' 360px device frames), so existing drawer baselines should not move.