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: Block posts instantly (minor) #894

Open
marcustyphoon opened this issue Dec 4, 2022 · 5 comments · May be fixed by #898
Open

PostBlock: Block posts instantly (minor) #894

marcustyphoon opened this issue Dec 4, 2022 · 5 comments · May be fixed by #898
Assignees
Labels
enhancement New feature or request

Comments

@marcustyphoon
Copy link
Collaborator

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 marcustyphoon added the enhancement New feature or request label Dec 4, 2022
@alleycatboy alleycatboy linked a pull request Dec 6, 2022 that will close this issue
@marcustyphoon
Copy link
Collaborator Author

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?

@alleycatboy
Copy link
Contributor

alleycatboy commented Dec 9, 2022

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
Copy link
Contributor

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.

@marcustyphoon
Copy link
Collaborator Author

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.

@stale
Copy link

stale bot commented Jan 8, 2023

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 stale bot added the stale Marked for closure due to inactivity label Jan 8, 2023
@AprilSylph AprilSylph linked a pull request Jan 8, 2023 that will close this issue
@AprilSylph AprilSylph removed the stale Marked for closure due to inactivity label Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants