feat(session-ui): add floating input navigation rail - #39351
Open
DevDengChao wants to merge 3 commits into
Open
Conversation
Add a floating navigation component for user messages in the session panel. Each user message gets a horizontal bar whose width encodes content length. Hovering shows a preview popup with text, images, or file information. - Add showInputNav setting (default: false) in Settings.general - Create InputNav component with HoverCard preview - Add computeBarWidth and extractPreviewContent utility functions - Integrate into session page, gated on desktop + setting - Add i18n keys for settings toggle - Add toggle in both v1 and v2 settings UI TDD: tests written first for computeBarWidth and extractPreviewContent.
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Add visual screenshots showing the InputNav component in different states: - Basic state with proportional width bars - Hover preview showing text content - Hover preview with images and file icons Also add Storybook story for interactive testing.
Replace standalone component screenshots with session panel context: - Basic state showing InputNav in session panel - Hover preview with text content - Hover preview with image thumbnail and file icon
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.
Issue for this PR
Closes #39361
Type of change
What does this PR do?
Adds a floating navigation rail for user messages in the session panel. Each user message gets a horizontal bar whose width encodes content length (short messages = narrow bars, long messages = wide bars). Hovering a bar shows a preview popup with truncated text, image thumbnails, or file icons.
The feature is controlled by a new
showInputNavsetting (default:false) in Settings > Advanced. It only renders on non-mobile screens (768px+).Key changes:
InputNavcomponent inpackages/session-uishowInputNavboolean setting inSettings.generalHow did you verify your code works?
computeBarWidthandextractPreviewContentutility functions ininput-nav.test.tsfalseinsettings.test.tspackages/session-uiandpackages/appScreenshots / recordings
Basic state - InputNav bars on the right side of the session panel, with different widths representing message lengths:
Hover preview (text) - Shows truncated text content when hovering a bar:
Hover preview (files) - Shows text, image thumbnail, and file icon:
Checklist