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

Add "Hide Done" Option for Tutorials #10248

Merged
merged 5 commits into from
Oct 31, 2024
Merged

Conversation

thsparks
Copy link
Contributor

Addresses https://github.com/microsoft/pxt-minecraft/issues/2539 (though that tutorial will still need a content update).

This adds a "hideDone" flag that can be set on a tutorial to indicate that the Done button should not be shown on the final step.

Also added tests for hideDone and hideToolbox (which I added in 9e6dd9e). Not sure how much value they bring beyond parsing validation, but I suppose that's better than nothing!

Vertical Sidebar:
NoDoneVertical

Horizontal Top-bar:
NoDoneHorizontal

@thsparks thsparks requested a review from a team October 29, 2024 22:12
@@ -23,6 +23,7 @@ interface TutorialContainerProps {
hasTemplate?: boolean;
preferredEditor?: string;
hasBeenResized?: boolean;
hideDone?: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm a bit torn about this. I see that we created shortcuts for other tutorialOptions.metadata fields before, but I'm not sure of the benefit here. Since we're adding hideDone to the metadata, could we just grab it from the tutorial options? The hideDone flag definitely belongs in the metadata, but it feels a bit different to me than the other metadata fields that we decided to pass directly into the TutorialContainer. I don't feel strongly about this, especially for this case, but I wanted to bring it up to have a conversation of if there are things that we want to customize about tutorials in the future, should we add an optional prop to the TutorialContainer, or should we leave it in the tutorialOptions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm okay to just read it from metadata (which is already passed in), so I'll make that change.

I could see a theoretical argument towards making TutorialContainer useable without all our tutorial & tutorial metadata classes, but I don't see that being useful in practicality and it's a moot point anyway since we also already pass in the metadata itself.

@thsparks thsparks merged commit e3e9ec7 into master Oct 31, 2024
6 checks passed
@thsparks thsparks deleted the thsparks/hide_done_option branch October 31, 2024 16:58
thsparks added a commit that referenced this pull request Oct 31, 2024
This adds a "hideDone" flag that can be set on a tutorial to indicate that the Done button should not be shown on the final step.

Also added tests for hideDone and hideToolbox (which I added in 9e6dd9e). Not sure how much value they bring beyond parsing validation, but I suppose that's better than nothing!
thsparks added a commit that referenced this pull request Oct 31, 2024
Port of #10248 (a few merge adjustments needed, but nothing major)

This adds a "hideDone" flag that can be set on a tutorial to indicate that the Done button should not be shown on the final step.
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