Danbooru

Danbooru 2 Issues Topic

Posted under General

This topic has been locked.

worldendDominator said:

Why though? It's useful.

While it's not exactly the same thing, I added domain statistics for my DisplayPostInfo script (topic #15926). It's limited in that it doesn't include every single post for an artist, however it can show the statistics for up to 200 posts of an artist on every page of results. It's more flexible though in that it can be used on any type of post query, to include copyrights or user uploads.

evazion said:

Site update

Changes
  • History pages:
    • Added highlighting of changes made to notes and artist commentaries.
    • Added status columns for summarizing changes made by the edit.
  • Notes:
    • Embedded notes now automatically resize their text when the image is resized. This means that embedded notes will fit better on mobile, but the text inside will be smaller in order to fit. Translators using embedded notes should check that their notes look right on mobile. Usually embedded notes will need a larger font size than normal to still look good on mobile.
  • Artists:
    • Removed the list of most-used domains from artist profiles.
    • Renaming an artist no longer automatically renames the artist's wiki page. Aliases will still automatically move the wiki page, but manually renaming an artist won't.
  • Post disapprovals:
    • Moved the disapprovals index from /moderator/post/disapprovals to /post_disapprovals.
    • Made the disapprovals page visible to all users.
    • Made disapprover names visible to mods only (not to other approvers).
  • Related tags: using related tags on a *_(cosplay) tag now includes tags for the base character tag.
  • Blacklists: removed ability for mods to blacklist uploaders by name with user:<name>. uploaderid:<userid> still works.
Fixes
  • Fixed Pixiv uploads not working for new https://i-f.pximg.net urls.
  • Fixed error when editing artist entries containing a bad Pawoo source.
  • Fixed it being possible for unprivileged users to vote on forum posts inside mod-only forum topics.
  • Fixed wildcards not working on the wiki search page when searching by title.
  • Fixed autocomplete removing linebreaks between tags.
API Changes
  • HTML: removed the .category-N CSS classes from tags. These were used for tag colors in some (but not all) places. Now .tag-type-N is used in all places instead.
  • You can now use the only param to include extra data associated with the main record. For example, you can use /posts.json?only=id,rating,tag_string,notes,uploader,parent,children,notes,comments[creator,updater] to fetch posts along with the uploader, the parent post, child posts, notes, and comments (including the comment creator and updater).
    • For the list of things you can use with the only param, refer to available_includes in this commit. Mostly anything with an ID field works, subject to certain limitations.
  • The following fields are no longer returned by the API:
    • /artists.json: creator_id and urls.
    • /artist_urls.json: artist.
    • /comments.json: creator_name and updater_name.
    • /notes.json: creator_id, creator_name, and updater_name.
    • /pools.json: creator_id and creator_name.
    • /posts.json: uploader_name, children_ids, and pixiv_ugoira_frame_data.
    • /post_appeals.json: is_resolved.
    • /post_versions.json: updater_name.
    • /uploads.json: uploader_name.
    • /users.json: can_comment_vote?
    • For most things you can use the only param (described above) to get these fields if you need them. For example, if you need artist urls, you can use /artists.json?only=id,name,urls to include the full list of urls. If you need a creator or updater, you can use only=creator or only=updater.
    • The creator_id field has been removed entirely from artists, notes, and pools. This field was incorrect in many cases. You can find the creator by looking up the first version in the version history instead.

Full changelog: https://github.com/danbooru/danbooru/compare/production-2020.02.04-053324-utc...production-2020.02.19-041512-utc

Please keep children_ids

evazion said:

  • Notes:
    • Embedded notes now automatically resize their text when the image is resized. This means that embedded notes will fit better on mobile, but the text inside will be smaller in order to fit. Translators using embedded notes should check that their notes look right on mobile. Usually embedded notes will need a larger font size than normal to still look good on mobile.

This appears to be affecting all notes. Also, requiring font size to be too large on desktop to get adequate size on mobile seems like a solution worse than the problem.

  • Artists:
    • Removed the list of most-used domains from artist profiles.

Seconding worldendDominator, this was useful information.

    • Renaming an artist no longer automatically renames the artist's wiki page. Aliases will still automatically move the wiki page, but manually renaming an artist won't.

If an artist has a wiki, it can't be manually renamed at all, it raises an error. Even if this was working correctly, this seems like a substantial removal of functionality. What was the reasoning behind it? Why does the artist wiki page exist apart from the artist entry at all?

evazion said:

  • Notes:
    • Embedded notes now automatically resize their text when the image is resized. This means that embedded notes will fit better on mobile, but the text inside will be smaller in order to fit. Translators using embedded notes should check that their notes look right on mobile. Usually embedded notes will need a larger font size than normal to still look good on mobile.

I think this broke custom backgrounds of embedded notes. If <div class="bg">… is used, the custom background doesn’t fill the whole note anymore; it only fills the note horizontally but not vertically, leaving the pale yellow default background above and below the note text.

Embedded notes also seem to have zero transparency now. Not sure if that was intentional.

Arcana55 said:

This appears to be affecting all notes.

This is a bug that will be fixed.

Also, requiring font size to be too large on desktop to get adequate size on mobile seems like a solution worse than the problem.

The font size doesn't have to be overly large. Take a looks at what I did on post #3786999. The font is still readable for me on my mobile device, and the text isn't overly large for my desktop either.

kittey said:

I think this broke custom backgrounds of embedded notes. If <div class="bg">… is used, the custom background doesn’t fill the whole note anymore; it only fills the note horizontally but not vertically, leaving the pale yellow default background above and below the note text.

This is part of an ongoing process with issue #4281. It's transitioning to where box attributes other than background color can be applied to the entire box, such as rotations and rounded borders.

Embedded notes also seem to have zero transparency now. Not sure if that was intentional.

This is intentional for the same reasons as mentioned above, i.e. background colors will soon be settable by the user, so non-transparent boxes are desired so that they don't conflict with the text below. To counteract this, the transparency has been doubled when editing notes, with hovering over the notes restoring the full opacity so that the user can get an idea of what it will look like once it's saved.

Edit:

Created issue #4302 for the note resizing bug.

Updated

Arcana55 said:

Seconding worldendDominator, this was useful information.

See my earlier post on forum #163274 where I mention a userscript that can partially restore that capability.

As for why it was removed, I'll quote you the commit message.

commit #a6f1161:

Remove the list of most-used source domains from artist summaries. This took up a lot of space and usually wasn't very useful. It was also slow. We had to calculate this on every artist tag search so we could display it in the Artist tab, even though usually the user didn't open the tab.

----------------------------------------------------------------------------------

Arcana55 said:

If an artist has a wiki, it can't be manually renamed at all, it raises an error. Even if this was working correctly, this seems like a substantial removal of functionality. What was the reasoning behind it? Why does the artist wiki page exist apart from the artist entry at all?

As for the not being unable to rename artist entries, that is a bug that will be fixed. For right now though, you can rename the wiki first, and then the artist.

As for why they wikis and artists were separated as far as naming goes, I'll quote you the commit message.

commit #ef3188a:

This also changes it so that renaming an artist entry doesn't automatically rename the corresponding wiki page. This had bad behavior when there was a conflict between wiki pages (the wikis would be silently merged, which usually isn't what you want). It also didn't warn about wiki links being broken by renames.

Edit:

Created issue #4303 for the artist renaming bug.

Updated

evazion said:

  • Notes:
    • Embedded notes now automatically resize their text when the image is resized. This means that embedded notes will fit better on mobile, but the text inside will be smaller in order to fit. Translators using embedded notes should check that their notes look right on mobile. Usually embedded notes will need a larger font size than normal to still look good on mobile.

Arcana55 said:

This appears to be affecting all notes. Also, requiring font size to be too large on desktop to get adequate size on mobile seems like a solution worse than the problem.

BrokenEagle98 said:

This is a bug that will be fixed.

If it works, why is it not a feature? Some images are too large to be viewed in the reduced resolution and tell what's going on. Sizing note content was a matter of choosing which case to neglect when that happened.

Edit:
I just noticed that the width doesn't scale properly, so I guess it isn't really working right now. That seems like a relatively simple fix, though.

Updated

"only=is_favorited" not work in /posts.json

example:

/posts.json?limit=1&page=1&only=id,created_at,is_favorited&login=[username]&api_key=[api-key]

response:

[
  {
    "id": 3798021,
    "created_at": "2020-02-25T01:45:34.798+08:00"
  }
]

"is_favorited" field no longer supported?

onlymash said:

"only=is_favorited" not work in /posts.json

example:

/posts.json?limit=1&page=1&only=id,created_at,is_favorited&login=[username]&api_key=[api-key]

response:

[
  {
    "id": 3798021,
    "created_at": "2020-02-25T01:45:34.798+08:00"
  }
]

"is_favorited" field no longer supported?

What are you trying to do?

If you want all posts with at least a favorite, you can use favcount:>0. If you want all posts you favorited, you can use fav:<username> (example: fav:onlymash). ordfav:onlymash if you want them ordered by fav date.

onlymash said:

"is_favorited" field no longer supported?

Is favorited is not an attribute, but a method, and that method in particular ends with a question mark. Use the following which works.

only=is_favorited?

Site update

Changes
  • Notes:
    • You can move notes by clicking on them and using the arrow keys.
    • You can resize notes by clicking on them and using shift+arrow keys.
    • Embedded note boxes can be rotated, can have custom background colors, and can have rounded edges. This is done by adding a <div> tag with the "note-box-attributes" class, like this:
    • <div class="note-box-attributes" style="transform: rotate(45deg); background-color: red; border-radius: 25px"></div>.
  • Reworked curated posts:
    • Removed the curated pool.
    • Removed super voters.
    • Added a curated posts page at /explore/posts/curated.
    • Added an order:curated metatag. Example: arknights order:curated. This will be slow unless constrained to small searches.
    • Curated posts are the most favorited posts by contributor-level users (that is, users with unrestricted uploads permission).
    • In practice, curated is similar to popular, except safe posts and lower scoring posts having a somewhat better chance of showing up.
Fixes
  • Fixed dates on the popular posts page not respecting your time zone.
  • Fixed the next week button on the popular posts page only advancing by one day, not by one week.
  • Fixed the noter:<name> metatag not working in tag searches.
  • Fixed the newpool:<name> metatag not working during tag editing.
  • Fixed the note versions page showing size/dimension changes even when they didn't change.
  • Fixed notes having their font size reduced when it wasn't intended.
  • Fixed the artist commentary history page throwing an error when the post didn't have any commentary.
API Changes

Full changelog: https://github.com/danbooru/danbooru/compare/production-2020.02.19-041512-utc...production-2020.02.25-065212-utc

Updated

evazion said:

Site update

Changes
  • Notes:
    • Embedded note boxes can be rotated, can have custom background colors, and can have rounded edges. This is done by adding a <div> tag with the "note-box-attributes" class, like this:
    • <div class="note-box-attributes" style="transform: rotate(45deg); background-color: red; border-radius: 25px"></div>.

For the embedded notes thing, it's recommended that you make the element with the "note-box-attributes" class be its own separate empty element. Otherwise for something like the the rotations will be applied twice, first to the box, and then to the element. Leaving it empty means that those attributes can be specified without affecting the rest of the note. The example from the quote above is a good example.

Edit:

As an example, I made pretty good use of the new box attributes to great effect on post #3796170.

Updated

Asahina_Mikuru said:

When loading the original pictures, it's not fitting to window width correctly.

What do you mean? I just tried it out myself and it works just fine. More information would be helpful, including any screenshots demonstrating the issue.

I kept getting this error when I tried to write a feedback:

Error

wrong number of arguments (given 0, expected 1)
Details

ArgumentError exception raised
app/models/user_feedback.rb:24:in `visible'
app/controllers/user_feedbacks_controller.rb:17:in `show'

Edit: Sorry, the feedback page is now flooded with my attempts at it. Can anyone delete those except the first one? Trying to edit it brought up same error.

Updated