[Project] Blacklist redesign
Sindrake opened this issue · comments
These are the design notes of sorts for the blacklist redesign project.
Due to its size and complexity, it will consist of multiple pull requests.
The main purpose of this project is to port re621's blacklist implementation to vanilla e621, extending it to apply to posts and thumbnails on all pages.
Primary Features
Redesign
Status: In Progress
Description:
![](https://private-user-images.githubusercontent.com/132787557/297524058-73cebd4a-f70d-4477-b34c-44b505a84de5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE4NzMxNzgsIm5iZiI6MTcyMTg3Mjg3OCwicGF0aCI6Ii8xMzI3ODc1NTcvMjk3NTI0MDU4LTczY2ViZDRhLWY3MGQtNDQ3Ny1iMzRjLTQ0YjUwNWE4NGRlNS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzI1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcyNVQwMjAxMThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT05NGNkNTY1NzAxNGQwMTEyNzY1MDE0YjZmZmVkMjU0OTBmNjZkYzFiYmZmY2ZlNTlkZjNkNGFlMWZkYjY4NTg5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.KGr6WDxnjMGeYcNF5zgg7ms0RrCwA9MUD-0GtHHib_o)
Sidebar
The blacklist UI in the sidebar had been made more clear and easy to use.
Before, it was not immediately obvious to some users that the crossed-out filters were disabled.
Muting the colors where appropriate, and adding checkboxes that reflect the filter's state, should help with that.
Additionally, the number of posts next to the blacklist header updates dynamically when individual filters are enabled or disabled, and reflects the total number of posts that had been hidden by the blacklist.
Inline
The inline blacklist UI looks more or less the same as before.
Under the hood, it is identical to the sidebar UI, just with some style changes.
Metatags
Status: Not Started
Description:
The table below lists the available metatags.
Blue checkmarks indicate previous functionality, green ones – tags that had been added in this PR.
"Equality" indicates an exact match: score:100
.
"Comparison" is relative: score:>100
.
"Range" supports a range of values: score:50..100
.
Equality | Comparison | Range | |
---|---|---|---|
id | ☑️ | ✅ | ✅ |
status | ☑️ | ||
rating | ☑️ | ||
type | ✅ | ||
width | ☑️ | ✅ | ✅ |
height | ☑️ | ✅ | ✅ |
filesize 1 | ✅ | ✅ | ✅ |
score | ☑️ | ☑️ | ✅ |
favcount | ✅ | ✅ | ✅ |
fav:me 2 | ☑️ | ||
user | ☑️ | ||
userid | ☑️ | ✅ | ✅ |
username | ✅ | ||
pool | ✅ | ||
tagcount | ✅ | ✅ | ✅ |
1 filesize
accepts both numerical values, or ones in kb
or mb
2 fav:me
can only refer to the user's own favorites, same as before.
Secondary Features
Persistence
Status: In Progress
Description:
Previous blacklist implementation could only save its state between different pages as all or nothing: either all filters are disabled, or all are enabled.
Now, if an individual filter is disabled on one page, it will remain disabled on another.
"Enable All Filters" clears the saved filter states on all pages. Additionally, the script will check that the filters in the disabled list actually still exist on startup, to prevent entries from getting stuck in the list despite being removed from the blacklist.
![](https://private-user-images.githubusercontent.com/132787557/295255445-93885b44-ac80-4b24-ab66-d21014e990db.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE4NzMxNzgsIm5iZiI6MTcyMTg3Mjg3OCwicGF0aCI6Ii8xMzI3ODc1NTcvMjk1MjU1NDQ1LTkzODg1YjQ0LWFjODAtNGIyNC1hYjY2LWQyMTAxNGU5OTBkYi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzI1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcyNVQwMjAxMThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT02NWE0ZWE5MTNlNWUxNjI2MjI3NmRhMjdmM2JmYmRkM2QwYjljM2FkYTJiNzMzODAyN2NjODEzZjk5YWMzNGZiJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.CacYUeL8tImA3NqWSjxL6YoKgniNwcTiSKSFtY7ubOU)
Search page
User disables some filters on the search page.
Post page
When the user navigates to a post page, the same filters will remain disabled.
Comments
Status: In Progress
Description:
The blacklist supports a comment syntax, both inline and standalone.
Anything after the #
symbol will be ignored by the blacklist.
All of the following are valid:
horse male solo # will remove later
rainbow lizard #scaliespe`
# artists I hate:
##### break #####
Tertiary Features
Quick Edit Form
Status: Awaiting approval
Description:
![](https://private-user-images.githubusercontent.com/132787557/297527964-4545a608-e003-4934-a17e-089e8b7fc302.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE4NzMxNzgsIm5iZiI6MTcyMTg3Mjg3OCwicGF0aCI6Ii8xMzI3ODc1NTcvMjk3NTI3OTY0LTQ1NDVhNjA4LWUwMDMtNDkzNC1hMTdlLTA4OWU4YjdmYzMwMi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzI1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcyNVQwMjAxMThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yOGEyMDExNjMzNDVkN2NiN2UwN2I4Mzg3NDA1ZDYyNmVjMDUxY2MwMTkxZjZhOWEwNDQ4Y2I5OTkwNjU5MmIwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.9D3u8_eWFAtlmZpgCMoL3oKdLH4hH46r91ySTxCnIZE)
The quick edit form used to be fairly small and ugly. The actual textarea used to be just 263x138 pixels in size.
That is quite unacceptable – quite a few of my blacklist entries wouldn't fit on one line.
In addition to increasing its size, proper padding had been added to the form's elements.
The large blacklist editor on the settings page was also increased in size, since before it could only fit 5 lines at most by default.
Reveal-on-Click
Status: Awaiting approval
Description:
Very simply, is the post had been blacklisted, clicking on the placeholder image reveals it without disabling any filters.