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

Show Originals: Function on blogs on Tumblr Patio UI #1377

Merged
merged 2 commits into from
Apr 29, 2024

Conversation

marcustyphoon
Copy link
Collaborator

@marcustyphoon marcustyphoon commented Jan 20, 2024

Description

This improves and cleans up the code that Show Originals uses to determine what mode to apply to a timeline, making it treat user blogs viewed in the in the "Tumblr Patio" feature preview the same way it treats the blog view modal.

Specifically:

  • Blog timelines are detected by parsing the timeline property instead of assuming anything in a blog view container is a blog. The regex is specific enough to exclude single post views, so extra code is not needed to exclude them.
  • "Channel" timelines are excluded by checking for the post compose bar above them.
  • Disabled blog checking is simplified by ordering the "where am I" code.

Testing steps

Confirm that Show Originals inserts its control element and functions on:

Confirm that Show Originals does not insert its control element on:

@marcustyphoon
Copy link
Collaborator Author

(I suppose I could get cute and have each Patio tab remember its Show Originals mode state separately, using the id attributes on the things. Would have to fall back to not doing that in case those ids go away, though, and also is that really worth the extra code? Probably not.)

@marcustyphoon marcustyphoon merged commit 3345aa3 into AprilSylph:master Apr 29, 2024
2 checks passed
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.

2 participants