generated from react-component/footer
-
Notifications
You must be signed in to change notification settings - Fork 36
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
Fix/ssr full display all invisibly #41
Open
huan-qiu
wants to merge
3
commits into
react-component:master
Choose a base branch
from
huan-qiu:fix/ssr-full-display-all-invisibly
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
有点蛋疼,效果感觉也不好。SSR 的时候这块就直接空了也会有 CLS。如果是 SSR Full Render 然后 SSR 的时候 overflow hidden 掉呢?
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.
在overflow没设置高度下,会有一点shift,因为高度被撑大了。如果有设置的话,就是先空白然后显示,layout上就不会shift。如果是 SSR Full Render + overflow hidden,假设能让 item 是都显示在同一行溢出的话,效果是后面两个item的位置可能会闪一下。这个的前提是要 overflow 这个组件不要 wrap 成多行,目前是会wrap成多行,需要先有高度限制然后来 x y 都overflow hidden。看似都有 tradeoff。
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.
@zombieJ overflow组件 有接受个style的prop,因此在pr改动的基础上,可以传入height的值来先占好需要的高度。我理解这样做在 fullySSR 就不会有 CLS 的问题。因为 fullySSR 这个问题目前只会影响到 overflow 是水平一行 maxCount 值是RESPONSIVE的时候。看了下 rc-menu 使用 rc-overflow的时候是会传入 style prop的,rc-select 则是没开启 ssr,所以没有这个问题。你康康ok不?
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.
@zombieJ 如果暂时没有满意的方案,可以先让ssr=full在 menu 那里可以 opt out 吗?即考虑这条 pr react-component/menu#665