Skip to content
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

feat(config, theme): add clientOnly marker #4663

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

zhangyx1998
Copy link
Contributor

Description

  • Provided clientOnly(object: any) and isClientOnly(object: any): boolean APIs to mark an object as client-only.
  • Modified component ClientOnly.ts to accept an optional prop isClientOnly: Boolean so its behavior can be programmatically controlled.
  • Updated navbar and sidebar components to allow optional client-only rendering.

Linked Issues

closes #3367

Additional Context

Before (22 occurrences of a sidebar item)

image

After (4 irrelevant occurrences)

image

Tip

The author of this PR can publish a preview release by commenting /publish below.

@zhangyx1998
Copy link
Contributor Author

zhangyx1998 commented Mar 31, 2025

@brc-dd Seems like the data loading test on windows-latest could randomly timeout due to fluctuations of GitHub server. There is literally nothing changed in the previous failed test.

image

@BAGOMBEKA-JOB-DEV
Copy link

@zhangyx1998 You need to first resolve some of the conflicts in your code. Just try to cross check.

@zhangyx1998
Copy link
Contributor Author

zhangyx1998 commented Apr 9, 2025

Thanks for reminding! I'll find time to resolve it asap.

Copy link

@BAGOMBEKA-JOB-DEV BAGOMBEKA-JOB-DEV left a comment

Choose a reason for hiding this comment

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

Conflicts resolved!

@zhangyx1998
Copy link
Contributor Author

Test/node20 failed because it lacks support for Iterator helpers.

The newly introduced package relies on Iterator.map and Iterator.filter. I am looking for workarounds without too much performance penalty.

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.

Provide chunk splitting for shared objects like sidebar and nav
2 participants