Commit Graph

23 Commits

Author SHA1 Message Date
Osama Sayegh a23d0f9961
UX: Add image uploader widget for uploading badge images (#12377)
Currently the process of adding a custom image to badge is quite clunky; you have to upload your image to a topic, and then copy the image URL and pasting it in a text field. Besides being clucky, if the topic or post that contains the image is deleted, the image will be garbage-collected in a few days and the badge will lose the image because the application is not that the image is referenced by a badge.

This commit improves that by adding a proper image uploader widget for badge images.
2021-03-17 08:55:23 +03:00
Joshua Rosenfeld 07b728c5e5
FEATURE: add noindex header to badges, groups, and /my pages (#9736) 2020-05-11 15:05:42 +10:00
Sam Saffron 30990006a9 DEV: enable frozen string literal on all files
This reduces chances of errors where consumers of strings mutate inputs
and reduces memory usage of the app.

Test suite passes now, but there may be some stuff left, so we will run
a few sites on a branch prior to merging
2019-05-13 09:31:32 +08:00
Sam Saffron 45285f1477 DEV: remove update_attributes which is deprecated in Rails 6
See: https://github.com/rails/rails/pull/31998

update_attributes is a relic of the past, it should no longer be used.
2019-04-29 17:32:25 +10:00
Guo Xiang Tan c1bf707e7d PERF: N+1 queries on badges page. 2018-03-19 14:36:09 +08:00
Sam fab3e25101 FIX: badge selector showing up for anon 2017-10-30 16:21:31 +11:00
Guo Xiang Tan 77d4c4d8dc Fix all the errors to get our tests green on Rails 5.1. 2017-09-25 13:48:58 +08:00
Arpit Jalan bf2c35aa99 FEATURE: add RSS feed for badge pages 2017-08-09 13:43:49 +05:30
Guo Xiang Tan 5012d46cbd Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
Aashaka Shah 402eaaa773 FEATURE: add og tags to metadata in individual badges page 2017-04-06 09:32:53 +05:30
cpradio 4b71fd253b Advanced Search UI
Properly support Categories so it updates the search box correctly

Use category id, as it is more consistent with search results than using the slugs, especially for parent/subcategory

Added Status

Improve AutoComplete so it can receive updates
Added the ability for AutoComplete to receive updates to badge-selector and group-selector

Respect null, which is set via web-hooks

Support both # and category: for category detection.

Only update the searchedTerms if they differ from its current value (this helps the Category Selector receive updates)

Opt in receive updates (#3)

* Make the selectors opt-in for receiving updates

* Opt-in to receive updates

* Fix category detection for search-advanced-options

Fix eslint error

Update user-selector so it can receive updates live too
Make the canReceiveUpdates check validate against 'true'

Converted to use template literals

Refactor the regex involved with this feature
Split apart the init to make it a bit more manageable/testable

Switch the category selector to category-chooser, so it is a dropdown of categories instead of auto-complete

Reduce RegEx to make this happier with unicode languages and reduce some of the complexity
2016-10-04 11:18:01 -04:00
Sam ed750cac39 FIX: if badges are disabled badge pages should 404 2016-03-29 17:21:32 +11:00
Sam f555bbb416 FEATURE: long descriptions for badges to help teach people 2015-02-27 17:19:18 +11:00
Sam c8284170ad FEATURE: badge grouping UI
FIX: not loading more badges on badge show page
2014-07-18 15:46:36 +10:00
Sam bfb37054e8 Badge Grouping work in progress 2014-07-17 16:11:10 +10:00
Sam e347eea629 FEATURE: show user what badges they have 2014-07-16 17:55:08 +10:00
Sam 88469721b9 FEATURE: Allow admins to disable specific badges 2014-07-14 17:40:36 +10:00
Sam 5a28609afc FIX: listable badges need more logic 2014-07-03 20:34:26 +10:00
Sam 6bbb083d47 FEATURE: support "unlisted" badges. 2014-07-03 17:44:36 +10:00
Vikhyat Korrapati 41ecba1b77 Mark badge notification as read when the notification is clicked. 2014-06-19 16:56:19 +05:30
Vikhyat Korrapati a8e2c5e616 Use PreloadStore for the badge pages. 2014-04-28 10:30:50 +05:30
Vikhyat Korrapati 3136217fc1 Add badge page. 2014-04-17 01:57:57 +05:30
Vikhyat Korrapati acfcf0b64e Add /badges route that lists all defined badges. 2014-04-16 18:42:06 +05:30