-
Notifications
You must be signed in to change notification settings - Fork 13
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
[Plugin] April Fools Languages joke #197
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Also store original page contents.
The spec from this PR is available at https://preview.sesh.rs/previews/eecs485staff/primer-spec/197/. (Available until Mon Aug 15 2022.) |
@noah-weingarden if you are interested and have bandwidth, I'd appreciate if you could check out this PR! Feel free to comment with other ideas and suggestions too :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
I've been meaning to include something like this in Primer Spec for years now 😅 (It started with a small "Project 6" prank on eecs485.org, and then expanded to a Halloween-themed prank on eecs485.org.)
In #157, I introduced a limited-edition
spooky
theme that will only appear around Halloween. My design goals:This PR introduces an April Fools gag using the same design goals. This PR also introduces a way for website admins to opt-out of showing these jokes if they really don't want them 😛
April Fools Languages
This PR adds a "Language selector" popover to all Primer Spec pages around April Fools, from March 29 until April 3.
The language popover appears next to the settings icon:
Clicking the toggle button opens a popover with a language-dropdown. We assume that the page's language is in English:
The language-dropdown provides three other options: Pig Latin, Pirate, and Upside Down:
Here's what the page looks like after selecting "Upside Down":
Notice how the language-selection only affects the main content. Website viewers can easily revert the changes either by clicking "English" in the language-selector or by refreshing the page. (The "language" setting isn't persisted.)
Validation
PR Preview website: https://preview.sesh.rs/previews/eecs485staff/primer-spec/197/
Visit any page in the PR preview website above, then add
?enable_april_fools_languages=1
to the end of the URL. For example:Future plans
I would ideally like to introduce three more April Fools jokes with different premises. Then, we could cycle between the jokes each year — students in 4-year university programs would get to see a different joke each year!