Skip to content

Stabilize the scrolling behavior#2959

Merged
PorterNan merged 21 commits intomainfrom
jinan/fix-scroll-anchor
Apr 25, 2023
Merged

Stabilize the scrolling behavior#2959
PorterNan merged 21 commits intomainfrom
jinan/fix-scroll-anchor

Conversation

@PorterNan
Copy link
Copy Markdown
Contributor

@PorterNan PorterNan commented Apr 20, 2023

What

Stabilize the scrolling behavior

  • Add timestamp+displayName as key to each caption element so react can always find the same element and render into those
  • Add overflow-anchor:auto to each element, so any on screen caption will be an anchor for scrolling position when adding/removing elements

Demo:
In the video, we scrolled into an element in the middle of captions list, and you can see it is anchored when we adding new element at the bottom and removing element from the top (yes we have more than 50 elements)
And it is anchored all the way to the top, until the anchor element is popping out of the stack of all captions.

caption_banner_scrolling.mp4

Why

How Tested

Process & policy checklist

  • I have updated the project documentation to reflect my changes if necessary.
  • I have read the CONTRIBUTING documentation.

Is this a breaking change?

  • This change causes current functionality to break.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 20, 2023

Calling bundle size is increased❗.

  • Current size: 9797300
  • Base size: 9797183
  • Diff size: 117

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 20, 2023

Chat bundle size is increased❗.

  • Current size: 9839649
  • Base size: 9839531
  • Diff size: 118

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 20, 2023

CallWithChat bundle size is increased❗.

  • Current size: 10191324
  • Base size: 10191207
  • Diff size: 117

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

Failed to pass the UI Test. If this PR is for UI change and the error is snapshot mismatch, please add "update_snapshots" label to the PR for updating the snapshot.

@github-actions
Copy link
Copy Markdown
Contributor

Failed to pass the composite UI Test. If this PR is for UI change and the error is snapshot mismatch, please add "update_snapshots" label to the PR for updating the snapshot.

@github-actions
Copy link
Copy Markdown
Contributor

Failed to pass the UI Test. If this PR is for UI change and the error is snapshot mismatch, please add "update_snapshots" label to the PR for updating the snapshot.

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

Failed to pass the composite UI Test. If this PR is for UI change and the error is snapshot mismatch, please add "update_snapshots" label to the PR for updating the snapshot.

@github-actions
Copy link
Copy Markdown
Contributor

Failed to pass the UI Test. If this PR is for UI change and the error is snapshot mismatch, please add "update_snapshots" label to the PR for updating the snapshot.

@PorterNan PorterNan added the update_snapshots Set this label to request automated update of UI snapshots label Apr 21, 2023
@github-actions github-actions Bot removed the update_snapshots Set this label to request automated update of UI snapshots label Apr 21, 2023
Copy link
Copy Markdown
Contributor Author

@PorterNan PorterNan left a comment

Choose a reason for hiding this comment

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

Because this PR also changes how we deserialize json, so Date type is converted correctly in error bar - we need to update error bar state to make sure it is always right in this case

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

Failed to pass the UI Test. If this PR is for UI change and the error is snapshot mismatch, please add "update_snapshots" label to the PR for updating the snapshot.

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

Failed to pass the UI Test. If this PR is for UI change and the error is snapshot mismatch, please add "update_snapshots" label to the PR for updating the snapshot.

@github-actions
Copy link
Copy Markdown
Contributor

Signed-off-by: Porter Nan <jiangnanhello@live.com>
@PorterNan PorterNan enabled auto-merge (squash) April 25, 2023 15:59
@github-actions
Copy link
Copy Markdown
Contributor

@PorterNan PorterNan merged commit 5011391 into main Apr 25, 2023
@PorterNan PorterNan deleted the jinan/fix-scroll-anchor branch April 25, 2023 16:18
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.

4 participants