Skip to content

Tweak viewer toolbar: dropdown fix, icon polish - #4

Merged
emilio-balda merged 4 commits into
mainfrom
tweak-viewer
Sep 2, 2026
Merged

emilio-balda merged 4 commits into
mainfrom
tweak-viewer

Conversation

@emilio-balda

Copy link
Copy Markdown
Collaborator

Summary

  • Fix the type-filter dropdown's arrow spacing and prevent its label from hard-clipping in narrow layouts (custom chevron, ellipsis + max-width safeguard).
  • Slightly increase the theme toggle icon stroke weight for better visibility.
  • Migrate inline SVG icons to lucide-react.
  • Remove the graph layout selector.

Test plan

  • Verified the type filter dropdown renders correctly and doesn't clip text at viewport widths from 260px to 900px+ (light and dark themes).
  • Manually click through the toolbar (filter, reset view, theme toggle) in the running app.

Made with Cursor

emilio-balda and others added 4 commits September 2, 2026 13:03
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>
Copilot AI lite review requested due to automatic review settings September 2, 2026 10:21
@emilio-balda
emilio-balda merged commit f717e5a into main Sep 2, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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-react equivalents 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.0 does not appear to be published on npm, so installs will fail (and the lockfile can’t be generated from a real npm install). Use a published version (e.g. the current latest 1.x) and regenerate package-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 thread src/Graph.jsx
Comment on lines 131 to 135
useEffect(() => {
const graph = graphRef.current;
if (!graph) {
return;
}
Comment thread src/styles.css
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;
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.

2 participants