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

Postblock: Make options UI items links if possible #719

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

Conversation

marcustyphoon
Copy link
Collaborator

@marcustyphoon marcustyphoon commented Aug 22, 2022

User-facing changes

  • Postblock's options UI links to posts you have blocked, so you can tell what they actually are if you want to unblock them. Posts that have not been seen since this upgrade won't have links, since we didn't store the required information previously.
  • When viewing a single blocked post in /blog/view, there is a visual indicator with an unhide and unblock button instead of, you know, nothing.

Technical explanation

A map* of post ID -> blog UUID entries is stored as a separate storage entry, rather than migrating the blocked posts list to e.g. an array of [id, ?uuid]. You could definitely do the latter, but that kind of thing requires a bit of thinking to ensure you correctly migrate old entries and don't have race conditions.

*I unapologetically call POJO records "maps." Sue me.

Issues this closes

discussion #402

@marcustyphoon
Copy link
Collaborator Author

Uhhhhhhh. Is this impossible now? Can you no longer go to a post on a blog given the blog UUID and post ID?

@marcustyphoon
Copy link
Collaborator Author

Yeah, it looks to me like you can go to https://www.tumblr.com/@t:UUIDGOESHERE and https://www.tumblr.com/blog/view/t:UUIDGOESHERE/, but cannot append /POSTID or /post/POSTID to either one.

@AprilSylph
Copy link
Owner

Shit, really? What happens if you do? (Mainly want to see if it ends up on a Redpop 404 page; if it does, my redirection code handling this is busted but can probably be fixed.)

@marcustyphoon
Copy link
Collaborator Author

Oh, I guess that's a silly reason to abandon this; it can just look up the blog name via an API request before navigation. Well, not "just," actually, since we can't access apiFetch from a settings panel. But it's solvable.

@marcustyphoon marcustyphoon marked this pull request as ready for review February 16, 2023 01:49
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