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(ui): ribbon others tab flickering resolved #3745

Merged
merged 3 commits into from
Oct 14, 2024

Conversation

rahulnayanegali
Copy link
Contributor

close #3744

This PR addresses the flickering issue in the Ribbon component's 'Others' tab. The problem was caused by unnecessary re-renders triggered by the ResizeObserver. The fix implements useMemo for the fake toolbar content to prevent unnecessary re-creation and optimizes the ResizeObserver usage to reduce unnecessary updates.

To test:

  • Open http://localhost:3002/sheets/.
  • Observe the 'Others' tab in the Ribbon, especially when resizing the window.
  • Verify that the tab remains stable without constant flickering.

Pull Request Checklist

  • Related tickets or issues have been linked in the PR description (or missing issue).
  • Naming convention is followed (do please check it especially when you created new plugins, commands and resources).
  • Unit tests have been added for the changes (if applicable).
  • Breaking changes have been documented (or no breaking changes introduced in this PR).

@univer-bot univer-bot bot added the qa:untested This PR is ready to be tested label Oct 14, 2024
Copy link

github-actions bot commented Oct 14, 2024

View Deployment

📑 Examples 📚 Storybook
🔗 Preview link 🔗 Preview link

Copy link
Member

@jikkai jikkai left a comment

Choose a reason for hiding this comment

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

LGTM

@jikkai jikkai removed the qa:untested This PR is ready to be tested label Oct 14, 2024
@jikkai jikkai merged commit bc8bfb6 into dream-num:dev Oct 14, 2024
8 of 9 checks passed
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.

[Bug] Ribbon 'Others' tab flickering due to ResizeObserver
2 participants