Commit Graph

267 Commits

Author SHA1 Message Date
jjaffeux 7e023968b8 DEV: removes superfluous arguments 2020-09-22 16:23:23 +02:00
David Taylor c4aefd5917
REFACTOR: Use core `default_results` function (#111)
This significantly reduces the amount of logic we need to carry in the discourse-assign plugin. One side effect is that I had to rename the 'q' parameter to 'search', so that it matches core's implementation.
2020-09-16 12:18:14 +01:00
jjaffeux 445e94de4c DEV: this is now fixed in core 2020-09-16 11:08:16 +02:00
jjaffeux 6a449367f5 FIX: keeps updateInRegex public 2020-09-15 12:23:08 +02:00
jjaffeux 8192b888d5 FIX: missing conditional 2020-09-15 12:18:53 +02:00
jjaffeux 1cc42e5c9a FIX: makes updates of search term work with core update 2020-09-15 12:02:51 +02:00
jjaffeux bf98811165 FIX: ensures autofocus is working 2020-09-11 16:48:00 +02:00
Ahmed Gagan d9826cc608
FIX: Input helper loosing focus and default selecting 'Everyone' tab in 'group-assigned' tab (#112) 2020-09-11 15:06:37 +01:00
Ahmed Gagan 303274eae3
FEATURE: Advanced search filters for assigned topics (#102)
Adds three new search modifiers:

- in:assigned for assigned topics
- in:unassigned for unassigned topics
- assigned:{username} to list topics assigned to a specific user

These modifiers are all made available in the advanced search sidebar
2020-09-11 12:15:50 +01:00
Ahmed Gagan 3e3dc3815b
FEATURE: Assign bulk actions for topics lists (#110)
- Allows unassigning and reassigning topics using bulk actions
- Adds bulk actions UI to the group assigned page
2020-09-11 11:49:25 +01:00
David Taylor e78537ac46
DEV: Apply prettier 2020-09-09 18:41:42 +01:00
Ahmed Gagan 43c68f6ffd
FEATURE: Allow filtering topics in the user assigned list (#108) 2020-09-09 18:28:14 +01:00
Joffrey JAFFEUX 598c717009
DEV: apply coding standards (#109) 2020-09-04 13:24:23 +02:00
Ahmed Gagan cd31a821fc
UX: Only show assigned tab for groups where all users can assign (#103) 2020-08-28 15:18:25 +01:00
Ahmed Gagan 2fad129af5
UX: Ensure equal margin around topic search box (#106) 2020-08-21 14:39:18 +01:00
Ahmed Gagan b88723a3b1
FIX: Correct sorting issues 2020-08-20 12:07:24 +01:00
Ahmed Gagan 141ef6a882
FIX: Remember sort and topic-search when switching users (#98) 2020-08-14 12:31:34 +01:00
Ahmed Gagan 98bc01be16
UX: Load topic filter results while typing (#101)
This matches the user sidebar filter behaviour
2020-08-14 11:40:23 +01:00
Ahmed Gagan 99c2c48c08
DEV: Refactors following code review (#100) 2020-08-14 11:37:34 +01:00
David Taylor 83ff23c98e
UX: Ensure bottom of usernames/names are never cut off 2020-08-13 17:00:50 +01:00
David Taylor 18284b9a2e
UX: Update group assigned user dropdown styling for mobile 2020-08-13 01:58:46 +01:00
David Taylor 4091211198
UX: New layout for group assigned user sidebar 2020-08-13 01:23:08 +01:00
David Taylor 17bf41e775
UX: Align user and topic search boxes 2020-08-13 00:01:14 +01:00
Ahmed Gagan 069adc1af7
FEATURE: Allow searching topics in group assigned tab (#97) 2020-08-12 23:40:04 +01:00
Ahmed Gagan f250dca93f
FEATURE: Allow filtering users in group assigned tab (#95) 2020-08-12 23:39:14 +01:00
Ahmed Gagan a844da7656
FIX: Refresh members and tab count when assignments change 2020-08-12 23:07:05 +01:00
Kris 7abf37cc78
Update for refactored quick access panels (#96)
Related to 1972364d0f
2020-08-10 16:34:38 -04:00
Ahmed Gagan cb9ca82644
FIX: Remember scroll position in long assigned lists 2020-08-05 13:18:09 +01:00
Ahmed Gagan 050143960c
FEATURE: Link user card from assigned list avatar (#93) 2020-08-05 12:19:20 +01:00
Ahmed Gagan 96c3d9d12e
UX: Scroll to top of assigned list when switching users 2020-08-04 16:26:10 +01:00
Ahmed Gagan 6dbf3e2bcb
FEATURE: Allow sorting assigned topic lists 2020-08-04 15:48:33 +01:00
Penar Musaraj 36adc0b14c
DEV: Switch to CSS custom properties for colors in scss
Preparing the plugin for an upcoming core change. Note that this change
is backwards-compatible.
2020-08-03 12:57:55 -04:00
Ahmed Gagan 301be24c13
UX: Rename group tab from Assignments to Assigned (#88) 2020-07-27 12:26:12 +01:00
Kris 26682ccec4
UX: Improving styling so names/usernames fit better (#86) 2020-07-23 13:13:55 +01:00
Ahmed Gagan cd3e5763d1
UX: Hide group tab when there are no assignments, add everyone count (#83) 2020-07-21 16:26:40 +01:00
Ahmed Gagan 816f3c0e97
FEATURE: Per-member counts in group assignment summary (#80) 2020-07-21 12:55:34 +01:00
Ahmed Gagan 4d5169c445
UX: Remember scroll position in assign lists (#82) 2020-07-21 12:53:26 +01:00
Jarek Radosz 68bebd77f6 DEV: Prettier fix 2020-07-17 18:20:29 +02:00
Ahmed Gagan fa08157e30
UX: Use username/name in group member list according to site setting (#75) 2020-07-17 16:18:17 +01:00
Ahmed Gagan bc26f099fa
FIX: Group assignments dropdown on mobile (#76) 2020-07-14 11:55:07 +01:00
Ahmed Gagan 027d5dd40a
FIX: Resolve missing variable in assigned-topic-list dropdown (#74) 2020-07-13 12:38:04 +01:00
Ahmed Gagan 43759bd8ef
FIX: Group name with capital letter throws 404 error (#73) 2020-07-10 11:33:48 +01:00
David Taylor 48cda7bb79
FIX: Do not raise an error for anon user on group page 2020-07-10 10:20:10 +01:00
Ahmed Gagan ae83f70e21
FEATURE: Assignments summary tab for groups (#70) 2020-07-10 09:45:18 +01:00
Robin Ward f5e53f8d22 FIX: Linting 2020-07-07 11:36:45 -04:00
Robin Ward a991684943 FIX: Add `getURL` back in
I think the failure was unrelated
2020-07-07 11:26:23 -04:00
Sam Saffron c49a1288b2
Revert "Import getURL to fix deprecation warnings (#72)"
This reverts commit e3a6a64193.

This sadly broke our build
2020-07-07 11:43:15 +10:00
Jarek Radosz 1a083e8b88
DEV: Fix the `getURL` deprecation warning (#69) 2020-07-06 17:01:44 +02:00
Mark VanLandingham e3a6a64193
Import getURL to fix deprecation warnings (#72) 2020-07-06 09:27:01 -05:00
Jarek Radosz bc6669150d
FIX: Don't set assign button's height (#71)
"we can't use flex for buttons yet" – now we can, and we do! e71f5e8951

Fixes an issue with assign button height in some themes.
2020-07-03 12:33:59 +02:00
jjaffeux e71bca3bff FIX: removes css hack 2020-05-22 17:03:12 +02:00
jjaffeux 1761f749e1 FIX: doesn't need to be dependant on isPrivateMessage 2020-05-20 15:02:58 +02:00
jjaffeux be6dcfa38d FIX: removes PM check 2020-05-20 14:54:30 +02:00
jjaffeux 705b30c093 UX: always display assign button in dropdown on mobile 2020-05-20 14:07:37 +02:00
jjaffeux cddc0a2eb5 UX: displays avatar instead of icon on desktop 2020-05-19 10:51:20 +02:00
jjaffeux 88f0c37702 FIX: remove icon size height, as it impacts other buttons indirectly 2020-05-13 22:48:59 +02:00
jjaffeux 3df853f5fb FIX: uses same style for mobile PMs than desktop 2020-05-13 11:01:36 +02:00
jjaffeux 8b7f89823d UX: improves assignee display on button and dropdown
- Changes the title attribute to display the name of the assignee
- Displays the assignee’s username in the row when  on mobile view
- Tweaks positioning to attempt good alignment
- Slightly increases icon size to have visually the same size than other topic footer buttons icons
2020-05-12 15:49:13 +02:00
jjaffeux c271178f73 UX: keeps showing icon for more consistency 2020-05-12 09:30:44 +02:00
jjaffeux 2123cfc40e UX: slightly better alignement of the avatar img 2020-05-12 09:02:55 +02:00
Joffrey JAFFEUX af11fdca47
FEATURE: displays assignee avatar in button and dropdown (#66) 2020-05-11 19:02:22 +02:00
jjaffeux c553c039f0 DEV: adds a task action bypassing the modal 2020-05-08 11:53:51 +02:00
David Taylor 07c13651c6
FIX: Correct assign user autocomplete logic
Previously we were only autocompleting users which were in the same group as the acting user.
2020-04-28 13:55:17 +01:00
Justin DiRose 71fe8a54c0
FEATURE: Add 'g a' as keyboard shortcut to assigned list (#64) 2020-04-23 13:03:45 -05:00
Martin Brennan e7d5c88c8b
FEATURE: Add assigned to user to bookmark serializers (#62)
Add assigned to user to bookmark serializers, and also add to JS bookmark model for the route to assigned user.
2020-03-12 15:21:48 +10:00
Penar Musaraj 3675a5e273
DEV: use site settings from container (#60)
This is a bit more robust, site settings are not always injected (for example in raw handlebars templates).
2020-02-25 17:06:54 -05:00
Kris 73ad40cd1d UX: Additional wrapper to fix mobile modal spacing, related to de559f3 2020-02-20 12:35:57 -05:00
Penar Musaraj 11794fd00a DEV: Find/replace deprecated decorators 2020-02-19 11:53:36 -05:00
jjaffeux b302d7566b FIX: prevents crash if assign_allowed_on_groups is empty 2020-01-22 09:50:40 +01:00
jjaffeux 7933a29fa0 FIX: @ember/object is not yet available in stable 2020-01-15 16:06:50 +01:00
Blake Erickson 18d6bcdcbd
FIX: Update topic-list-item to reflect changes in core (#59)
* FIX: Update topic-list-item to reflect changes in core

This PR in discourse core:

https://github.com/discourse/discourse/pull/8589

makes a breaking change in this plugin. This is a fix for it.

* add backwards compatible fix

* Apply prettier fix
2020-01-06 16:39:16 -07:00
romanrizzi c4f878a70c Minor improvements to the assigned-to-filter connector 2019-12-04 16:51:49 -03:00
Joffrey JAFFEUX 2f2cbd1e11 FIX: model might be a POJO and not a post model 2019-12-03 11:51:35 +01:00
Roman Rizzi 3593f9ef67
FEATURE: Filter reviewables by assigned user (#58) 2019-11-25 13:48:09 -03:00
Dan Ungureanu 434605f03f
FIX: Make it compatible with sub-folder installs 2019-11-25 14:53:17 +02:00
Sam Saffron b4d8001dc8 FIX: currentURL is unstable for in route transitions
If you transition just using query params but leave the rest of the route
alone, sometimes router.currentURL will not update.

This in turn causes active not to work correctly.
2019-11-06 16:36:26 +11:00
Sam Saffron 68ff24739b DEV: attempt a more cautious lookup
This was failing the test suite somehow, despite voting using the same
pattern.
2019-11-01 15:26:16 +11:00
Sam Saffron e0de9238a1 FEATURE: new category setting to add "Unassigned" navigation menu
When a category is used exclusively for managing topic assignments it can
be very useful to list all the unassigned topics. This introduces a new
category setting that allows admins to opt for this new navigation item.

It works both on mobile and desktop.

This uses an amended nav item API, to experience this fully you need latest
versions of Discourse.
2019-11-01 14:15:28 +11:00
Sam Saffron bc5469c6c6 Revert "FEATURE: new category setting to add "Unassigned" navigation menu"
This reverts commit 600e1b6544.

The level of hack here is just to high, this destabilizes tests. We need a
proper pattern.
2019-10-30 18:16:12 +11:00
Sam Saffron abc21b7734 Revert "DEV: make pre-initializer a bit safer"
This reverts commit 029a26733a.

This whole experiment is too unstable
2019-10-30 18:13:30 +11:00
Sam Saffron 029a26733a DEV: make pre-initializer a bit safer
Was noticing custom fields could be null is some cases so this ensures we
never reach to it if missing
2019-10-30 17:55:50 +11:00
Sam Saffron ce63380eb5 DEV: Missed running prettier automatically
This is not fixed in my dev environment
2019-10-30 17:07:40 +11:00
Sam Saffron 600e1b6544 FEATURE: new category setting to add "Unassigned" navigation menu
When a category is used exclusively for managing topic assignments it can
be very useful to list all the unassigned topics. This introduces a new
category setting that allows admins to opt for this new navigation item.

It works both on mobile and desktop.

Unfortunately Discourse is lacking internal APIs for cleanly adding NavItems

We will look at improving this soon.
2019-10-30 16:37:13 +11:00
romanrizzi a6df22bb32 DEV: Remove old backward-compatibility code 2019-10-09 15:21:00 -03:00
Kyle Zhao c1c06b8ed6 FIX: do not escape `fancy_title` again. (#50) 2019-09-13 14:32:40 -04:00
romanrizzi 3b2f10a450 Remove fallback PM tag 2019-09-11 17:14:48 -03:00
Roman Rizzi dc6041abcb
DEV: Remove dreprecated review queue code (#47) 2019-09-11 09:51:23 -03:00
Kyle Zhao d18c347cd9 FEATURE: Quick access panel for assignments. (#49)
* FEATURE: Quick access panel for assignments.

* Only enable quick access when core is compatiable.

This ensures that the plugin won't break Discourse instances without the
latest `QuickAccessPanel` feature.
2019-09-09 16:12:14 +10:00
romanrizzi 2d78151481 FIX: Use can_assign instead of staff to show the assign modal correctly 2019-08-04 18:30:28 -03:00
David Taylor 9c72a2f5ca UX: Add "Assigned" to the page title for the assigned topic list 2019-08-02 15:51:14 +01:00
romanrizzi 8114684ed8 Initialize allowedGroups inside the constructor 2019-07-24 12:17:42 -03:00
romanrizzi 65fbdc3396 FIX: remove unused import 2019-07-19 14:55:36 -03:00
romanrizzi 8792cf51bd DEV: Assign allowed groups are sent alongside suggestions. After the migration happens, we'll need to still have access to the allowed group names so we can search users. 2019-07-19 14:49:45 -03:00
Joffrey JAFFEUX 49474c94ea
FIX: uses taskActions api and removes old buttons (#44) 2019-07-19 13:32:08 +02:00
Joffrey JAFFEUX 02c6fa6d24
DEV: uses new topic-button API (#43) 2019-07-19 10:20:55 +02:00
Joffrey JAFFEUX 75c6cecfdb
REFACTOR: old ember patterns, deprecations, dead code (#42) 2019-07-19 09:56:39 +02:00
Bianca Nenciu 22129d191f
UX: In mobile view show button only under topic controls. (#35) 2019-06-25 16:05:09 +03:00
Joffrey JAFFEUX fe80298ae5 FIX: prevents messageBus subscriptions to leak 2019-06-12 10:20:34 +02:00
Roman Rizzi f312ece4a9
Feature: Allow assign on groups (#31)
* Feature: Allow assign on groups

* Use type: group_list option

* Track group changes and update the setting accordingly. Restrict reminders frequency to assign allowed users instead of staff
2019-06-04 09:21:33 -03:00
romanrizzi deea8b59bc FIX: Only show override options to admins 2019-05-27 13:45:54 -03:00
Roman Rizzi abe8142038
FEATURE: Users can override reminders frequency (#30)
* FEATURE: Users can override reminders frequency

* Changes:
- Avoid creating a user custom field when the used didn't override the frequency
- Sanitize frequency value using coercion
- Minor fixes

* Sanitize query and user query single
2019-05-27 10:53:37 -03:00
romanrizzi a0031d596a Remove unused imports 2019-05-15 16:24:14 -03:00
romanrizzi c882b097f8 Remove 'Unassign All' feature 2019-05-15 15:57:28 -03:00
romanrizzi b4148a8858 Fix template indentation 2019-05-13 17:18:36 -03:00
Roman Rizzi 2f5af6e2cb FIX: Add a custom mobile view for the assigned-topics-list (#33) 2019-05-09 10:53:45 +10:00
Régis Hanol 578a7f7b70 UX: slightly more space right to the PM icon 2019-05-07 09:55:22 +02:00
Roman Rizzi e3b2e5bdb6 FEATURE: Display PMs in assigned activity and differentiate them. (#27)
* FEATURE: Display PMs in assigned activity and differentiate them.

* FEATURE: Unassign/Re-assign tasks from the activity view

* Remove bulkAssign. Reuse assign/unassign with a service. Change PM icon position

* Reuse ListItemDefaults instead of duplicating code.

* Conditionally show/hide feature if list items defaults is present in core
2019-05-07 16:30:47 +10:00
Kris 4625108888 FIX: class for wrapper changed 2019-04-19 13:57:09 -04:00
Joffrey JAFFEUX 046f1db466 FIX: adds auto-route to avoid losing queryParams on successive clicks 2019-03-28 11:34:31 +01:00
Joffrey JAFFEUX 0f6faa9fc3 FIX: ember 3 support (#23) 2019-03-15 18:49:41 +01:00
Joffrey JAFFEUX 922d8515ca
FIX: assign state was not correctly updated on mobile (#19) 2018-11-27 17:45:28 +01:00
Bianca Nenciu 16afd2c612 FIX: Check if plugin disabled globally prior to extending JS 2018-11-23 10:53:07 +11:00
Sam 1f938c3f41 FIX: show unassign button on mobile 2018-11-23 09:57:13 +11:00
Sam 312357988f Move message bus subscription into controller
This ensures we always correctly unsubscribe from the channel
2018-11-23 09:44:59 +11:00
Bianca Nenciu a915f0135f FIX: Schedule a rerender on message arrival. (#16) 2018-11-23 09:05:55 +11:00
Penar Musaraj 613cf478a0 Add missing icon 2018-11-07 21:26:27 -05:00
Kris 69c319e81d adding btn-default class 2018-11-06 10:57:56 -05:00
David Taylor 519effe056 DEV: Apply prettier 2018-10-22 19:49:32 +01:00
Kris 11012a7fbd Padding needs to be more specific 2018-10-18 18:03:11 -04:00
Kris edd17c6496 Post alignment update 2018-10-16 13:46:37 -04:00
Kris 7c8ce7d1b3 Slight margin reduction 2018-08-08 22:53:32 -04:00
Sam d58aa482ba FIX: show suppressed categories in assign list 2018-07-23 17:26:05 +10:00
Guo Xiang Tan e1c7869969 UX: Add margin to assign-controls on mobile. 2018-05-24 14:44:13 +08:00
Sam 908972a723 UX: de-emphasize actions on topics 2018-05-24 15:27:44 +10:00
Guo Xiang Tan 22108df6be FEATURE: Display link with count to user's assigned messages page. 2018-05-23 18:16:36 +08:00
Robin Ward 754209ce58 Add "Unassign All" button to user's assigned topics view 2018-05-04 13:41:04 -04:00
Robin Ward 7458b38f71 Remove old `fa-icon` reference 2018-05-04 10:30:02 -04:00
Arpit Jalan c24083df5c Remove 'archive' tab for assigned topics. 2018-03-26 22:49:34 +05:30
Guo Xiang Tan 463f77bb2a FEATURE: Add live updates for "assigned" private messages. 2018-03-07 23:02:13 +08:00
Guo Xiang Tan 13cb64b89c Add title token to assigned messages. 2018-03-07 15:24:41 +08:00
Robin Ward d39c19c166 UX: Allow claim of topic via posts 2018-01-15 12:43:32 -05:00
Robin Ward 2394cf1d75 Allow posts to be claimed on flagged posts view 2018-01-15 12:32:48 -05:00
Robin Ward 6dc8a0dced Remove unused connector class 2018-01-15 12:22:22 -05:00
Robin Ward 569a87b136 FEATURE: New site setting to ensure flags are claimed 2018-01-12 16:09:46 -05:00
Guo Xiang Tan b92988a586
Merge pull request #11 from discourse/split_out_archived_assigned_topics
FEATURE: Add `archive` tab for assigned topics.
2017-12-01 11:29:55 +08:00
Guo Xiang Tan 96361988bf Make eslint happy. 2017-12-01 11:27:16 +08:00
Guo Xiang Tan 81244a6a47 FEATURE: Add `archive` tab for assigned topics. 2017-12-01 11:25:54 +08:00
Joffrey JAFFEUX 7f2e42362f
FIX: support for select-kit (#10)
Moves select-kit support into its own initializer, support for older implementations doesn’t seem needed at this point, but could be added if needed.
2017-11-22 10:42:33 +01:00
Joffrey JAFFEUX 7fd0cd43bf [FIX] allows usage with select-box-kit
This commit also removes usage of observers.
2017-10-20 06:23:31 -07:00
Robin Ward 246de40653 Add new SiteSetting to disable locking of flags when assigned 2017-10-13 10:46:35 -04:00
Robin Ward 1198421261 FIX: Remove debugging return statement 2017-09-26 09:49:51 -04:00
Robin Ward 856c5a5435 FEATURE: Add ability to claim topics on flagged topics page 2017-09-25 12:22:38 -04:00
Robin Ward aa885dcfac FIX: Icon missing in new releases of Discourse 2017-09-25 11:42:13 -04:00
Robin Ward 7ca73b293a FEATURE: Add ability to claim topics on flagged topics page 2017-09-08 15:31:02 -04:00
Rafael dos Santos Silva 1c70a81ac4 FIX: Assign modal was on the wrong path 2017-06-06 15:43:55 -03:00
Rafael dos Santos Silva c16bf207c7 FEATURE: Allow turning off the plugin from settings 2017-06-05 19:45:33 -03:00
Sam 11242a6fd0 fiddle with styling 2017-03-08 16:13:15 -05:00
Sam bfdffdca83 FEATURE: easy assign list 2017-03-08 15:55:07 -05:00
Sam bd5575d975 UX: display small action for assignment/unassignment 2017-03-07 17:13:10 -05:00
Guo Xiang Tan 5666190462 FIX: Incorrect attribute. 2017-03-02 12:24:57 +08:00