Skip to content

fix: resolve the problem of messy header images in tiny-charts#127

Merged
hexqi merged 3 commits into
devfrom
wyp/play-0511
May 20, 2026
Merged

fix: resolve the problem of messy header images in tiny-charts#127
hexqi merged 3 commits into
devfrom
wyp/play-0511

Conversation

@wuyiping0628
Copy link
Copy Markdown
Contributor

@wuyiping0628 wuyiping0628 commented May 11, 2026

Summary by CodeRabbit

  • Bug Fixes

    • Fixed header information clearing when navigating between applications.
  • Documentation

    • Removed outdated references from the overview section.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 11, 2026

Walkthrough

The 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 watch function, and an immediate watcher on the computed currApp value triggers the clear behavior. A reference to demo sites is removed from the Vue Pro documentation overview.

Changes

Header Watcher and Documentation Update

Layer / File(s) Summary
Vue watch import
packages/common/src/components/header.vue
watch function is added to the Vue Composition API imports alongside existing onMounted, reactive, and ref imports.
Tiny-charts header clear watcher
packages/common/src/components/header.vue
An immediate watcher monitors the computed currApp value; when it equals 'tiny-charts', the watcher clears state.headerInfo to an empty array.
Documentation - demo site reference removal
packages/opentiny-docs/src/views/vue-pro/start.md
The overview section removes the sentence directing users to visit the TinyPro demo site, transitioning directly to the background knowledge subsection.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

A watcher springs to life, with watch in hand,
To clear the tiny-charts header as planned,
While docs trim away the demo site's call,
Keeping the guides both simple and small. 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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 'fix: resolve the problem of messy header images in tiny-charts' clearly describes the main change: clearing headerInfo when currApp is 'tiny-charts' to resolve header image issues.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch wyp/play-0511

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.

❤️ Share

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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between fc19dd7 and 237f22b.

📒 Files selected for processing (2)
  • packages/common/src/components/header.vue
  • packages/opentiny-docs/src/views/vue-pro/start.md
💤 Files with no reviewable changes (1)
  • packages/opentiny-docs/src/views/vue-pro/start.md

Comment thread packages/common/src/components/header.vue Outdated
Comment thread packages/common/src/components/header.vue Outdated
Comment thread packages/common/src/components/header.vue Outdated
@hexqi hexqi changed the title feat: solve the problem of messy header images in tiny-charts fix: solve the problem of messy header images in tiny-charts May 20, 2026
@hexqi hexqi changed the title fix: solve the problem of messy header images in tiny-charts fix: resolve the problem of messy header images in tiny-charts May 20, 2026
@hexqi hexqi merged commit 14a37e0 into dev May 20, 2026
3 checks passed
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