Commit Graph

13 Commits

Author SHA1 Message Date
evazion
363cf2014b views: fix deprecated calls to ViewComponent#with_variant. 2022-04-13 00:18:53 -05:00
evazion
77515915a4 uploads: change loading indicator for upload widget.
Change the loading indicator from a progress bar to a spinner. Fixes
issue with the <progress> element having a different appearance on
different browsers.
2022-02-18 03:39:08 -06:00
evazion
f54fac74c8 Add image icon next to thumbnail size dropdown menu. 2022-02-17 20:31:59 -06:00
evazion
0b8d042c06 uploads: allow changing thumbnail size on My Uploads / All Uploads pages.
* Add a "Size" menu to the My Uploads / All Uploads pages to allow
  changing the thumbnail size.
* Make the My Uploads / All Uploads pages use the same thumbnail size as
  the post index page.
* Change the "Gallery | Table" links on the My Uploads page to icons.
2022-02-16 16:39:28 -06:00
evazion
ba29794e89 comments, forum posts: add 'Copy Link' action to '...' menu.
Add a 'Copy Link' action to forum posts and comments. This copies the
full link to the clipboard. The 'Copy ID' action copies just the DText
shortlink (comment #XXX or forum #XXX).
2022-01-13 13:10:41 -06:00
evazion
a7dc05ce63 Enable frozen string literals.
Make all string literals immutable by default.
2021-12-14 21:33:27 -06:00
evazion
65c560c2d7 view components: silence with_variant deprecation warnings. 2021-09-20 01:12:14 -05:00
evazion
07e23204b6 rubocop: fix various Rubocop warnings. 2021-06-17 04:17:53 -05:00
evazion
fee7ed506b comments: put sticky option in popup menu instead of in edit form.
Put the option to sticky a comment in the "..." popup menu instead of
in the comment edit form. This makes it more consistent with deleting or
undeleting a comment.

Also fix a bug where the comment undelete icon didn't show up due to a
typo.
2021-03-07 20:13:38 -06:00
evazion
e1ef94faf7 sources: factor out 'Fetch source data' box into view component. 2021-02-26 01:24:30 -06:00
evazion
ffdd5e6128 posts: make post votes work the same way as comment votes.
Change post votes to work the same way as comment votes:

* Make the upvote arrow blue if you've upvoted the post, or grey if you
  haven't. Likewise for the downvote arrow.
* Make it so you can click the upvote or downvote arrows to undo the vote.
* Don't show any notices when you vote on a post.

Also fix it so that votes work the same way on the posts page, the
comments page, and in the modqueue. Before it wasn't possible to undo
votes on the comments page or in the modqueue.
2021-01-29 02:21:08 -06:00
evazion
07bdc6eab0 comments: rework thresholded comments.
Previously thresholded comments were hidden completely. You had to click
the "Show X hidden comments" button to unhide all hidden comments in a
thread. Now it works like this:

* When a comment is below your threshold, the comment text is hidden and
  replaced by a `[hidden]` link, which you can click to unhide the comment.

* When a comment is at half your threshold (for example, your threshold
  is -8 but the comment is at -4), then the comment is greyed out.

This means that comments aren't completely hidden, they're just
collapsed, so you can see the commenter and the score without unhiding
the comment. It also means you don't have to scroll back up to unhide a
comment, and threads aren't disrupted by comments being secretly
hidden (which is confusing when people are replying to hidden comments,
which forces you to go back up and unhide to find).
2021-01-19 04:07:33 -06:00
evazion
1b30b71a07 posts: refactor post previews to use ViewComponent.
Refactor the post preview html to use the ViewComponent framework. This
lets us encapsulate all the HTML, CSS, and helper methods for a UI
component in a single place.

See https://viewcomponent.org.
2021-01-14 21:17:57 -06:00