Commit Graph

533 Commits

Author SHA1 Message Date
Discourse Translator Bot
76176eda9d
Update translations (#21145) 2023-04-25 17:23:21 +02:00
Loïc Guitaut
430d6308a8 FIX: Render links with subfolders properly in Discobot
Currently, some links aren’t properly built in Discobot when Discourse
is hosted in a subfolder. This is because we’re providing
`Discourse.base_url` to the Rails helpers which contains the base URL
*with* the prefix. But Rails helpers already handle this prefix so the
resulting link gets the prefix twice.

The fix is quite simple: use `Discourse.base_url_no_prefix` instead of
`Discourse.base_url`.
2023-04-17 16:53:00 +02:00
Discourse Translator Bot
9a562f54d7
Update translations (#21055) 2023-04-11 15:45:03 +02:00
Discourse Translator Bot
171e8b679d
Update translations (#20861) 2023-04-05 09:12:48 +02:00
Discourse Translator Bot
4cf065c480
Update translations (#20671) 2023-03-14 15:04:54 +01:00
chapoi
e52bbc1230
UX/DEV: Review queue redesign fixes (#20239)
* UX: add type tag and design update

* UX: clarify status copy in reviewQ

* DEV: switch to selectKit

* UX: color approve/reject buttons in RQ

* DEV: regroup actions

* UX: add type tag and design update

* UX: clarify status copy in reviewQ

* Join questions for flagged post with "or" with new I18n function
* Move ReviewableScores component out of context
* Add CSS classes to reviewable-item based on human type

* UX: add table header for scoring

* UX: don't display % score

* UX: prefix modifier class with dash

* UX: reviewQ flag table styling

* UX: consistent use of ignore icon

* DEV: only show context question on pending status

* UX: only show table headers on pending status

* DEV: reviewQ regroup actions for hidden posts

* UX: reviewQ > approve/reject buttons

* UX: reviewQ add fadeout

* UX: reviewQ styling

* DEV: move scores back into component

* UX: reviewQ mobile styling

* UX: score table on mobile

* UX: reviewQ > move meta info outside table

* UX: reviewQ > score layout fixes

* DEV: readd `agree_and_keep` and fix the spec tests.

* Fix the spec tests

* fix the quint test

* DEV: readd deleting replies

* UX: reviewQ copy tweaks

* DEV: readd test for ignore + delete replies

* Remove old

* FIX: Add perform_ignore back in for backwards compat

* DEV: add an action alias `ignore` for `ignore_and_do_nothing`.

---------

Co-authored-by: Martin Brennan <martin@discourse.org>
Co-authored-by: Vinoth Kannan <svkn.87@gmail.com>
2023-03-02 16:40:53 +01:00
Natalie Tay
4855a2879c
UX: Update badge icons (#20462) 2023-02-28 10:42:05 +08:00
Discourse Translator Bot
76260a4d79
Update translations (#20389) 2023-02-21 17:12:10 +01:00
Loïc Guitaut
f7c57fbc19 DEV: Enable unless cops
We discussed the use of `unless` internally and decided to enforce
available rules from rubocop to restrict its most problematic uses.
2023-02-21 10:30:48 +01:00
Discourse Translator Bot
43800eeb73
Update translations (#20370) 2023-02-20 11:01:01 +01:00
Discourse Translator Bot
8b4d571b9b
Update translations (#20183) 2023-02-06 16:49:27 +01:00
Discourse Translator Bot
a5c2146dc0
Update translations (#20101) 2023-01-31 15:21:00 +01:00
David Taylor
79bea9464c
PERF: Move user-tips and narrative to per-user messagebus channels (#19773)
Using a shared channel with per-message permissions means that every client is updated with the channel's 'last_id', even if there are no messages available to them. Per-user channel names avoid this problem - the last_id will only be incremented when there is a message for the given user.
2023-01-30 11:48:09 +00:00
Michael Brown
8bec4e1db9 FIX: remove link to site with inappropriate content
As reported on https://meta.discourse.org/t/253028, the linked site includes
language which we do not support.
2023-01-26 16:34:23 -05:00
Discourse Translator Bot
8b72f489e1
Update translations (#19974) 2023-01-24 16:32:34 +01:00
Discourse Translator Bot
4ac37bbe0f
Update translations (#19897) 2023-01-18 11:42:54 +01:00
Martin Brennan
14983c5b8e
FIX: New hashtag support for narrative bot advanced narrative (#19875)
The discobot advanced tutorial was failing when the new hashtags
were enabled with enable_experimental_hashtag_autocomplete set
to true, since the CSS selector is different. This commit fixes
the issue and also changes the instructions if this is enabled since
we no longer require the hashtag to not be at the start of the line.

c.f. https://meta.discourse.org/t/it-is-impossible-to-complete-the-hashtag-section-of-the-discobot-advanced-tutorial/251494
2023-01-17 10:16:28 +10:00
Martin Brennan
7c97548159
FIX: Fix incorrect hashtag setting migration (#19857)
Added in c2013865d7,
this migration was supposed to only turn off the hashtag
setting for existing sites (since that was the old default)
but its doing it for new ones too because we run all migrations
on new sites.

Instead, we should only run this if the first migration was
only just created, meaning its a new site.
2023-01-16 10:53:00 +10:00
David Taylor
055310cea4
DEV: Apply syntax_tree formatting to plugins/* 2023-01-07 11:11:37 +00:00
Discourse Translator Bot
ebe8b868bf
Update translations (#19633) 2022-12-28 13:32:29 +01:00
Jarek Radosz
19214aff18
DEV: Clean up all message bus subscriptions (#19268)
1. "What Goes Up Must Come Down" – if you subscribe to message bus, make sure you also unsubscribe
2. When you unsubscribe - remove only your subscription, not **all** subscriptions on given channel

Attempt #2. The first attempt tried to extend a core `@bound` method in new-user-narrative plugin which did not work. I reworked that plugin in the meantime. This new PR also cleans up message bus subscriptions in now core-merged chat plugin.
2022-12-12 16:32:25 +01:00
Discourse Translator Bot
58ffa06d4a
Update translations (#19340) 2022-12-06 16:22:23 +01:00
Jarek Radosz
5c9bb73ffe
DEV: Remove discobot pm scrolling code (#19300)
1. Originally the feature did "Scroll to new posts when user is near bottom of PM" (74e1889924)
2. Then that feature was limited to "Only scroll to posts that are not your own in PMs." (4a26561927)
3. It was limited further to "Only scroll PMs on new message" (eaf7746ec9)
4. And later to "only scroll to bottom for discobot" (267d129f38)
5. And the code was relegated to new-user-narrative plugin (48b7696dbc)

I don't think it's worth it to keep this scrolling code just for this very small specific case.

This did potentially confict with other post scrolling code, and also using `modifyClass` is something we'd like to avoid.
2022-12-03 18:35:54 +01:00
Jarek Radosz
ef31c7df63
DEV: Remove unused new-user-narrative code (#19299)
This method override was misnamed from the beginning and nobody noticed that this special bookmark handling was missing so…
2022-12-02 17:46:49 +01:00
Jarek Radosz
49e0fc04f7
Revert "DEV: Clean up all message bus subscriptions (#18675)" (#19267)
This reverts commit b0839ccf27.
2022-11-30 16:29:10 +00:00
Jarek Radosz
b0839ccf27
DEV: Clean up all message bus subscriptions (#18675)
1. "What Goes Up Must Come Down" – if you subscribe to message bus, make sure you also unsubscribe
2. When you unsubscribe - remove only your subscription, not **all** subscriptions on given channel
2022-11-30 16:49:51 +01:00
Discourse Translator Bot
2eee6fb644
Update translations (#19150) 2022-11-22 15:01:19 +01:00
Discourse Translator Bot
33f601c8ad
Update translations (#19033) 2022-11-16 11:39:47 +01:00
Discourse Translator Bot
d7844a797f
Update translations (#18948) 2022-11-09 00:00:28 +01:00
Discourse Translator Bot
82425b23ee
Update translations (#18813) 2022-11-02 15:13:47 +01:00
Discourse Translator Bot
5f02f11acc
Update translations (#18740) 2022-10-25 17:00:49 +02:00
Jarek Radosz
8304f40f84
FIX: Correctly debounce various functions (#18673)
Debouncing inline anonymous functions does not work.

This fixes all instances of that error by extracting the function or using the new `@debounce(delay)` decorator
2022-10-20 13:28:09 +02:00
Discourse Translator Bot
0af2837b73
Update translations (#18642) 2022-10-19 15:19:28 +02:00
Discourse Translator Bot
d00cd3295e
Update translations (#18183) 2022-09-13 16:04:18 +02:00
Jarek Radosz
fa58eea64e
DEV: Minor code cleanup (#18225)
Various small changes made while debugging MessageBus-related tests.
2022-09-12 14:05:21 +02:00
Discourse Translator Bot
1ed4442c10
Update translations (#18134) 2022-08-30 20:17:57 +02:00
Mayfield
542cd1ff90
FIX: allow extra whitespace when asking discobot to perform a bot command (#17738) 2022-08-18 13:32:30 -04:00
Loïc Guitaut
3eaac56797 DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
Discourse Translator Bot
f06e586c19
Update translations (#17756) 2022-08-02 16:54:12 +02:00
Alan Guo Xiang Tan
0d5bded434
DEV: message-bus:main -> service:message-bus (#17748)
The former has been deprecated
2022-08-02 13:25:51 +08:00
David Taylor
9534f13256
DEV: Replace site-settings:main with service:site-settings (#17734)
This will allow consumers to inject it using `siteSettings: service()` in preparation for the removal of implicit injections in Ember 4.0. `site-settings:main` is still available and will print a deprecation notice.
2022-08-01 09:43:33 +01:00
Phil Pirozhkov
493d437e79
Add RSpec 4 compatibility (#17652)
* Remove outdated option

04078317ba

* Use the non-globally exposed RSpec syntax

https://github.com/rspec/rspec-core/pull/2803

* Use the non-globally exposed RSpec syntax, cont

https://github.com/rspec/rspec-core/pull/2803

* Comply to strict predicate matchers

See:
 - https://github.com/rspec/rspec-expectations/pull/1195
 - https://github.com/rspec/rspec-expectations/pull/1196
 - https://github.com/rspec/rspec-expectations/pull/1277
2022-07-28 10:27:38 +08:00
Discourse Translator Bot
5894e7d30f
Update translations (#17664) 2022-07-26 19:40:53 +02:00
Loïc Guitaut
91b6b5eee7 DEV: Don’t use change { … }.by(0) in specs 2022-07-26 10:34:15 +02:00
Discourse Translator Bot
c58a8b0fe6
Update translations (#17571) 2022-07-19 20:45:57 +02:00
Jarek Radosz
624c684d51
DEV: Transpile all plugin js by default (#17175)
Goodbye `# transpile_js: true`? 🙂
2022-06-21 22:07:10 +02:00
Discourse Translator Bot
7ac485fb9f
FEATURE: Add Croatian language (#17130)
Co-authored-by: Gerhard Schlager <gerhard.schlager@discourse.org>
2022-06-18 00:18:22 +02:00
Discourse Translator Bot
41fa278c00
Update translations (#16958) 2022-05-31 16:14:37 +02:00
David Taylor
95e7e10417
DEV: Fix paths for narrative bot jobs (#16924)
These incorrect paths were causing the regular jobs to be loaded in a `Jobs::Jobs` module in development mode, which would cause various weird issues.

https://meta.discourse.org/t/228155
2022-05-26 13:19:55 +01:00
Martin Brennan
fcc2e7ebbf
FEATURE: Promote polymorphic bookmarks to default and migrate (#16729)
This commit migrates all bookmarks to be polymorphic (using the
bookmarkable_id and bookmarkable_type) columns. It also deletes
all the old code guarded behind the use_polymorphic_bookmarks setting
and changes that setting to true for all sites and by default for
the sake of plugins.

No data is deleted in the migrations, the old post_id and for_topic
columns for bookmarks will be dropped later on.
2022-05-23 10:07:15 +10:00
Martin Brennan
fbcc35b417
DEV: Remove PostAction/UserAction bookmark refs (#16681)
We have not used anything related to bookmarks for PostAction
or UserAction records since 2020, bookmarks are their own thing
now. Deleting all this is just cleaning up old cruft.
2022-05-10 10:42:18 +10:00
Martin Brennan
4d0ac8636c
FIX: Polymorphic bookmarks for new user narrative bot (#16683)
This commit allows the new user narrative bot to work
with polymorphic bookmarks, gated behind the
use_polymorphic_bookmarks site setting.
2022-05-09 16:19:18 +10:00
Martin Brennan
222c8d9b6a
FEATURE: Polymorphic bookmarks pt. 3 (reminders, imports, exports, refactors) (#16591)
A bit of a mixed bag, this addresses several edge areas of bookmarks and makes them compatible with polymorphic bookmarks (hidden behind the `use_polymorphic_bookmarks` site setting). The main ones are:

* ExportUserArchive compatibility
* SyncTopicUserBookmarked job compatibility
* Sending different notifications for the bookmark reminders based on the bookmarkable type
* Import scripts compatibility
* BookmarkReminderNotificationHandler compatibility

This PR also refactors the `register_bookmarkable` API so it accepts a class descended from a `BaseBookmarkable` class instead. This was done because we kept having to add more and more lambdas/properties inline and it was very messy, so a factory pattern is cleaner. The classes can be tested independently as well.

Some later PRs will address some other areas like the discourse narrative bot, advanced search, reports, and the .ics endpoint for bookmarks.
2022-05-09 09:37:23 +10:00
Discourse Translator Bot
4ec6af064a
Update translations (#16505) 2022-04-19 15:45:09 +02:00
Discourse Translator Bot
a1d7e77967
Update translations (#16456) 2022-04-12 21:04:30 +02:00
Discourse Translator Bot
fe689115d4
Update translations (#16378) 2022-04-05 15:28:19 +02:00
Discourse Translator Bot
216dfbb895
Update translations (#16314) 2022-03-30 14:52:59 +02:00
Discourse Translator Bot
93407005b5
Update translations (#16132) 2022-03-10 16:51:47 +01:00
David Taylor
c9dab6fd08
DEV: Automatically require 'rails_helper' in all specs (#16077)
It's very easy to forget to add `require 'rails_helper'` at the top of every core/plugin spec file, and omissions can cause some very confusing/sporadic errors.

By setting this flag in `.rspec`, we can remove the need for `require 'rails_helper'` entirely.
2022-03-01 17:50:50 +00:00
Jarek Radosz
2fc70c5572
DEV: Correctly tag heredocs (#16061)
This allows text editors to use correct syntax coloring for the heredoc sections.

Heredoc tag names we use:

languages: SQL, JS, RUBY, LUA, HTML, CSS, SCSS, SH, HBS, XML, YAML/YML, MF, ICS
other: MD, TEXT/TXT, RAW, EMAIL
2022-02-28 20:50:55 +01:00
Discourse Translator Bot
50da1375ca
Update translations (#16024) 2022-02-22 14:20:23 +01:00
Discourse Translator Bot
12423b56cb
Update translations (#15928) 2022-02-15 15:10:10 +01:00
Discourse Translator Bot
fa9b2b4f42
Update translations (#15864) 2022-02-08 14:13:14 +01:00
David Taylor
863262a5de
DEV: Update more Jobs#enqueue calls to use strings (#15823)
Symbols are converted to strings anyway, so there is no change in behaviour. The latest version of sidekiq introduced a warning for this.
2022-02-04 19:58:34 +00:00
Benson Muite
783912d305
Increase geographical diversity of quotes (#15813) 2022-02-04 11:35:01 -05:00
Discourse Translator Bot
022480b461
Update translations (#15763) 2022-02-01 16:15:18 +01:00
Discourse Translator Bot
f0435ca1a7
Update translations (#15673) 2022-01-23 11:14:20 +01:00
Discourse Translator Bot
14b8cd5e17
Update translations (#15637) 2022-01-18 14:41:41 +01:00
tshenry
8ef3513e4a
UX: Use https protocol for markdown help link (#15576) 2022-01-13 15:20:38 -08:00
Penar Musaraj
1ed2520589
DEV: Fewer jQuery calls in offset calculation (#15465) 2022-01-07 16:02:03 -05:00
Penar Musaraj
879e35195a
DEV: Small refactor to header offset (#15421)
Centralizes calculations in a helper under the site header component.

This also reverts a small CSS change to the composer: since ac79c5ef,
the composer height was not including the grippie, which means that the
composer height was off by 11 pixels, and the topic progress widget was
sometimes being displayed cut off by 11 pixels.
2021-12-29 11:03:21 -05:00
Discourse Translator Bot
c665003203
Update translations (#15416) 2021-12-28 14:13:58 +01:00
Penar Musaraj
48b7696dbc
DEV: Remove jQuery animate calls (#15321)
Affects j/k navigation and PM interaction with @discobot.
2021-12-16 11:00:09 -05:00
Discourse Translator Bot
4afd6f0189
Update translations (#15292) 2021-12-14 14:53:35 +01:00
Discourse Translator Bot
3fec579ede
Update translations (#15210) 2021-12-07 16:19:44 +01:00
Natalie Tay
4c46c7e334
DEV: Remove xlink hrefs (#15059) 2021-11-25 15:22:43 +11:00
Discourse Translator Bot
8420cf047e
Update translations (#14970) 2021-11-16 16:17:10 +01:00
Jarek Radosz
4ad77f3382
DEV: Remove .es6 extensions from core (#14912)
Still supported in plugins though.
2021-11-13 12:51:53 +01:00
Discourse Translator Bot
0f71a43434
Update translations (#14714) 2021-10-27 14:24:43 +02:00
Discourse Translator Bot
25097fa0af
Update translations (#14648) 2021-10-19 15:23:54 +02:00
Arpit Jalan
d1fc759ac4
FIX: remove 'crawl_images' site setting (#14646) 2021-10-19 17:12:29 +05:30
Discourse Translator Bot
b44119cdb2
Update translations (#14579) 2021-10-12 16:00:22 +02:00
Discourse Translator Bot
0f5d737a61
Update translations (#14513) 2021-10-05 15:59:26 +02:00
Discourse Translator Bot
a0cb340eef
Update translations (#14460) 2021-09-28 16:44:23 +02:00
Discourse Translator Bot
88aed7512e
Update translations (#14400) 2021-09-21 15:57:14 +02:00
Martin Brennan
0c42a1e5f3
FEATURE: Topic-level bookmarks (#14353)
Allows creating a bookmark with the `for_topic` flag introduced in d1d2298a4c set to true. This happens when clicking on the Bookmark button in the topic footer when no other posts are bookmarked. In a later PR, when clicking on these topic-level bookmarks the user will be taken to the last unread post in the topic, not the OP. Only the OP can have a topic level bookmark, and users can also make a post-level bookmark on the OP of the topic.

I had to do some pretty heavy refactors because most of the bookmark code in the JS topics controller was centred around instances of Post JS models, but the topic level bookmark is not centred around a post. Some refactors were just for readability as well.

Also removes some missed reminderType code from the purge in 41e19adb0d
2021-09-21 08:45:47 +10:00
Discourse Translator Bot
5cce1b38e4
Update translations (#14336) 2021-09-14 16:21:00 +02:00
Robin Ward
09764291b1 FIX: In test mode, initializers were modifying classes over and over
This adds a new property, `pluginId` which you can pass to `modifyClass`
which prevent the class from being modified over and over again.

This also includes a fix for polls which was leaking state between tests
which this new functionality exposed.
2021-09-02 11:22:01 -04:00
Discourse Translator Bot
c995b20ca4
Update translations (#14063) 2021-08-24 15:25:44 +02:00
Discourse Translator Bot
0e53769f71
Update translations (#13994) 2021-08-14 10:18:05 +02:00
Discourse Translator Bot
6b87ae3d4c
Update translations (#13929) 2021-08-04 14:14:52 +02:00
Discourse Translator Bot
0c422cff1e
Update translations (#13898) 2021-07-30 11:30:10 +02:00
Discourse Translator Bot
e951cb9aef
Update translations (#13860) 2021-07-27 15:24:03 +02:00
Discourse Translator Bot
3667cc6447
Update translations (#13821) 2021-07-22 12:31:19 +02:00
Discourse Translator Bot
28b5e6e47d
Update translations (#13796) 2021-07-21 10:30:34 +02:00
Michael Brown
5f7e60d9dc discourse/discourse change from 'master' to 'main' 2021-07-19 11:46:15 -04:00
Gerhard Schlager
ec9a2a04f3
Fix i18n issues reported on Crowdin (#13769)
* Removes unused strings
* Clarifies some of the strings
* Fixes typos

@discourse-translator-bot keep_translations_and_approvals
2021-07-19 09:30:48 +08:00
Discourse Translator Bot
53fe8b2e77
Update translations (#13647) 2021-07-13 20:30:09 +02:00
Kane York
38332cae21
FIX: Multiply ratelimiter leniency for own discobot certs (#13639) 2021-07-06 10:23:57 +10:00
Alan Guo Xiang Tan
37b8ce79c9
FEATURE: Add last visit indication to topic view page. (#13471)
This PR also removes grey old unread bubble from the topic badges by
dropping `TopicUser#highest_seen_post_number`.
2021-07-05 14:17:31 +08:00