fix(Tweaks): Mobile menu notification badge transition#1958
Open
marcustyphoon wants to merge 7 commits intoAprilSylph:masterfrom
Open
fix(Tweaks): Mobile menu notification badge transition#1958marcustyphoon wants to merge 7 commits intoAprilSylph:masterfrom
marcustyphoon wants to merge 7 commits intoAprilSylph:masterfrom
Conversation
This reverts commit 5aa4320.
3893967 to
ddf20f9
Compare
This file contains hidden or 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
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.
Description
As noted in #1945 (comment), if a tweak should hide the notification badge on the mobile menu, there is a brief moment where it's visible and then animates out right when it is added to the page, i.e. when the page is resized down through the mobile layout breakpoint.
This does pretty much what that comment suggested to prevent this: right when the badge element is added to the page, the transition CSS is removed. Also, to prevent the injected function from taking longer than usual if this occurs between zero and ten seconds from the page load, it is injected once as a module side effect to warm the injected function cache.
Testing steps
I have a test commit to simulate the badge naturally appearing/disappearing, but looking at it I don't think this code would really interact with it at all, so I think it must have been more relevant when I was trying something else that wound up not working or not being necessary.