fix: resolve the problem of messy header images in tiny-charts#127
Conversation
WalkthroughThe PR adds a watcher to the header component that clears header information when navigating to the tiny-charts application. The Vue import is updated to include the ChangesHeader Watcher and Documentation Update
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@packages/common/src/components/header.vue`:
- Around line 287-297: The watcher is using a non-reactive const currApp so it
never updates on SPA navigation; change the watch source to a reactive
route/path (e.g., useRoute().path or a reactive reference to location.pathname)
so the watcher reacts to route changes and still clears state.headerInfo when
the path corresponds to the tiny-charts app; update the watch call that
currently references currApp to instead watch the reactive route value and keep
the same callback that sets state.headerInfo = [] when the path indicates
tiny-charts.
🪄 Autofix (Beta)
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
Run ID: 9f2e4ce8-43ee-45b2-bd00-9fd4482a461f
📒 Files selected for processing (2)
packages/common/src/components/header.vuepackages/opentiny-docs/src/views/vue-pro/start.md
💤 Files with no reviewable changes (1)
- packages/opentiny-docs/src/views/vue-pro/start.md
Summary by CodeRabbit
Bug Fixes
Documentation