Commit Graph

845 Commits

Author SHA1 Message Date
Andrei Prigorshnev bd2cdfa243
Add fixme 2024-04-08 23:16:59 +04:00
Andrei Prigorshnev b9c27bc7fd
WIP: switching to another assignment on the modal 2024-04-08 18:00:49 +04:00
Andrei Prigorshnev eab180291d
WIP: combobox options 2024-04-08 18:00:48 +04:00
Andrei Prigorshnev e2e41ff9fe
WIP: combobox options 2024-04-08 18:00:48 +04:00
Andrei Prigorshnev 83c6bbbf3f
WIP: combobox options 2024-04-08 18:00:48 +04:00
Andrei Prigorshnev 9c07599fc0
WIP: combobox options 2024-04-08 18:00:48 +04:00
Andrei Prigorshnev 661f4c3620
WIP: combobox options 2024-04-08 18:00:48 +04:00
Andrei Prigorshnev 862b44fea9
WIP: combobox options 2024-04-08 18:00:47 +04:00
Andrei Prigorshnev caea32de44
WIP: combobox options 2024-04-08 18:00:47 +04:00
Andrei Prigorshnev dfc5b24f75
Pass down assignments 2024-04-08 18:00:47 +04:00
Andrei Prigorshnev d6bcb34669
Extract the <TopicAssignments /> component 2024-04-08 18:00:47 +04:00
Andrei Prigorshnev 6d151af2db
Add strings 2024-04-08 18:00:47 +04:00
Andrei Prigorshnev da5adf47e8
WIP: Add a combobox 2024-04-08 18:00:46 +04:00
Andrei Prigorshnev b84b6aa9df
WIP: edit topic assignments modal 2024-04-08 18:00:46 +04:00
Andrei Prigorshnev 3bcca72fdc
Drop unused import 2024-04-08 18:00:46 +04:00
Andrei Prigorshnev ca47ea28db
on Submit is not implemented 2024-04-08 18:00:46 +04:00
Andrei Prigorshnev 04d35e1a54
Add a fixme 2024-04-08 18:00:46 +04:00
Andrei Prigorshnev 70a7585777
A new modal for editing topic assignments 2024-04-08 18:00:45 +04:00
Andrei Prigorshnev 47245339e7
Rename @model to @assignment 2024-04-08 18:00:45 +04:00
Andrei Prigorshnev ba1a2844ee
Pass model as a single object 2024-04-08 18:00:45 +04:00
Andrei Prigorshnev 2d27c1adaa
Drop unused stuff 2024-04-08 18:00:45 +04:00
Andrei Prigorshnev 1343702a27
WIP 2024-04-08 18:00:45 +04:00
Andrei Prigorshnev 572a9a4223
WIP 2024-04-08 18:00:45 +04:00
Andrei Prigorshnev 19c2542499
WIP 2024-04-08 18:00:44 +04:00
Andrei Prigorshnev 0ca2d22249
WIP 2024-04-08 18:00:44 +04:00
Andrei Prigorshnev 375234f452
WIP 2024-04-08 18:00:44 +04:00
Andrei Prigorshnev 607e5ae464
WIP 2024-04-08 18:00:44 +04:00
Andrei Prigorshnev 0b3ff43f2e
WIP 2024-04-08 18:00:44 +04:00
Andrei Prigorshnev 4e943dd6ac
WIP 2024-04-08 18:00:43 +04:00
Andrei Prigorshnev 2abac98e18
WIP: Move the rest into the component 2024-04-08 18:00:43 +04:00
Andrei Prigorshnev aeef694c57
Drop moved property 2024-04-08 18:00:43 +04:00
Andrei Prigorshnev e6243cb9b5
Better property name 2024-04-08 18:00:43 +04:00
Andrei Prigorshnev a1bcdd1d9b
Move assignment status into the component 2024-04-08 18:00:43 +04:00
Andrei Prigorshnev 58d785cf8f
Name component class correctly 2024-04-08 18:00:43 +04:00
Andrei Prigorshnev 0a2f75bf60
Pass down note 2024-04-08 18:00:42 +04:00
Andrei Prigorshnev 3c802b0332
Connect onSubmit 2024-04-08 18:00:42 +04:00
Andrei Prigorshnev 7b2b8c1151
Extract <Assignment /> component 2024-04-08 18:00:42 +04:00
Joffrey JAFFEUX 3507a7dd98
FIX: correctly refresh UI when changing group preference (#560)
Prior to this fix the state change was not reflected in the UI when changing the "who can assign" preference of a group.

This was actually saved in the backend but would require a full page refresh to see the updated state on the group preferences page.
2024-04-05 18:46:08 +02:00
David Taylor 6d78e3956e
DEV: Update test selectors for glimmer header (#558)
In preparation for https://github.com/discourse/discourse/pull/26467
2024-04-04 17:11:59 +01:00
Andrei Prigorshnev 0bcd0a1fee
FIX: Unassign buttons on the activity/assigned page don't work (#559)
We've noticed that when unassigning a topic on the `activity/assigned` one of 
two incorrect things happens when pressing this button:
1. The first topic on the page gets unassigned instead of the selected one
2. No topics get unassigned (that happens when the first topic on the list is 
not assigned and only has assigned _posts_)

That happens because this handler for all buttons somehow always use the 
same state - the state of the first topic on the page:

f2906e0885/assets/javascripts/discourse/components/assign-actions-dropdown.js (L55-L68)

There seem to be some nuances in select-kit and I'm not sure whether 
this should be qualified as a bug in select-kit. However, I've noticed that in other cases when we use `DropdownSelectBoxComponent` we use the `onChange` handler rather 
than `onSelect`.

So I switched this code to using `onChange` and that resolved the issue, 
the `onChange` handler has access to correct state.

Tests will be in a follow-up.
2024-04-04 20:03:03 +04:00
Discourse Translator Bot f2906e0885
Update translations (#557) 2024-04-02 18:19:42 +02:00
Andrei Prigorshnev 2676522abc
FEATURE: Add buttons for unassigning from posts to the topic level assign menu (#554)
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.
2024-03-29 18:10:04 +04:00
Andrei Prigorshnev 51920a99c0
FIX: Assignments limit shouldn't prevent from reassigning a post (#556)
At the moment, it's possible to have maximum 5 assignments per topic 
(that includes topic and post assignments). When trying to assign more, 
a message "Limit of 5 assignments per topic has been reached" appears.

One possible edge case here is _reassigning_ a topic or a post. Reassignment 
doesn't lead to exceeding the limit, and therefore it should be possible. But 
at the moment we handle correctly only _topic_  reassignments, while when 
reassigning a _post_, we show the error message "the limit has been reached".

This commit makes post reassignments work correctly too.
2024-03-29 15:50:02 +04:00
Joffrey JAFFEUX 08c2a4e0f3
UX: autofocus assignee input (#555)
With the new mobile modal we can now do this with no issue.
2024-03-25 22:58:14 +01:00
Blake Erickson ed059d3dfe
DEV: Changes for new bulk action dropdown modal (#553)
When the new bulk actions dropdown is enabled use a new component for bulk assigning.

Co-authored-by: Martin Brennan <martin@discourse.org>
2024-03-25 15:13:36 -06:00
Loïc Guitaut c696e44714 FIX: Recreate notifications on topic reopening
Currently, when reopening a topic that has assignments, the
notifications in the user menu aren’t recreated.

This patch fixes that issue. It also addresses the same type of issue
with posts being destroyed and recovered.
2024-03-18 10:56:08 +01:00
Andrei Prigorshnev b09a6618fa
FEATURE: Add menu to assigned text on posts (#550)
This adds a popup menu to assigned posts that makes it easier to unassign or 
reassign them.
2024-03-15 18:30:11 +04:00
Andrei Prigorshnev a1686e1ca9
DEV: Stop using FoundUserWithStatusSerializer (#546)
Starting from b3a1199493 we stop using deprecated "WithStatus" serializers. Instead we'll be passing an 'include_status' option to serilaizers, for example:

```ruby
# before
BasicUserWithStatusSerializer.new(user)
ArraySerializer.new(users, each_serializer: BasicUserWithStatusSerializer)

# now
BasicUserSerializer.new(user, include_status: true)
ArraySerializer.new(users, each_serializer: BasicUserSerializer, include_status: true)
```
2024-03-14 17:44:48 +04:00
Discourse Translator Bot 33c43ca51a
Update translations (#551) 2024-03-05 16:47:42 +01:00
Selase Krakani 885bd95966
DEV: Pin plugin for Discourse < 3.3.0.beta1-dev (#549) 2024-02-29 13:49:21 -07:00