feat: Show controls when hiding a post on its permalink page#2132
Conversation
This comment was marked as off-topic.
This comment was marked as off-topic.
|
Co-Authored-By: April Sylph <28949509+AprilSylph@users.noreply.github.com>
|
Could probably remove the button text override and just set it to "View post" unconditionally, really. This would go along with removing the ability to disable (I wrote these all in to be able to use the utility in the Mute feature, which has a mode where it hides an entire timeline with an informational message like this. It probably makes sense to export the UI at a lower level for this and handle any complexity in Mute, rather than adding a bunch of complexity to this code path, I imagine.) |
|
Ugh, just found a slight regression from #719 in testing this PR: unblocking a post via the control panel doesn't visibly unblock the post on its permalink page anymore. Before: post is hidden, then becomes visible when unblocked |
AprilSylph
left a comment
There was a problem hiding this comment.
I guess it's still valid to request it be fixed in this PR, since the same regression is built into the util that supersedes the PostBlock-specific functionality.
|
That aside, I do want to say that the new util file is absolutely beautiful. |
|
A minor annoyance I've noticed while fixing that: if you have a filtered post hidden on a permalink page, you click "view post" to unhide the post, which shows you a filtered post (reasonable)... but then when you click "view post" in the filtered post it gets hidden by our util again, so you have to click one more time. So I guess... oh, this is easy to fix; check for controlledHiddenAttribute. |
Additional testing steps:
|
AprilSylph
left a comment
There was a problem hiding this comment.
I don't like that a single post hidden for multiple reasons shows two signposts at the same time, which must both be dismissed before the post becomes visible.
I'm not entirely sure what I want to happen instead, though. Maybe CSS that hides a signpost when preceded by another signpost, so that they become layered instead?
i.e. "This post contains filtered tags or content." → View post → "This post is hidden by PostBlock." → View post → (The post)
|
Oh, if I'd thought of that as an implementation method for the layering I probably would have done it, yeah. I think that's an improvement on showing both. Not quite as elegant as combined text, but as mentioned I don't think that's worth implementing and I don't have any better ideas at the moment. |
AprilSylph
left a comment
There was a problem hiding this comment.
I think this is a regression from 78c4300: the util no longer behaves correctly on restarting the addon.
Post is collapsed with signpost → restart XKit Rewritten → post is shown
This comment was marked as outdated.
This comment was marked as outdated.
I guess technically the copy could be edit: Hm, this would be a util rewrite. Maybe I'll try it at some point. It's too bad you can't use |
Co-Authored-By: April Sylph <28949509+AprilSylph@users.noreply.github.com>
AprilSylph
left a comment
There was a problem hiding this comment.
Works the way I want it to! Huge UX improvement.
Do you still daily-drive master? I was thinking I could give you the weekend to beta-test this, and then do a release on Monday.
|
I do indeed daily-drive master*, though I don't really use any of the post-hiding utils regularly. Still, may as well see if anything explodes. *haha uh... plus a bunch of additional random junk like #1625. |
Description
Originally posted by @AprilSylph in #677 (comment)
Resolves #2029.
Semi-blocked by #719 (these should both have consistent appearance, so whichever of them is reviewed first should be approved before working on the other).Here's an experiment that moves our basic "hide this post" logic into a util and, as discussed above, implements a controls element instead of a mysterious blank space if the post is being viewed on its permalink page. UI copied from #677 (which probably can't actually use this without some more refactoring, but oh well) / #719. I'm not sure if it actually handles blog colors very well; I haven't looked at it in ages.
Features may specify the message for the modal; if they don't, posts are simply never hidden on permalink pages, again as discussed above.
If I did this correctly, it should work if a post is hidden by multiple utils, and there shouldn't be lifecycle bugs even in that case.
outdated
Updated appearance, from #719:
Testing steps