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

Various post version fixes #4369

Merged
merged 3 commits into from
Apr 4, 2020
Merged

Conversation

BrokenEagle
Copy link
Collaborator

Fixes #4364, fixes #4365, fixes #4366.

  1. Alternate post versions HTML format

    Converts the column Tags and places all of the current state of the post at that time (to included unchanged tags) into it. It also supports tag categories and was partially based off of the display for comments.

    Adds an additional column Edits and lists only the actual items that were added and removed for that particular post version. It also does away with the "+" and "-" to facilitate ease in copying. Finally, it brings back the "obsolete" category for the "subsequent" and "previous" views.

    Current

    image

    The "previous" mode does not have any additional comparisons to make against since those are the comparison values, so it has no "obsolete" category. No tag changes are shown on the "New" versions even though the tags are new, since that would just be a doubling up of the information found in the tags column.

    Previous

    image

    Since the "current" mode is most like the old presentation of the post versions, it is now the new default mode for that model. Besides those, it also fixes the post drill-down link in the Versions column to also include the type parameter.

  2. Add additional Search operators

    The is_new parameter is a more user friendlier version of the versions parameters with a focus on the first versions. The tag_matches parameter facilitates searching for a single tag, which it partially enforces by taking the first non-whitespace block of text as input. Searching for one or more tags would require doing a tag split on the "tags" parameter in the SQL, something which would undoubtedly cause it to fail for even single tag searches.

  3. Advanced search parameters

    Clicking the "Advanced search" link will retain all of the current search parameters. This was left off the secondary menu link because it may be desired to return to quickly return to a fresh search state.

- "Current" is now most like the old format
-- It is therefore now the default for post versions
- Only show the actual edits in their own column
- Show the current state at that version in another column
- On the "previous" view, don't double-show full list of tags for
  the first post versions, so leave edits blank
- Tag matches allows a user to search for a single tag
-- Since testing for multiple tags would require converting the "tags"
   string to an array which would most likely fail even for single tags
- Is new for quick searching of uploads or not uploads
@BrokenEagle BrokenEagle changed the title Varous post version fixes Various post version fixes Mar 28, 2020
@evazion evazion merged commit 8773c7e into danbooru:master Apr 4, 2020
@evazion
Copy link
Member

evazion commented Apr 4, 2020

Converts the column Tags and places all of the current state of the post at that time (to included unchanged tags) into it.

I'm skeptical of this. I think in most cases showing the full unchanged state will be distracting and will take up a lot of space.

The is_new parameter is a more user friendlier version of the versions parameters with a focus on the first versions.

The version field is known to be wrong in some cases. Some posts start with version 2 and don't have a version 1.

The tag_matches parameter facilitates searching for a single tag, which it partially enforces by taking the first non-whitespace block of text as input. Searching for one or more tags would require doing a tag split on the "tags" parameter in the SQL, something which would undoubtedly cause it to fail for even single tag searches.

This isn't necessarily going to do what people expect. Something like search[tags_like]=comic&search[added_tags]=translated means "find posts that were tagged comic when the translated tag was added" not "find posts that are currently tagged comic and have had the translated tag added". The former finds cases when translated was added after comic, but not when it was added before comic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants