Commit Graph

172 Commits

Author SHA1 Message Date
Krzysztof Kotlarek 9ce29ad013 FIX: register customOptions as select kit filter (#14933)
* FIX: register customOptions as select kit filter

We are allowing plugins to define custom filters which are added to CUSTOM_USER_SEARCH_OPTIONS const. However, we need to have static placeholder for custom filters, so those props will be passed, and we can use it later.

* fix
2021-11-17 17:12:19 +11:00
Joffrey JAFFEUX 904d509cce FIX: ensures minimum tags logic is correct and shared (#14723)
Also fixes a bug where select-kit was not updating noneItem in multi-selects.
2021-11-12 14:04:48 +01:00
Joffrey JAFFEUX d18e3a45b9 FIX: none row doesn’t have a value, use class to target it (#14659) 2021-10-20 13:07:58 +02:00
Joffrey JAFFEUX 00e8baffa2 FIX: attempts to enforce caret position in filter (#14589) 2021-10-13 08:19:34 +02:00
Penar Musaraj 9235e2ad5d A11Y: Fix several minor issues (#14436) 2021-09-24 11:52:07 -04:00
Penar Musaraj 8cef6dabb5 A11Y: Add labels to some search fields, category notification selector (#14430) 2021-09-23 14:52:34 -04:00
Penar Musaraj c52513c445 A11Y: Add more descriptive labels for some dropdowns (#14402) 2021-09-21 11:19:49 -04:00
Penar Musaraj c13127b024 A11Y: Use listbox role for dropdowns (#14391) 2021-09-21 09:31:40 -04:00
Joffrey JAFFEUX 0dd28cdd95 DEV: observes used properties in reason text (#14389) 2021-09-20 14:56:33 +02:00
Krzysztof Kotlarek e3793e6d7c FIX: better filter for groups search (#14262)
Follow up of https://github.com/discourse/discourse/pull/14216

Allow plugins to register custom filter with block
2021-09-08 09:38:45 +10:00
Krzysztof Kotlarek f859fd6bde FEATURE: allow plugins to extend Groups (#14216)
* add_permitted_group_param API for plugins
* add groups-interaction-custom-options outlet
* custom search can use custom group scope
2021-09-06 10:18:51 +10:00
Joffrey JAFFEUX d3be77a0d1 DEV: toggle sk on click (#14243) 2021-09-03 18:29:16 +02:00
Joffrey JAFFEUX 142120753f DEV: prevents focus event bubbling (#14241) 2021-09-03 16:41:15 +02:00
Joffrey JAFFEUX 36a81435cf DEV: simplify logic when selecting an undefined value (#14225) 2021-09-03 16:40:20 +02:00
Joffrey JAFFEUX d2eef423c3 DEV: prevents broken tests due to focus bubbling (#14223) 2021-09-02 18:30:52 +02:00
Joffrey JAFFEUX f66217c0b3 DEV: updates popperjs 2.0.6 -> 2.9.3 (#14163) 2021-08-26 16:37:04 +02:00
Penar Musaraj 85b8fea262 UX: Add Styling step to wizard (#14132)
Refactors three wizard steps (colors, fonts, homepage style) into one new step called Styling.
2021-08-25 17:10:12 -04:00
Joffrey JAFFEUX a230362f65 FIX: sk3 wizard regressions (#14120) 2021-08-23 19:57:42 +02:00
Joffrey JAFFEUX 691d1bde54 FIX: do not focus after search if dropdown is collapsed (#14118) 2021-08-23 19:33:50 +02:00
Joffrey JAFFEUX cb59681d86 DEV: select-kit third major update with focus on accessibility (#13303)
Major changes included:
- better support for screen readers
- trapping focus in modals
- better tabbing order in composer
- alerts on no content found/number of items found
- better autofocus in modals
- mini-tag-chooser is now a multi-select component
- each multi-select-component will now display selection on one row
2021-08-23 10:44:19 +02:00
Jarek Radosz e68c1d5ba5 DEV: Use key over the deprecated keyCode (#13795)
Makes the code a bit more readable. Inspired by https://github.com/emberjs/ember.js/pull/19185
2021-08-09 11:41:36 +02:00
Andrei Prigorshnev f79eb207a6 FIX: Don't show the Tis Weekend option in date pickers on Sundays 2021-07-26 08:57:29 +08:00
Andrei Prigorshnev 814781780d FIX: Don't show the Later This Week option in date pickers on Sundays 2021-07-26 08:55:18 +08:00
Joffrey JAFFEUX 519528daa2 FIX: allows to use icon-picker in wizard (#13786)
- inlines dasherize helper in sk
- uses an ajax helper to load wizard's ajax lib when in wizard
- amends wizard's ajax lib to work with string as first arg
- disabled loading spinner in wizard as it's not available
2021-07-21 13:49:21 +02:00
Gerhard Schlager 9c8645b9e1 FIX: Don't downcase "all groups" in dropdown
Because this doesn't make sense in languages other than English
2021-07-13 20:29:07 +02:00
Bianca Nenciu 5bff65aa69 FIX: Do not show invalid option in flair chooser (#13725)
Both of the commits in this PR are meant to fix the problem of invalid
option being shown in the flair chooser. An invalid option can be shown
if at some point it was a valid one - a group with a flair that was
later changed by an admin and flair was removed. The other option an
invalid option can be selected is if the user had a primary group when
the migration ran and copied the same value to the flair_group_id
column.

* FIX: Set flair_group_id only if group has flair

Follow up to 4ba93aac66.

* FIX: Do not show invalid option in flair chooser

If selected flair group became unavailable because the flair was removed
then the option would still be selected and visible as an ID only.
2021-07-13 19:22:39 +03:00
Bianca Nenciu 87c1e98571 FEATURE: Let users select flair (#13587)
User flair was given by user's primary group. This PR separates the
two, adds a new field to the user model for flair group ID and users
can select their flair from user preferences now.
2021-07-08 10:46:21 +03:00
Penar Musaraj 48f36d43eb DEV: Remove duplicate filterable option in tag-drop (#13640)
Has no effect and raises a console deprecation warning.
2021-07-05 14:42:17 -04:00
Jarek Radosz aa56e2a758 DEV: Don't use the Ember global (#13535) 2021-06-29 19:54:18 +02:00
Kris cd9941e0ca UX: more consistent setting/edit buttons (#13276) 2021-06-03 18:33:36 -04:00
Jarek Radosz 869518e3d2 FEATURE: Show all categories in composer (#13213)
…and just prioritize the current one, instead of hiding other categories.

Context: when you open the composer by clicking "New Topic" button when in a category, or by clicking "New Topic" in the share-popup, the category selector shows only the current category and its children (and "Uncategorized"). You can still find other categories, but you have to search by name.
This PR changes that, so you now can see all the categories in the dropdown, and those that are relevant (again: current, children and uncategorized) are displayed before all other categories.

tldr: don't make choosing other categories harder - make choosing relevant ones easier.
2021-05-31 20:50:23 +02:00
Faizaan Gagan 8085fc6d39 DEV: add an option in user-chooser to list staged users (#13201)
* DEV: add an option in user-chooser to list staged users

* included rspec tests

* force boolean
2021-05-31 12:02:32 -04:00
Kris f78fa76847 UX: change categories page dropdown to a wrench (#13154) 2021-05-26 12:53:52 +10:00
Mark VanLandingham 72950e051c Add category breadcrumbs to edit category page (#13126) 2021-05-25 13:40:11 -05:00
Josh Soref 59097b207f DEV: Correct typos and spelling mistakes (#12812)
Over the years we accrued many spelling mistakes in the code base. 

This PR attempts to fix spelling mistakes and typos in all areas of the code that are extremely safe to change 

- comments
- test descriptions
- other low risk areas
2021-05-21 11:43:47 +10:00
Kris a532e64389 DEV: Some select-box headers don't need a class (#12992)
* DEV: Some select-box headers don't need a class

* remove duplicate class
2021-05-20 16:00:45 +10:00
Martin Brennan 72648dd576 FIX: Base topic details message on current category and tag tracking state (#12937)
The user may have changed their category or tag tracking settings since a topic was tracked/watched based on those settings in the past. In that case we need to alter the reason message we show them otherwise it is very confusing for the end user to be told they are tracking a topic because of a category, when they are no longer tracking that category.

For example: "You will see a count of new replies because you are tracking this category." becomes: "You will see a count of new replies because you were tracking this category in the past."

To do this, it was necessary to add tag and category tracking info to current user serializer. I improved the serializer code so it only does 3 SQL queries instead of 9 to get the tracking information for tags and categories for the current user.
2021-05-06 09:14:07 +10:00
Andrei Prigorshnev e7de943b5d FIX: hide "Next Week" in future-date-input on Sundays (#12918) 2021-05-03 09:22:05 +02:00
Jarek Radosz 2dfa1a267e FIX: TagDrop uses currentCategory now (#12786) 2021-04-21 21:46:52 +02:00
Martin Brennan e3b1f5721b FIX: Enforce tag group count validation before sending to review queue (#12728)
There is a category setting that enforces 1 or more tags must be added to a topic from a specific tag group before creating it. This validation was not being run before the topic was being sent to a review queue for categories that have that setting enabled.

There was an existing validation in `TopicCreator` but it was not correct; it was only validating when the tags did _not_ exist and also only happened on `create`. I now run the validation in `TopicCreator.valid?`

I also improved the error message shown to the user when they have not added the tags required (showing the tag names from the tag group), and changed the composer tag selector to not show "optional" if there are N tags required from a certain group.
2021-04-19 09:43:50 +10:00
Andrei Prigorshnev 8c6ea967ae FEATURE: Show the slow mode indicator in composer (#12720) 2021-04-17 23:40:09 +04:00
Penar Musaraj 35f977f8a5 UX: Prevent some composer buttons from receiving focus (#12719) 2021-04-16 11:10:02 -04:00
Roman Rizzi 8339b8f412 FEATURE: Make the tag_groups#search endpoint public. (#12643)
The method uses the "TagGroup#visible" method to respect the tag group visibility settings.
2021-04-08 14:23:13 -03:00
Joffrey JAFFEUX 081ada090c UX: shows a hint when there are more tags than displayed (#12649) 2021-04-08 15:51:31 +02:00
Osama Sayegh c9923a3e3e UX: Composer actions menu header should display the icon of selected action (#12449)
See a video of the change in the PR: https://github.com/discourse/discourse/pull/12449.
2021-03-19 17:48:43 +03:00
Kris 83519e7f3a FEATURE: Always show tag dropdown when tagging is enabled (#12209) 2021-03-10 21:13:15 -05:00
Osama Sayegh 0f807ba85b UX: Allow select-kit to have an autofocus option (#12183)
On some modals the main/primary input field is a select-kit component (like `{{email-group-user-chooser}}` on the assign modal), so it makes sense to allow select-kit to steal focus on modals like these. This PR adds an `autofocus` option (default false) that allows select-kit to steal focus when it's rendered.
2021-02-23 13:20:32 +03:00
Joffrey JAFFEUX d0d54bbead A11Y: deselect focused choice when using enter in multi-select (#12165) 2021-02-22 14:34:31 +01:00
Joffrey JAFFEUX 47835ade9a UX: implements a new tags-intersection-chooser (#12139) 2021-02-19 13:46:02 +01:00
Bianca Nenciu d89c5aedbe FIX: Fix subcategory, tag drops and none values (#11934)
* FIX: Generate correct URLs for category and tag drops

* DEV: Remove unused properties

* FIX: No subcategory and tag filter did not work
2021-02-16 17:54:24 +02:00