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

ref(tour): Remove isAvailable state #87805

Merged
merged 2 commits into from
Mar 25, 2025
Merged

Conversation

malwilley
Copy link
Member

@malwilley malwilley commented Mar 24, 2025

While refactoring part of the tour state to include callbacks, I realized that isAvailable doesn't actually need to be stateful. To me it makes more sense to control this from outside the tour component. I can't find any reason for why it needs to be part of the component state, but let me know if I'm missing something.

For issue details I extracted the logic into useIssueDetailsTourAvailable() which is used to determine whether or not to start the tour.

@malwilley malwilley requested a review from a team as a code owner March 24, 2025 21:42
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 24, 2025
Copy link
Member

@leeandher leeandher left a comment

Choose a reason for hiding this comment

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

Good call! removing as much as possible out of the context makes it easier to understand, I don't think anything internally relied on isAvailable anyway. Thanks these are all great changes!

@malwilley malwilley merged commit fa492ef into master Mar 25, 2025
39 checks passed
@malwilley malwilley deleted the malwilley/ref/tour-is-available branch March 25, 2025 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants