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

Carousel: Refactor CarouselAnnouncer #32896

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

Mitch-At-Work
Copy link
Contributor

Previous Behavior

CarouselAnnouncer was driven via state, causing unnecessary re-renders.

New Behavior

CarouselAnnouncer driven by event updates that directly modify DOM.

@fabricteam
Copy link
Collaborator

fabricteam commented Sep 23, 2024

📊 Bundle size report

✅ No changes found

@Mitch-At-Work Mitch-At-Work marked this pull request as ready for review September 23, 2024 18:44
@Mitch-At-Work Mitch-At-Work requested review from a team as code owners September 23, 2024 18:44
Copy link
Member

@layershifter layershifter left a comment

Choose a reason for hiding this comment

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

@Mitch-At-Work Mitch-At-Work marked this pull request as draft September 24, 2024 16:44
@fabricteam
Copy link
Collaborator

fabricteam commented Sep 24, 2024

Perf Analysis (@fluentui/react-components)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 646 647 5000
Button mount 307 301 5000
Field mount 1131 1135 5000
FluentProvider mount 711 729 5000
FluentProviderWithTheme mount 82 84 10
FluentProviderWithTheme virtual-rerender 36 37 10
FluentProviderWithTheme virtual-rerender-with-unmount 77 82 10
MakeStyles mount 876 860 50000
Persona mount 1773 1797 5000
SpinButton mount 1403 1392 5000
SwatchPicker mount 1627 1664 5000

@Mitch-At-Work Mitch-At-Work marked this pull request as ready for review September 24, 2024 20:35
@Mitch-At-Work Mitch-At-Work marked this pull request as draft September 24, 2024 20:49
@Mitch-At-Work Mitch-At-Work force-pushed the user/mifraser/carousel-announcer-refactor branch from ab21ee6 to f81cca8 Compare September 24, 2024 22:18
@Mitch-At-Work Mitch-At-Work force-pushed the user/mifraser/carousel-announcer-refactor branch from f81cca8 to 79ac345 Compare September 24, 2024 22:23
@Mitch-At-Work Mitch-At-Work marked this pull request as ready for review September 24, 2024 23:12

const announcementText = announcement(activeIndex, totalNavLength.current, navGroupRef.current);

if (announcementTextRef.current === '') {
Copy link
Member

Choose a reason for hiding this comment

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

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.

3 participants