Commit Graph

874 Commits

Author SHA1 Message Date
Loïc Guitaut be53c06e5a DEV: Rewrite post-migration in pure SQL 2023-11-15 09:50:54 +01:00
Discourse Translator Bot 751483ed2b
Update translations (#526) 2023-11-14 14:30:06 +01:00
chapoi 6397bf8351
UX: prepare for core modal styling changes (#524)
See https://github.com/discourse/discourse/pull/23967
2023-11-13 12:25:03 +00:00
Martin Brennan bf6df7ccd9
DEV: Change settings root from plugins: to discourse_assign (#523)
This is so the plugins settings are better categorized in the site settings UI.
2023-11-13 10:24:09 +10:00
Bianca Nenciu c234819131
DEV: Use new API to preload category custom fields (#521) 2023-11-09 18:52:04 +02:00
Loïc Guitaut 5055bcbb2c FIX: Order items properly in user menu
The recent changes to the user menu changed how we were ordering the
items in it. A small bug was noticed though, as we’re not displaying the
unread assignments at the very top.

This patch fixes the ordering like this:

- Unread individual assignment notifications
- Unread group assignment notifications
- Read individual assignments
- Read group assignments

In each group of items, they are sorted by date, the most recent ones
being at the top.
2023-11-09 16:41:48 +01:00
Martin Brennan 41f08fdd20
Update plugin.rb metadata (#519)
Co-authored-by: AlexDev <104522507+alexdevlaeminck@users.noreply.github.com>
2023-11-08 11:05:12 -08:00
Loïc Guitaut 80604e9012 FIX: Display assignments in user menu properly
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.
2023-11-08 15:26:57 +01:00
Natalie Tay 20cdd5ae87
DEV: Use match_array for spec allowed groups (#520) 2023-11-02 19:16:54 +08:00
Jarek Radosz 71f8484a75
DEV: Use `@discourse/lint-configs` (#517) 2023-10-23 12:08:11 +02:00
Jarek Radosz 6ed4a13fe7
DEV: Update ruby linting (#518) 2023-10-20 17:04:03 +02:00
Kris 7fe45c8eb5
UX: simplify markup to fix j/k highlighting (#516)
This cleans up the markup a bit, so instead of a `div` as a table child we use the `td` and removes the internal wrapper. This fixes an issue with a double highlight while using j/k navigation highlighting caused by the nested `td`.
2023-10-20 08:40:55 +08:00
dependabot[bot] 92b0dd530b
Build(deps): Bump @babel/traverse from 7.22.17 to 7.23.2 (#515)
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.22.17 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-19 11:54:27 +02:00
Natalie Tay e434be7969
UX: Don't change topic notification level when unassigning (#513)
* UX: Don't change topic notification level when unassigning

* Update test
2023-10-16 04:41:44 +00:00
Discourse Translator Bot 2185513d96
Update translations (#514) 2023-10-11 11:17:57 +02:00
Krzysztof Kotlarek 0c01e8fdfd
FIX: granular webhooks (#498)
After those core changes we need additional translations

https://github.com/discourse/discourse/pull/23070
2023-10-09 03:26:40 +00:00
David Taylor df34e91b55
DEV: Resolve routing method deprecation (#512)
Uses the router service for redirecting instead of `this.transitionTo`. Also removes the first branch of logic, which was unnecessarily redirecting to the current route (and led to an infinite loop with the modern API)
2023-10-02 15:10:31 +01:00
David Taylor 93ee2cb886
DEV: Update AssignedTopicListColumn class name (#511)
The `_Test` suffix shouldn't have been included in 89807545a4. No functional change.
2023-10-02 13:15:39 +01:00
David Taylor 89807545a4
DEV: Modernise assignment topic-list implementation (#510)
- Reuse core `<BasicTopicList` instead of reimplementing
- Use raw plugin outlet to add assign controls to topic-list-item (requires https://github.com/discourse/discourse/pull/23592)
- Remove use of `.render()` in route
2023-09-28 15:07:15 +01:00
Jarek Radosz e9c7cb5c3f
DEV: Skip a flaky spec (#508) 2023-09-12 07:43:24 +08:00
Martin Brennan 7c18124a32
DEV: Fix REMINDER_BUFFER_MINUTES const reassignment warning (#506)
Without ||=, ruby warns the const is being reassigned all the time.
2023-08-31 12:51:51 +10:00
Discourse Translator Bot d28c06a973
Update translations (#505) 2023-08-29 15:50:21 +02:00
Jarek Radosz a5fb9a5e1f
DEV: Fix a core deprecation (#504)
Re-lands #475
2023-08-28 10:02:29 +02:00
Renato Atilio 4ff42c19a2
FIX: move comment out of the translation value (#503) 2023-08-24 16:47:13 -03:00
Discourse Translator Bot 5551ab4d2f
Update translations (#502) 2023-08-23 09:29:04 +02:00
Penar Musaraj de12879522
DEV: Pin plugin for Discourse 3.1 stable (#501) 2023-08-22 13:45:43 -05:00
Discourse Translator Bot 0cbf10b805
Update translations (#500) 2023-08-15 21:24:43 +02:00
Natalie Tay 55f8d24b1f
DEV: Increase the buffer used to determine whether to send out the reminder email (#499)
Increase the buffer used to determine whether to send out the reminder email
2023-08-15 14:12:10 +08:00
Natalie Tay f5cc748986
FIX: Fix reminder frequency not getting sent daily when early by a few seconds/minutes (#496)
Add a buffer in determining whether to remind a user about assignments
2023-08-10 12:04:27 +08:00
Discourse Translator Bot a0bd07115e
Update translations (#497) 2023-08-08 15:42:18 +02:00
Joffrey JAFFEUX 8f04d82ae7
DEV: skip flakey spec (#495)
We already tried to make this spec more reliable in eb3b97b834 but that didn't work out.

https://github.com/discourse/discourse/actions/runs/5694495045/job/15435791690?pr=22860
2023-07-28 19:31:55 +02:00
dependabot[bot] 80f3046755
Build(deps): Bump word-wrap from 1.2.3 to 1.2.4 (#494)
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-19 01:32:19 +02:00
Jarek Radosz 458306fa6b
DEV: Use the new bulk topic actions api (#491) 2023-07-18 14:15:16 +02:00
Kris 43cb34c698
FIX: missing space in assign button (#493) 2023-07-13 19:18:05 -04:00
Alan Guo Xiang Tan eb3b97b834
DEV: Try to make system tests more stable (#492)
Why this change?

We have been seeing tests failures due to errors like

```
Capybara::ElementNotFound:
  Unable to find css "#topic-footer-button-assign"
```

when running our system tests in CI. However, I can't quite figure out
why that is happening and have invested way too much time to do so.
Therefore, I'm trying to fix this by closing a topic via the topic
timeline controls instead of the footer button instead.
2023-07-12 08:31:24 +08:00
Jarek Radosz 1c079b792b
DEV: Use the new component-based modal API (#489)
Co-authored-by: David Taylor <david@taylorhq.com>
2023-07-11 10:37:57 +02:00
dependabot[bot] a4ea754c1d
Build(deps): Bump semver from 6.3.0 to 6.3.1 (#490)
Bumps [semver](https://github.com/npm/node-semver) from 6.3.0 to 6.3.1.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v6.3.1/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v6.3.0...v6.3.1)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-11 10:37:04 +02:00
Isaac Janzen 41f62d9ea9
DEV: Convert dismiss modal to component-based API (#481) 2023-07-06 12:14:36 -05:00
Alan Guo Xiang Tan 7867cc4b03
DEV: Fix incorrect fabrication leading to index violation errors (#488)
This was causing the tests to be flaky with the following errors on CI:

```
PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint "index_assignments_on_target_id_and_target_type"
       DETAIL:  Key (target_id, target_type)=(39, Topic) already exists.
```
2023-07-06 07:30:41 +08:00
Natalie Tay 76f92ba253
DEV: Fabricate assignments (#487)
- Fabricate and use slightly more accurate names for users and groups
- Use fabricator instead of assigner in controller setup
- Remove unneeded user
2023-07-05 15:23:34 +08:00
Martin Brennan 7d9207a275
DEV: Try fix flaky spec (#485)
For some reason sometimes clicking the admin wrench doesn't work
2023-07-05 12:10:48 +10:00
Jarek Radosz 47a1170ec5
DEV: Merge js dirs; prefix tests (#484) 2023-07-03 17:28:02 +02:00
Natalie Tay 59fa9d7dbf
FIX: Sum assignments for group and group users (#482)
Use the assignment count rather than the number of topics assigned for the number of assignments in the nav
2023-07-03 10:58:46 +08:00
Jarek Radosz f89420d00e
DEV: Remove unused `assignUser` action (#483) 2023-06-30 19:18:15 +02:00
Jarek Radosz 2bff29e919
DEV: Modernization/cleanup (#480)
* Component template colocation
* Native classes
* glimmer plugin connector
* `this.` in templates
* `?.` operator
* Merged `withPluginApi` calls
* Updated deps
2023-06-22 10:06:37 +02:00
David Taylor 3ca56e82d7
DEV: Fix Zeitwerk reloading error (#479)
Using `.append` can lead to a 'two routes with the same name' error
2023-06-16 11:32:50 +01:00
Jarek Radosz a476aeb222
Revert "DEV: Fix a core deprecation (#475)" (#478)
This reverts commit 968751c8a9.

To be re-applied when 3.1.0.beta5 is released.
2023-06-01 19:54:52 +02:00
Kris c5877a1456
UX: constrain avatar size due to core change (#477) 2023-06-01 13:42:57 -04:00
Isaac Janzen 6cd56770bc
DEV: Use angle bracket syntax (#476) 2023-05-28 09:34:13 -05:00
Vinoth Kannan fb89a23530
FEATURE: skip group invite if all members can see topic already. (#474)
We don't want to invite a group when all of its members are part of another group that is already allowed to the topic.
2023-05-27 22:29:38 +05:30