Commit Graph

23219 Commits

Author SHA1 Message Date
awesomerobot ec0b4b2acc FIX: wait for groups before showing empty message 2020-09-01 22:36:00 -04:00
Jeff Wong d49e96c6a3
DEV: add plugin hooks for silence message parameters (#10538)
DEV: add plugin hooks for silence message parameters

Allows plugins to add, and update extra silence message params for custom
i18n vars

Allows plugins to override system messages via `message_title` and
`message_raw` parameters. We can later expose these params where necessary via event
hooks. Expose the parameter for the on user_silenced trigger.
2020-09-01 17:25:24 -07:00
Kane York 26ec4fd25b
FIX: User export category preferences on a deleted category. (#10573)
Tests from a1dd761bd9 were incomplete and did not test a deleted category's category_users record.
2020-09-01 13:22:59 -07:00
Ahmed Gagan b14098ce28
removed REGEXP_IN_MATCH regex to make it flexible to use with plugins (#10476)
* dynamic regex generation for 'STATUS' and 'IN' ddropdown
2020-09-01 14:33:05 +02:00
Arpit Jalan 34478760b2 Update annotations. 2020-09-01 13:41:04 +05:30
Joffrey JAFFEUX f8062300da
DEV: removes jquery usage from highlight-syntax (#10564) 2020-09-01 09:50:49 +02:00
Arpit Jalan bb2e830010 Remove out-of-date / non-core annotations. 2020-09-01 12:40:57 +05:30
Arpit Jalan e66eefe179 Annotate models. 2020-09-01 10:22:32 +05:30
Krzysztof Kotlarek 084e15b447
FIX: modify notification after remove auto_watch_category (#10568)
When a category is removed from `auto_watch_category` we are removing
CategoryUser. However, there are still TopicUser with notification level
set to `watching` which was inherited from Category.

We should move them back to `regular` unless they were modified by a user.
2020-09-01 13:07:41 +10:00
awesomerobot e824385e64 only remove edit button margin when text is hidden 2020-08-31 22:45:43 -04:00
Guo Xiang Tan 069a109cbb
DEV: Require scheduled job in development to avoid loading file twice.
This removes the need to memoize constant in order to avoid the "warning: already initialized constant".
2020-09-01 10:14:40 +08:00
Kane York a1dd761bd9
FIX: Handle deleted categories in post export (#10567)
Fixes a crash when exporting my own archive on Meta.
2020-08-31 17:33:28 -07:00
Martin Brennan 594d919d22
FIX: Focus first button in topic admin menu (#10562)
When using Shift+A to toggle the admin menu for a topic the first button was not focused, so the menu could not be navigated with tab.
2020-09-01 10:29:35 +10:00
Kane York 5ec5fbd7ba
User export improvements 2 (#10560)
* FEATURE: Use predictable filenames inside the user archive export

* FEATURE: Include badges in user archive export

* FEATURE: Add user_visits table to the user archive export
2020-08-31 15:26:51 -07:00
Joe c3560a66f3 DEV: CSS truncation followup
After merging this

58fe78bf28 (diff-fed21847d651f6eb2cc76abbd770f5f8)

I noticed that the code I'm removing in this commit is causing text to be truncated a bit early on desktop. So, I'm removing it for now.
2020-09-01 02:01:17 +08:00
tshenry 2550c5bd03
FIX: Ensure disabling 2FA works as expected (#10485) 2020-08-31 09:56:57 -07:00
Roman Rizzi 2a3a173e8e
FIX: Disable insert link button when editing a category (#10549) 2020-08-31 13:50:40 -03:00
Joe 58fe78bf28 UX: don't wrap topic status icons in the header if there's more than one
Context: https://meta.discourse.org/t/when-a-topic-is-closed-and-pinned-the-pin-icon-in-header-not-in-correct-place/162473

Flex is causing a bit of a problem here since it makes the `topic-statuses` div in the header wrap when it has more than one icon. Given that we already use grid on the parent and that the icons are aligned properly, I think it's safe to remove it here.
2020-09-01 00:40:42 +08:00
Bianca Nenciu f2e14a3946
FEATURE: Add site setting and wizard step to set base font (#10250)
Co-authored-by: Neil Lalonde <neillalonde@gmail.com>
2020-08-31 13:14:09 +03:00
Guo Xiang Tan 5270cd97ef
DEV: Leaking state in `PostActionNotifier` in tests take 2.
Follow-up to a3b48826
2020-08-31 12:55:42 +08:00
Guo Xiang Tan a3b4882665
DEV: Leaking state in `PostActionNotifier` in tests.
Follow-up to 8a0478b97d
2020-08-31 12:04:17 +08:00
Sam Saffron b31da92ede
DEV: clear last seen cache consistently
Previously in some cases the test suite could fail due to a bad entry in
redis from previous tests

This ensures the correct cache is expired when needed

Additionally improves performance of the redis check
2020-08-31 08:54:42 +10:00
Sam Saffron 8ca8a7edba
DEV: Lint file
Ruby in warning mode complains about `foo *[]` instead `foo(*[])` is
preferred
2020-08-31 08:52:01 +10:00
Penar Musaraj b4c5f6631f
FIX: Do not set color_scheme_id in user options when no schemes are marked as selectable 2020-08-30 09:32:40 -04:00
Kris 7bba65b6f5
UX: Restyle user menu so user links are findable (#10554) 2020-08-28 20:20:59 -04:00
Kane York c5dc729e77
FEATURE: Add category tracking state to user archive export (#10557)
Tackling a simple table for the first actual new file in the user archive export.
2020-08-28 13:16:31 -07:00
Robin Ward aae97457d2
REFACTOR: Don't use `layoutName` in select-kit (#10556)
Instead import the templates as modules, the way Ember CLI wants us to.
2020-08-28 15:30:20 -04:00
Kane York 84dba3c1c7
FIX: UserAction did not have a types enum (#10553)
This is important for Data Explorer to provide proper help text.
2020-08-28 11:49:19 -07:00
Kane York 225cdba676 DEV: drop the explicit .each in UserArchive CSV writing
I think this is mostly stylistic, but this helps prevent explosive typos in the enum_for() line.
2020-08-28 11:46:53 -07:00
Kane York 4aed861336 DEV: minor refactors to ExportUserArchive(Spec) 2020-08-28 11:46:53 -07:00
Kane York 7bf199b0c4 DEV: Switch to new ExportUserArchive job
We now use the newly created job class from the previous commit.
2020-08-28 11:46:53 -07:00
Kane York a8560d741f DEV: Create ExportUserArchive as clone of ExportCsvFile
This is in preparation for improvements to the user archive export data.
Some refactors happened along the way, including calling the different _export methods 'components' of the zip file.

Additionally, make the test for post export much more comprehensive.

Copy sources:
  app/jobs/regular/export_csv_file.rb
  spec/jobs/export_csv_file_spec.rb
2020-08-28 11:46:53 -07:00
Penar Musaraj b7cfc9e861
FEATURE: User selectable color schemes (#10544) 2020-08-28 10:36:52 -04:00
Martin Brennan 2352f4bfc7
DEV: Replace SECURE_MEDIA_ROUTE const with other methods (#10545)
This is so if the route changes this const won't be around to bite us, use the Rails route methods instead.
2020-08-28 11:28:11 +10:00
Robin Ward 96edb7da38 REFACTOR: Move Mousetrap library to an import 2020-08-27 16:17:19 -04:00
Robin Ward c172f2068d
REFACTOR: Remove $.cookie in favor of a local library based on it (#10548)
This helps us out in a few ways:

1. It lessens our reliance on jQuery
2. It's slightly less code because it omits options we don't use
3. It is one less library to import and put into ES6 modules
2020-08-27 14:07:51 -04:00
Vinoth Kannan a8502ae1c4
FEATURE: add dismiss unread topics button when filtered by tag. (#10547) 2020-08-27 23:04:45 +05:30
Joffrey JAFFEUX 1cc5e8ea63
DEV: gives didRender and willRerender hooks to widgets (#10496)
didRender will be called each time the widget is rendered
willRerender will be called the second time a widget is rendered to give an opportunity to clean some state before the tree is replaced
2020-08-27 16:07:14 +02:00
David Taylor 89cb537fae
DEV: Switch letter avatar service to new domain (#10546) 2020-08-27 12:05:36 +01:00
Kane York a51db9a7bf
UX: make category topic counts clickable on mobile (#10541) 2020-08-27 01:50:18 -07:00
Guo Xiang Tan a4ec4c06e3
Fix the build. 2020-08-27 13:50:07 +08:00
Guo Xiang Tan 40c6d90df3 PERF: Create a partial regular post_search_data index on large sites.
With the addition of `PostSearchData#private_message`, a partial
index consisting of only search data from regular posts can be created.
The partial index helps to speed up searches on large sites since PG
will not have to do an index scan on the entire search data index which
has shown to be a bottle neck.
2020-08-27 13:42:00 +08:00
Blake Erickson 02833e133c FIX: Suspend API to require `suspend_until` and `reason` params
These fields are required when using the UI and if `suspend_until`
params isn't used the user never is actually suspended so we should
require these fields when suspending a user.
2020-08-26 19:05:48 -06:00
Kris 95179a5ab6 Button bar needs visible overflow, follow-up to 489443e 2020-08-26 20:52:03 -04:00
Kris 489443e3a9
UX: Better handling of long category names and button bar in composer (#10542) 2020-08-26 19:38:20 -04:00
Jordan Vidrine 7cdef9f793
Remove tag name from classList (#10540)
* Remove tag name from classList
2020-08-26 17:20:57 -05:00
Joshua Rosenfeld 1e6d125db6
FIX: Remove additional paths from robots.txt
admin path is protected by guardian and thus inaccessible to crawlers

Follow up to b52143f
2020-08-26 16:52:22 -04:00
Jordan Vidrine ce2491dc2f
Css class additions (#10532)
* Category Page / Tag Class Additions

These additions add:

-the name of the tag as a css class to discourse tags.
-'pinned' as a css class to pinned topics in the category view
2020-08-26 12:21:47 -05:00
Joffrey JAFFEUX f5eccdd0b8
FIX: ensures period-chooser is not losing query params (#10534)
eg repro before:
- visit http://pr-discourse.test/top/weekly?f=foo
- select another period in the period chooser
- f=foo was gone

After this commit it should still be present
2020-08-26 19:01:08 +02:00
Robin Ward ff4de97dfd
REFACTOR: Move `bootbox` to an import instead of global variable (#10533) 2020-08-26 12:57:13 -04:00