chore(theme-default/style): right asideContainer should exist even no headers#2036
chore(theme-default/style): right asideContainer should exist even no headers#2036
Conversation
✅ Deploy Preview for rspress-v2 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for aquamarine-blini-95325f ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
| <Aside headers={headers} outlineTitle={outlineTitle} /> | ||
| {afterOutline} | ||
| {headers.length === 0 ? ( | ||
| <></> |
There was a problem hiding this comment.
If no headers, should beforeOutline and afterOutline take effect?
There was a problem hiding this comment.
Users may use beforeOutline to customize outline, see #1637
There was a problem hiding this comment.
@JounQin seems to resolve issue of overview page style?
There was a problem hiding this comment.
@JounQin seems to resolve issue of overview page style?
Yes, I was.
There was a problem hiding this comment.
headers.length === 0 && <>
//...
</>Shoud be fine here.
There was a problem hiding this comment.
Can we add a new option for this behavior? We don't want to waste the window width.
|
Can we provide an option for this? |
😂 sorry, after #2018, the TOC is only generated during CSR, so we need this UI placeholder in the right side for SSG. Otherwise, there will be a CLS |
CSR: first screen(headers.length = 0) -> useEffect (headers.length = n) SSG: html generation (headers.length = 0) -> first screen hydration(headers.length = 0) -> useEffect (headers.length = n) So, I think this placeholder is necessary To avoid CLS in lg screen, I expect the first screen style to be like this, always with an AsideContainer for placeholder
in md screen, the first screen I expected would be
we can place a BTW, not the current context... I find a bug when entering https://v2.rspress.dev/plugin/official-plugins/llms#usage in md screen
pending ... |
I'm not sure to follow, I mean we can check the correct
I know what's your meaning, that's why I'm asking for a new option to opt-out.
By the way, due to the limitation of rspress/packages/runtime/src/hooks.ts Lines 105 to 106 in 9b77081 |





Summary
revert a style adjust to original behavior
before
after
Related Issue
Checklist