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

Refactor: use replaceChildren pattern to create lists #1445

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

Conversation

marcustyphoon
Copy link
Collaborator

Description

As noted in #677 (comment), there are a number of places where we could use replaceChildren to update a list's contents in the DOM all in one go, rather than emptying it, (often) waiting asynchronously for a preference fetch, then adding the desired elements in one-by-one.

The meaningful behavior change resulting from this is that if the code throws or the preference fetch stalls, the old elements are left in place rather than the list becoming blank, which may be a more confusing failure mode.

Testing steps

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.

None yet

1 participant