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: Don't lose SummaryBox state through widget re-renders. #24020

Merged
merged 2 commits into from Oct 19, 2023

Conversation

romanrizzi
Copy link
Member

The <SummaryBox /> component state will get lost when scrolling to the bottom of a topic. Due to the widget being re-rendered, it will go back to the collapsed state, and we need to fetch the summary again.

This change moves all the state updates to the postStream model, which also refreshes the widget to keep it updated.

@romanrizzi romanrizzi force-pushed the summary_box_state branch 2 times, most recently from 688ddc9 to d78b573 Compare October 19, 2023 14:14
@romanrizzi romanrizzi changed the title DEV: Update user-passkeys formatDate helper lookup (#24018) FIX: Don't lose SummaryBox state through widget re-renders. Oct 19, 2023
The `<SummaryBox />` component state will get lost when scrolling to the bottom of a topic. Due to the widget being re-rendered, it will go back to the collapsed state, and we need to fetch the summary again.

This change moves all the state updates to the `postStream` model, which also refreshes the widget to keep it updated.
Copy link
Member

@davidtaylorhq davidtaylorhq left a comment

Choose a reason for hiding this comment

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

Looks good to me 👌 I left one non-blocking comment with a refactoring idea

@romanrizzi romanrizzi merged commit a72e5fa into main Oct 19, 2023
13 checks passed
@romanrizzi romanrizzi deleted the summary_box_state branch October 19, 2023 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants