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

fix(NcRichText): debounce the update of widget visibility #6069

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Antreesy
Copy link
Contributor

☑️ Resolves

🖼️ Screenshots

🏚️ Before

2024-09-10_14h16_35.mp4

🏡 After

2024-09-10_14h12_59.mp4

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable
  • 3️⃣ Backport to next requested with a Vue 3 upgrade

- IntersectionObserver triggered if any pixel of observed element appears in viewport for a moment
- with debouncing the update, it won't be triggered during programmatic smooth scroll (less than 100ms in viewport with this commit)

Signed-off-by: Maksim Sukharev <[email protected]>
@Antreesy Antreesy added bug Something isn't working 3. to review Waiting for reviews feature: richtext Related to the richtext component labels Sep 10, 2024
@Antreesy Antreesy added this to the 8.18.0 milestone Sep 10, 2024
@Antreesy Antreesy self-assigned this Sep 10, 2024
@DorraJaouad
Copy link
Contributor

At this point, we have created different types of scrolling handling due to height changes of NcRichText in Talk 😵 .
Given that we have various known widgets type (link preview, office widgets, github embedding), we can enforce specific heights for each, that remains the same before and after loading. For interactive widgets, when it's not visible, we keep a placeholder there.

We can know which type it will be from the URL. This will make messages list less jumpy, more organized (same height for all external link previews) and reduce a lot of scrolling handling.

@susnux @ShGKme @Antreesy

@Antreesy Antreesy modified the milestones: 8.18.0, 8.18.1 Sep 12, 2024
@susnux susnux modified the milestones: 8.18.1, 8.19.0, 8.20.0, 8.19.1 Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug Something isn't working feature: richtext Related to the richtext component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Scroll to bottom" does not scroll all the way
3 participants