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

Hide Access Report banner on teacher homepage #54862

Merged
merged 6 commits into from
Nov 14, 2023
Merged

Conversation

TurnerRiley
Copy link
Contributor

@TurnerRiley TurnerRiley commented Nov 13, 2023

Undoes the changes made in this PR (which shows the access report banner). Ideally for the future, we could put this behind a DCDO flag to not have to manually add/remove this code when we want to toggle the banner.

Previously showed banner on teacher homepage

BANNER_SHOW

No longer shows banner

BANNER_NO_SHOW

Links

Jira ticket: here
Previous PR where banner was shown: here

Testing story

Tested locally.

@TurnerRiley TurnerRiley requested a review from a team November 13, 2023 19:52
/* We are hiding the Census banner to free up space on the Teacher Homepage (November 2023)
* when we want to show the Census banner again remove the next line
*/
showCensusBanner = false;
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 little surprised it lets you do this. To me, changing the value of a prop (sort of) feels really confusing. What do you think about using a different variable.

Naming is a bit tricky. I'd lean towards forceHideCensusBanner = true but that would require line 80 to change to useState(showCensusBanner && !forceHideCensusBanner), which might be a little confusing. You could instead you a variable like censusBannerAllowed = true (not a big fan of this name, feel free to suggest others) then update line 80 to be useState(showCensusBanner && censusBannerAllowed).

Thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Totally agree! Good call, yes I'll update!

@TurnerRiley TurnerRiley merged commit 3ac9c5c into staging Nov 14, 2023
2 checks passed
@TurnerRiley TurnerRiley deleted the hide-census-banner branch November 14, 2023 21:10
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