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

Make active CLR rounds togglable #7981

Merged
merged 3 commits into from
Dec 9, 2020

Conversation

amustapha
Copy link
Contributor

@amustapha amustapha commented Dec 1, 2020

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

@amustapha amustapha force-pushed the abdul/fix/make-active-clrs-collapsible branch from b8327dc to 7fd0ae0 Compare December 1, 2020 14:56
@amustapha amustapha changed the base branch from grants-round-8 to stable December 1, 2020 15:00
@amustapha amustapha force-pushed the abdul/fix/make-active-clrs-collapsible branch from 7fd0ae0 to bcc3769 Compare December 1, 2020 15:04
@amustapha amustapha changed the base branch from stable to grants-round-8 December 1, 2020 15:04
@amustapha amustapha changed the base branch from grants-round-8 to stable December 1, 2020 15:05
@thelostone-mc
Copy link
Member

@aamustapha could you cherry-pick your changes and raise a pR

@amustapha amustapha changed the base branch from stable to grants-round-8 December 3, 2020 10:37
@amustapha amustapha force-pushed the abdul/fix/make-active-clrs-collapsible branch from bcc3769 to 0f44e3f Compare December 3, 2020 11:09
@amustapha amustapha changed the base branch from grants-round-8 to stable December 3, 2020 11:11
@amustapha
Copy link
Contributor Author

@@ -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',
Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

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',
Copy link
Contributor

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

@octavioamu octavioamu changed the base branch from stable to master December 9, 2020 14:02
@octavioamu octavioamu merged commit 55e45f8 into master Dec 9, 2020
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.

5 participants