* WIP
* more messing around
* undos, notes to self
* WIP notes
* completed logic and added tests for existing code and implemented code
* fixed failing tests
* fixed failing tests
* added suggested changes
* added suggested changes
* fix merge
* fix linting issues
* possible flaky test
* removed comment
* further user name display changes
* implemented suggested change
* fixed bug in small action post when assigning or unassigning
* fixed breaking tests
* refactored test
---------
Co-authored-by: Juan David Martinez <juan@discourse.org>
* FEATURE: Add pending assign reminder threshold setting
User can define a threshold for the pending assign reminder.
* DEV: rename REMINDER_THRESHOLD with SiteSetting
This adds a new dropdown to the topic level assign modal. A topic may contain several assignments, the topic itself may be assigned and also some of the replies may be assigned. With this new dropdown, it's possible to edit all the assignments from this modal.
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
Before, we only had buttons for assigning and unassigning topic on
the topic level assign menu. This commit adds dynamic buttons for
unassigning posts to the menu.
Currently, we display a mix of topics and notifications in the user menu
assignments tab. This has a number of issues like having to maintain
hard to understand code instead of simply relying on the notifications
system we have, we can’t display more than one assignment per topic and
it’s not clear if an assignment is for a topic or a post nor if it’s a
group assignment or an individual one.
This patch addresses those issues by relying on the notifications system
we’re using for most of the other user menu tabs instead of a custom
implementation. This led to some heavy refactoring but it was
worthwhile as things are a bit more normalized and easier to reason
about. Instead of serializing topics with different attributes to access
various assignments, we now simply return a notification for each
existing assignment.
The UI changed a bit: tooltips are now explaining if the assignment is
for a topic or a post and if it’s for an individual or a group. Icons
are also properly set (so no more individual icon for group assignments)
and the assigned group name is displayed.
The background jobs signatures changed a bit (`assignment_id` is now
needed for the unassign job) so when deploying this patch, it’s expected
to have some jobs failing. That’s why a post-migration has been written
to handle the creation of missing notifications and the deletion of
extra notifications too.
This commit updates the plugin to follow the latest guidelines, as
shown in discourse-plugin-skeleton, removing the explicit require calls
and using config/routes.rb for defining all routes.
This commit updates the plugin to follow the latest guidelines, as
shown in discourse-plugin-skeleton, removing the explicit require calls
and using config/routes.rb for defining all routes.
Implements a new design that improves the user experience:
- add a clear cancel button
- add an indication the note is optional
- change the plus icon to a search icon
- show an error when the user tries to assign without choosing an assignee
- move suggestions to default search results
- focus search input when modal is displayed