-
-
Notifications
You must be signed in to change notification settings - Fork 775
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
Make active CLR rounds togglable #7981
Conversation
b8327dc
to
7fd0ae0
Compare
7fd0ae0
to
bcc3769
Compare
@aamustapha could you cherry-pick your changes and raise a pR |
bcc3769
to
0f44e3f
Compare
@@ -162,6 +162,7 @@ if (document.getElementById('grants-showcase')) { | |||
page: 1, | |||
collectionsPage: 1, | |||
limit: 6, | |||
show_active_clrs: window.localStorage.getItem('show_active_clrs') != 'false', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
false string? seems to me this will be === true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe you should use JSON.parse(window.localStorage.idx_status = 'false')
and also handle when there is not localstorage show_active_clrs to avoid errors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anyway works
default null > true
'false' > false
anything > true
but in general I feel is better when we deal with booleans to keep it booleans
@@ -162,6 +162,7 @@ if (document.getElementById('grants-showcase')) { | |||
page: 1, | |||
collectionsPage: 1, | |||
limit: 6, | |||
show_active_clrs: window.localStorage.getItem('show_active_clrs') != 'false', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe you should use JSON.parse(window.localStorage.idx_status = 'false')
and also handle when there is not localstorage show_active_clrs to avoid errors
Description
Displaying active CLR rounds at the top of the Grant's page helps users to easily navigate to a spceicific CLR round they're interested in. However, in a case where there are several active CLR rounds, probably above 5, the interface easily becomes cluttered up.
This PR adds a toggle functionality to the Active CLR rounds banner at the top of the page.
Refers/Fixes
Testing
https://www.loom.com/share/8bab707e0d80440e9fe3505abda5ca20