XKit-Rewritten icon indicating copy to clipboard operation
XKit-Rewritten copied to clipboard

PostBlock: Block posts instantly (minor)

Open marcustyphoon opened this issue 3 years ago • 5 comments

Concept

PostBlock should be able to use the storage architecture that Seen Posts uses as of #523 to process posts instantly when soft navigating. This seems a bit ironic, as the comment in that post describing how the implementation ought to work describes it as "PostBlock-like."

marcustyphoon avatar Dec 04 '22 07:12 marcustyphoon

Now that I think about it, this could also be done by adding a data attribute to every post with its root id and making a css selector that hides the root ids the user has blocked (the way notificationblock does it).

I don't think it really matters which way one does it. This way would perform slightly better when blocking or unblocking a post, I guess (no need to touch every post with classList.add/remove), but does it matter?

marcustyphoon avatar Dec 08 '22 07:12 marcustyphoon

Now that I think about it, this could also be done by adding a data attribute to every post with its root id and making a css selector that hides the root ids the user has blocked (the way notificationblock does it).

I like this idea, I think it could really cut down on how many times the DOM is touched.

alleycatboy avatar Dec 09 '22 03:12 alleycatboy

Also it seems like there's an awful lot of processing going on in checking and adding/removing classes that may or may not already be there for every single post on the dashboard.

alleycatboy avatar Dec 09 '22 03:12 alleycatboy

Yep. Of course, it presumably makes the CSS engine have to do more work, which has to be done a lot more often then blocking/unblocking a post, which is done, you know, basically never :D But I'm constantly surprised at how unreasonably fast CSS layout engines seem to be.

marcustyphoon avatar Dec 09 '22 03:12 marcustyphoon

This issue is unconfirmed, and has been labelled as stale due to inactivity. It will be closed automatically if no further activity occurs.

A project maintainer can mark an issue as confirmed by adding the help wanted label, the wontfix label, or an assignee.

stale[bot] avatar Jan 08 '23 03:01 stale[bot]