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

Tweaks: Apply badge hiding to PWA #1584

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

marcustyphoon
Copy link
Collaborator

@marcustyphoon marcustyphoon commented Aug 19, 2024

Description

The "Hide the Home/Following unread count" tweak removes the count in question not only from the sidebar badge and mobile menu badge, but from the page title. This count shows up in another place, though: the badge on the icon when Tumblr is installed as a progressive web app (in certain setups). This removes that badge, too.

For background information about PWA badges, see https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/How_to/Display_badge_on_app_icon.

Testing steps

Following a second account which is logged in in another browser or profile makes generating following-feed activity on demand easier if one wants to test this.

  • Install XKit Rewritten on Chrome/Edge on macOS or Windows (per MDN; I used Chrome on macOS). Check out this PR; refresh any open Tumblr tabs in the chosen browser (active tabs without this code will break it).
  • Follow the prompts to install Tumblr as a progressive web app.

  • Open the PWA and wait (on a non-dash page) until there's a visible new posts badge.
  • Enable the "Hide the Home/Following unread count" tweak.
  • Confirm that the PWA badge disappears along with the sidebar badge and count in the page title.

  • Optionally, unrevert the test commit.
  • Open the PWA and enable the "Hide the Home/Following unread count" tweak.
  • Wait (on a non-dash page) until the new post count increments; this is easier to see with the test commit, but you can also observe the title or badge in inspect element.
  • Confirm that the PWA badge does not reappear.
  • Disable the "Hide the Home/Following unread count" tweak.
  • Confirm that the PWA badge reappears eventually (the next time the count would update).

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