-
Notifications
You must be signed in to change notification settings - Fork 2
fix: should prefer originalTitle over title for settled pdf name
#13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: 4ba57fd The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughThis change updates the logic for determining and preserving the original site title within the application state. It introduces an Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant SiteOverrides
participant SiteData
participant VersionsNav
User->>SiteOverrides: Triggers site override with new title
SiteOverrides->>SiteData: Set originalTitle if undefined
SiteOverrides->>SiteData: Override title with new value
User->>VersionsNav: Requests PDF download link
VersionsNav->>SiteData: Retrieve originalTitle or title
VersionsNav-->>User: Provide download link using preferred name
Possibly related PRs
Poem
Tip ⚡️ Faster reviews with caching
Enjoy the performance boost—your workflow just got faster. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
🧰 Additional context used🧬 Code Graph Analysis (1)src/global/VersionsNav/index.tsx (1)
🔇 Additional comments (3)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Signed-off-by: JounQin <admin@1stg.me>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR ensures that the settled PDF name prefers the new originalTitle over title. It introduces a new interface definition for SiteData, updates the VersionsNav component to use the correct title, and adjusts SiteOverrides to set up originalTitle via nullish assignment.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/types.ts | Added SiteData interface with an optional originalTitle. |
| src/global/VersionsNav/index.tsx | Updated pdf name generation to use originalTitle when available. |
| src/global/SiteOverrides/index.tsx | Applied nullish assignment to set originalTitle before updating title. |
commit: |
Summary by CodeRabbit
Bug Fixes
New Features