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

Teacher Tool: Max Count for Catalog Criteria #9986

Merged
merged 6 commits into from Apr 25, 2024

Conversation

thsparks
Copy link
Contributor

This change allows us to specify a maximum count for catalog criteria, which defines how many instances a user is allowed to have for a given catalog criteria. It also removes the attempted auto-detection of whether or not we should allow multiple instances (which was based the presence of parameters), since that didn't work well for criteria like "Must have [count] comments". If the field is not set, we assume no max.

I decided to go with a max count rather than a simple allowMultiple boolean, because I thought it might be useful to have some criteria where multiple instances are allowed, but not an unlimited number of them. (For example, I've limited the copilot questions to a max of 10, since they're expensive.)

I've also removed "All function definitions have comments" per feedback in microsoft/pxt-microbit#5597

@thsparks thsparks requested a review from a team April 25, 2024 18:30
@thsparks thsparks changed the title Teacher Tool: Max Count Flag for Catalog Criteria Teacher Tool: Max Count for Catalog Criteria Apr 25, 2024
Copy link
Contributor

@eanders-ms eanders-ms 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!

return (
<div className={css["catalog-item-label"]}>
<div className={css["action-indicators"]}>
{canAddMore ? (
{isMaxed ? (
<span className={css["max-label"]}>{Strings.Max}</span>
Copy link
Contributor

Choose a reason for hiding this comment

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

Not seeing a scss change. Did the max-label class already exist?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. This just isn't needed or used. I'll remove it.

@thsparks thsparks merged commit 8ae9fd2 into master Apr 25, 2024
6 checks passed
@thsparks thsparks deleted the thsparks/teachertool/max_count_flag branch April 25, 2024 23:41
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

2 participants