-
Couldn't load subscription status.
- Fork 4k
Improve inline tooltip performances #3728
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
Improve inline tooltip performances #3728
Conversation
@gregberge
gregberge
commented
Oct 15, 2025
- Increase the limit from 100 to 500
- Remove useless complexity to load the inline link
- Be sure to not serialize too much in ancestors icon (main issue)
- Increase the limit from 100 to 500 - Remove useless complexity to load the inline link - Be sure to not serialize too much in ancestors icon (main issue)
⚠️ No Changeset found
Latest commit: 1645554
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
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 optimizes inline tooltip performance by reducing serialization overhead and simplifying component structure. The changes eliminate the lazy loading complexity of inline tooltips and ensure only necessary data is passed to components.
- Increased link preview limit from 100 to 500 tooltips
- Simplified inline tooltip loading by removing dynamic import complexity
- Optimized PageIcon serialization by passing only required emoji/icon properties instead of full page objects
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/gitbook/src/lib/references.tsx | Optimized PageIcon props to pass only emoji/icon data instead of full ancestor objects |
| packages/gitbook/src/components/PageIcon/PageIcon.tsx | Added explicit null return for consistency when no icon is present |
| packages/gitbook/src/components/PageBody/PageBody.tsx | Increased link preview limit from 100 to 500 |
| packages/gitbook/src/components/DocumentView/InlineLink/InlineLinkTooltipImpl.tsx | Removed separate implementation file as part of consolidation |
| packages/gitbook/src/components/DocumentView/InlineLink/InlineLinkTooltip.tsx | Consolidated tooltip implementation by removing dynamic loading and moving logic inline |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|