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

FEATURE: Add option to lock leaderboard view to default period #179

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

s3lase
Copy link
Contributor

@s3lase s3lase commented Jan 2, 2025

Follow up #178

For some leaderboards, filtering by time period might be unsuitable. This change introduces the option to disable the period chooser in the UI.

Screenshot 2025-01-14 at 11 16 56 AM Screenshot 2025-01-02 at 9 04 27 PM

For some leaderboards, filtering by time period might be unsuitable. This change
introduces the option to disable the period chooser in the UI.
@s3lase s3lase force-pushed the feature/option-to-disable-period-chooser branch from c7942a8 to 17cd9db Compare January 2, 2025 21:30
Comment on lines +163 to +170
<form.Field
@name="period_filter_disabled"
@title={{i18n "gamification.leaderboard.period_filter_disabled"}}
@showTitle={{false}}
as |field|
>
<field.Checkbox @value={{field.value}} />
</form.Field>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is there a clean way to achieve an inline label with the checkbox without breaking out of form-kit?

Screenshot 2025-01-02 at 9 12 02 PM

Setting the @showTitle argument on the field generates the following, but it lacks the optional tag and does not match the styling of a standard form label. Could I style it myself? Yes! But I wanted to confirm whether this isn’t possible out of the box first.

Screenshot 2025-01-02 at 9 14 08 PM

Copy link
Contributor

Choose a reason for hiding this comment

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

@chapoi what should we do in this case?

@s3lase s3lase marked this pull request as ready for review January 14, 2025 11:19
@s3lase s3lase requested a review from xfalcox January 14, 2025 11:20
@s3lase s3lase merged commit d56018d into main Jan 16, 2025
6 checks passed
@s3lase s3lase deleted the feature/option-to-disable-period-chooser branch January 16, 2025 11:56
@s3lase
Copy link
Contributor Author

s3lase commented Jan 16, 2025

Thanks @xfalcox

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants