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 setup code to call into selecttab #75

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

keithamus
Copy link
Member

@keithamus keithamus commented Feb 16, 2024

The setup code in the connectedCallback is quite similar to selectTab, except that selectTab focuses and dispatches events. If we guard those with a flag that is only true after the first initial setup, it means we can share the logic, which means that changes to the logic don't need to happen in two places, and it'll be less error prone. It also more effectively conveys the concept of what the setup code is doing: selecting a tab.

Review with whitespace changes removed

@keithamus keithamus marked this pull request as ready for review February 16, 2024 12:25
@keithamus keithamus requested a review from a team as a code owner February 16, 2024 12:25
@keithamus keithamus force-pushed the refactor-setup-code-to-call-into-selecttab branch from 6191a4d to a83a574 Compare February 16, 2024 12:29
@keithamus keithamus merged commit 04cd36e into main Feb 16, 2024
1 check passed
@keithamus keithamus deleted the refactor-setup-code-to-call-into-selecttab branch February 16, 2024 14:47
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.

2 participants