Skip to content

fix(Tweaks): Mobile menu notification badge transition#1958

Open
marcustyphoon wants to merge 7 commits intoAprilSylph:masterfrom
marcustyphoon:mobile-menu-animation-3
Open

fix(Tweaks): Mobile menu notification badge transition#1958
marcustyphoon wants to merge 7 commits intoAprilSylph:masterfrom
marcustyphoon:mobile-menu-animation-3

Conversation

@marcustyphoon
Copy link
Collaborator

@marcustyphoon marcustyphoon commented Oct 31, 2025

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

  • Ensure that, without tweaks, your account has a visible mobile menu badge.
  • Enable the hide following/community/activity tweaks so that the badge is hidden.
  • Open a new Tumblr tab in the desktop viewport width, count to ~5, and resize the window down to the mobile layout. Confirm that no mobile menu badge appears.
  • Open a new Tumblr tab in the desktop viewport width, count to ~15, and resize the window down to the mobile layout. Confirm that no mobile menu badge appears.
  • Confirm that toggling the tweaks in question off and on makes the mobile menu badge appear/disappear.

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.

@marcustyphoon marcustyphoon self-assigned this Nov 7, 2025
@marcustyphoon marcustyphoon force-pushed the mobile-menu-animation-3 branch from 3893967 to ddf20f9 Compare November 25, 2025 13:22
@marcustyphoon marcustyphoon marked this pull request as ready for review November 25, 2025 13:36
@marcustyphoon marcustyphoon removed their assignment Nov 25, 2025
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.

1 participant