Skip to content

fix(ui): fix the UI issue with the knowledge graph rendering - #9

Merged
mchittineni merged 1 commit into
mainfrom
ui-fix
Aug 11, 2026
Merged

mchittineni merged 1 commit into
mainfrom
ui-fix

Conversation

@mchittineni

@mchittineni mchittineni commented Aug 11, 2026 •

Copy link
Copy Markdown
Owner

Description

updated the UI for rendering on mobile devices

Type of Change

  • 🆕 New interview question(s) and answer(s)
  • 📝 Improving an existing answer
  • 📁 New topic directory
  • 🔧 Fixing links, formatting, or tooling

Topic

  • Directory:

Checklist

See CONTRIBUTING.md for the full format.

  • File name is topic-slug/question-slug.md - no numeric prefix, and the slug matches the title.
  • Frontmatter includes title, a unique id, category matching the topic title, a difficulty of Beginner/Intermediate/Advanced, and the required tags.
  • Heading is # <title> and matches the frontmatter exactly.
  • Answer structure follows Short answer → Detail → Example → Interview tips.
  • New topic only: registered in scripts/topic_meta.json with an order, description, and study_notes.
  • Ran python3 scripts/generate_indexes.py and python3 scripts/build_knowledge_graph.py (indexes and graph HTML are generated - do not hand-edit topic READMEs, graph HTML, or the root TOC).
  • Ran python3 scripts/validate_content.py and it passed.
  • Content is accurate, and any code examples actually work.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • Accessibility

    • Improved support for reduced-motion preferences by disabling nonessential animations.
    • Added larger touch targets and removed mouse-only guidance on touch devices.
  • Responsive Design

    • Improved the knowledge graph experience on mobile and narrow screens.
    • Added responsive layouts for portrait and landscape orientations.
    • Enabled scrolling and size limits for mobile header and information panels.
    • Optimized graph sizing to use the available screen height and width.
    • Hid nonessential content on smaller screens.

Walkthrough

The graph UI now supports mobile viewport sizing, responsive panels, touch-friendly controls, landscape layouts, and reduced-motion preferences. The source template and generated knowledge graph receive matching CSS updates.

Changes

Responsive graph interface

Layer / File(s) Summary
Viewport sizing foundation
docs/index.html, scripts/build_knowledge_graph.py
The page prevents automatic mobile text scaling. The graph uses full width with 100dvh and a 100vh fallback.
Responsive and accessibility styles
docs/index.html, scripts/build_knowledge_graph.py
Mobile and landscape layouts constrain and scroll panels, enlarge touch targets, hide nonessential content, remove mouse hints on touch devices, and disable motion when requested.

Estimated code review effort: 2 (Simple) | ~15 minutes

Poem

I’m a rabbit with a graph to hop,
Mobile panels scroll instead of stop.
Touch targets grow, hints fade away,
Reduced motion keeps hops at bay.
Wide or narrow, the view stays bright!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies a UI fix for knowledge graph rendering, which matches the main change.
Description check ✅ Passed The description identifies the mobile UI update and records the generated files and validation steps, but leaves the topic directory blank.
✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch ui-fix

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

✅ All automated checks passed

The following checks completed successfully:

  • ✅ Content validation
  • ✅ Index validation
  • ✅ Markdown formatting
  • ✅ Markdown linting

Your contribution is ready for review. 🎉

@mchittineni
mchittineni enabled auto-merge (rebase) August 11, 2026 12:54

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/build_knowledge_graph.py`:
- Around line 516-530: The landscape responsive CSS in
scripts/build_knowledge_graph.py lines 516-530 allows `#header` and `#info-card` to
overlap on narrow viewports; constrain both panel widths to the available half
viewport, such as using a min(320px, calc(50vw - 20px)) width. Regenerate
docs/index.html lines 339-353 from the updated template so the generated output
contains the same fix.
- Around line 541-548: Update scripts/build_knowledge_graph.py lines 541-548 to
use matchMedia('(prefers-reduced-motion: reduce)') when configuring directional
particles and Graph.cameraPosition, setting both values to 0 when reduced motion
is active; then regenerate docs/index.html lines 364-371 so the generated output
matches the template.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d98a2e63-bc96-40ab-8798-2cb5296aa04f

📥 Commits

Reviewing files that changed from the base of the PR and between 63a6d44 and 8de26ca.

📒 Files selected for processing (2)
  • docs/index.html
  • scripts/build_knowledge_graph.py

Comment thread scripts/build_knowledge_graph.py
Comment thread scripts/build_knowledge_graph.py
@mchittineni
mchittineni merged commit 95cb7b5 into main Aug 11, 2026
5 checks passed
@mchittineni
mchittineni deleted the ui-fix branch August 11, 2026 12:56
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.

1 participant