Tweak viewer toolbar: dropdown fix, icon polish - #4
Merged
Merged
Conversation
Replaces hand-drawn sidebar toggle, theme, and search icons with lucide-react components for consistency and easier maintenance. Co-authored-by: Cursor <cursoragent@cursor.com>
Replace the native select arrow with a custom chevron so the gap between the label and arrow is consistent, and add ellipsis/max-width safeguards so the label never hard-clips under tight layouts. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
🟡 Changes recommended
The added lucide-react@^1.39.0 dependency appears to reference a non-published version, which will break installs and makes the lockfile invalid.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR refines the viewer toolbar UI by improving the type-filter select’s behavior in narrow layouts, polishing toolbar icon rendering via lucide-react, and simplifying graph controls by removing the layout selector (standardizing on a single layout).
Changes:
- Add custom styling for the toolbar type-filter
<select>(max-width, ellipsis, custom chevron). - Replace inline SVG toolbar/search icons with
lucide-reactequivalents and adjust icon stroke weight. - Remove graph layout selection and hard-code the graph layout to
"cose".
File summaries
| File | Description |
|---|---|
| src/styles.css | Adds dedicated .controls select styling for truncation and a custom dropdown chevron. |
| src/Sidebar.jsx | Swaps the sidebar search icon from inline SVG to lucide-react. |
| src/Graph.jsx | Removes the layout prop and fixes layout to "cose". |
| src/App.jsx | Migrates toolbar icons to lucide-react and removes the graph layout selector/state. |
| package.json | Adds lucide-react dependency. |
| package-lock.json | Locks lucide-react addition. |
Review details
Suppressed comments (1)
package.json:21
- The added dependency version
lucide-react@^1.39.0does not appear to be published on npm, so installs will fail (and the lockfile can’t be generated from a realnpm install). Use a published version (e.g. the current latest 1.x) and regeneratepackage-lock.json.
"dependencies": {
"cytoscape": "^3.34.2",
"lucide-react": "^1.39.0",
"markdown-to-jsx": "^7.7.17",
"react": "^19.2.8",
"react-dom": "^19.2.8",
"yaml": "^2.9.0"
- Files reviewed: 5/6 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
131
to
135
| useEffect(() => { | ||
| const graph = graphRef.current; | ||
| if (!graph) { | ||
| return; | ||
| } |
Comment on lines
+188
to
+193
| .controls select { | ||
| max-width: 160px; | ||
| padding-right: 24px; | ||
| overflow: hidden; | ||
| background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23767b87' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); | ||
| background-repeat: no-repeat; |
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.
Summary
lucide-react.Test plan
Made with Cursor