Commit Graph

2033 Commits

Author SHA1 Message Date
Kris
a92a6b7b10 UX: Minor layout fixes and improved consistency on theme admin 2020-08-24 22:51:58 -04:00
Roman Rizzi
dd13304b81
FEATURE: More API scopes (#10493) 2020-08-24 12:15:08 -03:00
David Taylor
9debfed060
FIX: Add cache-busting parameter to ace-editor javascript
Long-term we should consider adding the file hash to javascript URLs, so that the URL changes whenever the file changes
2020-08-24 12:29:46 +01:00
Vinoth Kannan
8348a41124
FEATURE: add regular_categories field in site setting & user option. (#10477)
Like "default watching" and "default tracking" categories option now the "regular" categories support is added. It will be useful for sites that are muted by default. The user option will be displayed only if `mute_all_categories_by_default` site setting is enabled.
2020-08-20 00:35:04 +05:30
Roman Rizzi
390615fbcd
UX: Help users understand the meaning of each scope. (#10468) 2020-08-18 15:12:04 -03:00
Penar Musaraj
882b0aac19
DEV: Let themes extend color definitions (#10429)
Themes can now declare custom colors that get compiled in core's color definitions stylesheet, thus allowing themes to better support dark/light color schemes. 

For example, if you need your theme to use tertiary for an element in a light color scheme and quaternary in a dark scheme, you can add the following SCSS to your theme's `color_definitions.scss` file: 

```
:root {
  --mytheme-tertiary-or-quaternary: #{dark-light-choose($tertiary, $quaternary)};
}
```

And then use the `--mytheme-tertiary-or-quaternary` variable as the color property of that element. You can also use this file to add color variables that use SCSS color transformation functions (lighten, darken, saturate, etc.) without compromising your theme's compatibility with different color schemes.
2020-08-18 13:02:13 -04:00
Robin Ward
5b2c306bb8 REFACTOR: Remove Discourse.HighlightJSPath from globals
Instead we use the session, and pass that along where necessary.
2020-08-17 15:45:44 -04:00
David Taylor
8ac85f54fb
DEV: Remove blob: workers from CSP (#10440)
Ace editor is reconfigured to load workers directly from their JS URL. Workers must be on the same origin as the site, so they will not use the CDN.
2020-08-14 18:15:30 +01:00
Robin Ward
6a9bde3bf4 REFACTOR: Remove router:main and getOwner 2020-08-14 12:49:53 -04:00
Vinoth Kannan
476d26159a
FEATURE: add new user option skip_new_user_tips. (#10437)
And add new site setting `default_other_skip_new_user_tips` in user preferences category.
2020-08-14 19:10:56 +05:30
David Taylor
3cf93e9a8f
Revert "DEV: Disable ACE editor worker blobs"
This reverts commit d5463d2a4d.

With S3 assets, CORS prevents loading worker assets directly.
2020-08-14 14:12:11 +01:00
David Taylor
d5463d2a4d
DEV: Disable ACE editor worker blobs
This will allow us to remove `blob:` URLs from the worker-src CSP directive
2020-08-14 12:01:46 +01:00
Vinoth Kannan
6a8562894a FIX: change the controller method name to match its new name.
The controller method `_changeFilters` is now changed to `changeFilters` in the commit 1fc58b5a4e. But it was not modified in the `admin-tools` service script.
2020-08-13 00:58:35 +05:30
Guo Xiang Tan
808e84a856
FIX: Expose PG headline highlighting for all search results. 2020-08-12 16:43:47 +08:00
Guo Xiang Tan
1d2ba8fd52
DEV: No need to highlight search if PG headline generation is used. 2020-08-07 10:50:30 +08:00
Bianca Nenciu
42f62a9e63
FIX: Shows all_results if current settings category has no results (#10358)
Searching for a specific setting only showed results from the current selected category. Before fixing fd02856, it automatically redirected the user to all_results. This was a problem because the redirect always happened and there was no way to share a link to a specific category.

The fix to this bug is to simply redirect the user to all_results if there are no results to be displayed.
2020-08-05 09:39:54 +02:00
Kris
eb619c8e98 prevent long email addresses from breaking admin table layout 2020-08-04 16:47:50 -04:00
Robin Ward
0b3f963804 FIX: Removes an error in the console in test mode 2020-07-31 14:06:52 -04:00
Bianca Nenciu
fd02856f80
FIX: Keep category name in URL when filtering (#10317) 2020-07-29 14:57:05 +03:00
Robin Ward
4e317e7aca FIX: Computed property deprecation
This `description` field on a theme is returned from the server side and
needn't be calculated in the front end. I tested in the UX and seems to
work well.
2020-07-28 11:55:47 -04:00
Joffrey JAFFEUX
0c7eaa57b2
FEATURE: allows to display charts by day/week/month (#10325) 2020-07-28 16:14:41 +02:00
Krzysztof Kotlarek
e0d9232259
FIX: use allowlist and blocklist terminology (#10209)
This is a PR of the renaming whitelist to allowlist and blacklist to the blocklist.
2020-07-27 10:23:54 +10:00
Robin Ward
808b5aa5ba FIX: Pass siteSettings through in more places 2020-07-24 09:45:55 -04:00
Robin Ward
98fee7aa50 REFACTOR: Remove Discourse.SiteSettings from highlightSyntax 2020-07-24 09:45:55 -04:00
Bianca Nenciu
1fc58b5a4e
FEATURE: Add query params to staff action logs (#10279) 2020-07-22 18:25:58 +03:00
jbrw
0ed784b4fc
FEATURE: Create logs for Group Moderator changes (#10271) 2020-07-21 14:29:02 -04:00
tshenry
15c4f6e4cf
FIX: update meh-o icon to far-meh (#10256) 2020-07-16 16:26:17 -07:00
Roman Rizzi
f13ec11c64
FEATURE: Add scopes to API keys (#9844)
* Added scopes UI

* Create scopes when creating a new API key

* Show scopes on the API key show route

* Apply scopes on API requests

* Extend scopes from plugins

* Add missing scopes. A mapping can be associated with multiple controller actions

* Only send scopes if the use global key option is disabled. Use the discourse plugin registry to add new scopes

* Add not null validations and index for api_key_id

* Annotate model

* DEV: Move default mappings to ApiKeyScope

* Remove unused attribute and improve UI for existing keys

* Support multiple parameters separated by a comma
2020-07-16 15:51:24 -03:00
Robin Ward
ca13160435 REFACTOR: Remove Discourse.SiteSettings from user/admin-user 2020-07-15 11:48:55 -04:00
David Taylor
7d300006a1
Revert "PERF: Move highlightjs to a background worker, and add result cache (#10191)"
This caused a CORS error when used with S3 asset storage

This reverts commit d09f283e91.
2020-07-15 13:52:35 +01:00
David Taylor
d09f283e91
PERF: Move highlightjs to a background worker, and add result cache (#10191)
Syntax highlighting is a CPU-intensive process which we run a lot while rendering posts and while using the composer preview. Moving it to a background worker releases the main thread to the browser, which makes the UX much smoother.
2020-07-15 12:48:07 +01:00
Mark VanLandingham
bfde665e76
DEV: Classes and plugin-outlet in admin user-list nav (#10204) 2020-07-09 15:10:25 -05:00
Joffrey JAFFEUX
56475f57c5
UX: simplifies editing email templates by always having a default (#10179) 2020-07-07 11:44:13 +02:00
Bianca Nenciu
b9e3db6387
UX: Add link to user email preferences in admin view (#10169) 2020-07-07 10:20:14 +10:00
Martin Brennan
516a03be09
FIX: Improve admin permalink UX (#10101)
The admin permalink list was a little tricky to use because the URLs are easily reduced with a ... if they are too long. This adds a copy to clipboard button for the URL and a title on hover so the full text of the URL can be seen.
2020-06-22 13:14:16 +10:00
Mark VanLandingham
0b58414de2
DEV: Add classes to admin customize nav items (#10092) 2020-06-19 10:51:53 -05:00
Bianca Nenciu
ff6811ceb8
Allow multiple groups which can vote when creating a poll (#10015)
* FEATURE: Allow multiple groups which can vote when creating a poll

* DEV: Fix select-kit deprecations

* DEV: Fix lint
2020-06-12 14:52:32 +03:00
Dan Ungureanu
3a7ca97c36
FIX: Use include-subcategories filter in report export (#10007)
Some filters were renamed and the conversion of the filter names and arguments
was removed.
2020-06-10 18:57:39 +03:00
Robin Ward
a9def011d0 FIX: (getURL "") was not working with the i18n helper 2020-06-05 09:53:43 -04:00
Penar Musaraj
2d880b42a3
UX: Add simple-list setting type (#9970) 2020-06-04 10:44:54 -04:00
Robin Ward
ba00cc8ec4
DEV: Move Discourse.getURL and related functions to a module (#9966)
* DEV: Move `Discourse.getURL` and related functions to a module

* DEV: Remove `Discourse.getURL` and `Discourse.getURLWithCDN`

* FIX: `get-url` is required for server side code

* DEV: Deprecate `BaseUri` too.
2020-06-03 12:45:26 -04:00
Kris
9e9ff01e86 Add missing text back in 2020-06-02 16:39:18 -04:00
Robin Ward
a95826f60c
Remove discourse constants (#9958)
* DEV: `Discourse.baseUri` does not exist

This never could have worked - should have been `Discourse.BaseUri` if
anything.

* DEV: Remove Discourse.Environment

* DEV: Remove `Discourse.disableMissingIconWarning`

* DEV: A bunch more missing environment checks
2020-06-01 16:33:43 -04:00
Robin Ward
2033c3ec9c Revert "Revert "DEV: Import MessageBus from message-bus-client instead of globals""
This reverts commit b10e995d9d.
2020-05-28 08:42:36 -04:00
Joffrey JAFFEUX
0854785175
FIX: allows to define label/title properties for display instead of name
Usage:

```
const content = [{foo: "FOO", bar: "BAR", value: 1, name: "foo-bar"}];

{{combo-box
  content=content
  value=value
  labelProperty="foo"
  titleProperty="bar"
}}
```
2020-05-28 08:30:31 +02:00
Blake Erickson
b10e995d9d Revert "DEV: Import MessageBus from message-bus-client instead of globals"
This reverts commit 9dddbcc00d.
2020-05-27 16:14:09 -06:00
Robin Ward
9dddbcc00d DEV: Import MessageBus from message-bus-client instead of globals 2020-05-27 16:42:42 -04:00
Robin Ward
0f71d38d3a Revert "DEV: Import MessageBus from message-bus-client instead of globals (#9902)"
This reverts commit d3bd482142.
2020-05-27 16:34:30 -04:00
Robin Ward
d3bd482142
DEV: Import MessageBus from message-bus-client instead of globals (#9902) 2020-05-27 15:56:46 -04:00
Gerhard Schlager
631024ae5d FEATURE: Permalinks for tags 2020-05-25 14:51:01 +02:00
Michael Brown
d9a02d1336
Revert "Revert "Merge branch 'master' of https://github.com/discourse/discourse""
This reverts commit 20780a1eee.

* SECURITY: re-adds accidentally reverted commit:
  03d26cd6: ensure embed_url contains valid http(s) uri
* when the merge commit e62a85cf was reverted, git chose the 2660c2e2 parent to land on
  instead of the 03d26cd6 parent (which contains security fixes)
2020-05-23 00:56:13 -04:00
Jeff Atwood
20780a1eee Revert "Merge branch 'master' of https://github.com/discourse/discourse"
This reverts commit e62a85cf6f, reversing
changes made to 2660c2e21d.
2020-05-22 20:25:56 -07:00
Bianca Nenciu
fb15da43da
Remove old web hooks in favor of 'reviewable' web hook (#9776)
* FIX: Emit web hooks for flags

* FEATURE: Remove 'flag' web hook in favor of 'reviewable' web hook

* FEATURE: Remove 'queued post' web hook in favor of 'reviewable' web hook

* FIX: Do not set a default value for web hooks with no events
2020-05-20 12:07:48 +03:00
Roman Rizzi
52228b1fa6
DEV: These routes don't exist anymore (#9823) 2020-05-19 16:09:03 -03:00
Blake Erickson
1a2b9435b0
DEV: Standardize table sorting verbiage (#9757)
* DEV: Standardize table sorting verbiage

This commit creates a common component that tables can use to make their
headers sortable. This commit also standardizes on using `desc` as the
default and passing in the `asc=true` flag to adjust the sorting
direction.

* Add deprecation warnings

Adds deprecation warnings if using previous params and maintains
backwards compatibility. Set the default sort value for group members to
be asc.

* switch group requests to use common table-header-toggle

* update fixture
2020-05-14 20:10:59 -06:00
Kane York
869f9b20a2
PERF: Dematerialize topic_reply_count (#9769)
* PERF: Dematerialize topic_reply_count

It's only ever used for trust level promotions that run daily, or compared to 0. We don't need to track it on every post creation.

* UX: Add symbol in TL3 report if topic reply count is capped

* DEV: Drop user_stats.topic_reply_count column
2020-05-14 15:42:00 -07:00
Robin Ward
eab560fe2a
DEV: import I18n instead of global usage (#9768)
Co-authored-by: Mark VanLandingham <markvanlan@gmail.com>
Co-authored-by: Robin Ward <robin.ward@gmail.com>

Co-authored-by: Mark VanLandingham <markvanlan@gmail.com>
2020-05-13 16:23:41 -04:00
Guo Xiang Tan
822e594fc8
UX: Improve display of site setting validation message.
Previously, the validation message is shown inline with the label which
leads to the available width for both element being reduced.
2020-05-13 11:10:08 +08:00
Bianca Nenciu
16137308b0
FIX: Show Settings button if plugin has settings (#9728)
It used to check if the plugin has an enabled_setting.
2020-05-12 11:18:19 +03:00
Bianca Nenciu
8149bfbaf1
FEATURE: Filter settings by plugin (#9692) 2020-05-10 14:07:45 +03:00
Mark VanLandingham
da561a430d
DEV: Add data-name to popular-theme-item rows (#9714) 2020-05-08 14:38:41 -05:00
Joffrey JAFFEUX
1dd9df9cd0
REFACTOR: removes overwritten properties and duplicates fn (#9686) 2020-05-07 16:39:53 +02:00
Joffrey JAFFEUX
206d45fd96
REFACTOR: removes superfluous argument (#9683) 2020-05-07 16:38:09 +02:00
Robin Ward
01929e3505 DEV: Move preload-store to discourse/lib/preload-store
It's only used inside Discourse so it needn't be its own module
2020-05-06 15:28:06 -04:00
Vinoth Kannan
0fe8ad13fa UX: change the user merge button's label and icon. 2020-05-04 18:44:30 +05:30
Joffrey JAFFEUX
cdbba81ee0
UX: collapse extra files when browsing a theme component (#9610) 2020-05-01 20:19:17 +02:00
Robin Ward
d615de9139
DEV: Support for import Handlebars from 'handlebars'; (#9600)
* Remove Handlebars.SafeString usage

* DEV: Support for `import Handlebars from 'handlebars'`;

* FIX: Sprockets was broken when `node_modules` was present

By default the old version of sprockets looks for application.js
anywhere, including in a node_modules folder if this exists
(which it will when we move to Ember CLI.)
2020-04-30 16:41:02 -04:00
Robin Ward
03815f9795 DEV: Remove Handlebars.Utils.escapeExpression usage 2020-04-30 11:36:55 -04:00
Joffrey JAFFEUX
1b2db44678
FEATURE: allows to limit visible reports and tabs in dashboard (#9598) 2020-04-30 17:31:04 +02:00
Vinoth Kannan
71241a50f7 DEV: improve code readability & add tests for user guardian.
a511bea4cc
2020-04-30 20:59:33 +05:30
Joffrey JAFFEUX
45f704906d
UX: display info about extra files and uploader (#9595)
Co-authored-by: David Taylor <david@taylorhq.com>
2020-04-30 16:02:38 +02:00
Kris
24b9759c60 UX: fix dashboard version panel width by removing extra wrapper 2020-04-28 21:14:29 -04:00
Joffrey JAFFEUX
a8308e73e7
FIX: improves tag-list setting (#9574)
- Prevents setting to display an empty tag
- Updates dropdown when selecting/removing tag
2020-04-28 20:05:30 +02:00
Joffrey JAFFEUX
3bbd8b1258
UX: rework date time input range (#9524) 2020-04-22 22:17:53 +02:00
Vinoth Kannan
e5c44f6dcf UX: display 'merge' button in all non-staff user profiles. 2020-04-22 17:42:09 +05:30
Vinoth Kannan
ceee855d00 minor code improvement
a511bea4cc
2020-04-22 16:40:59 +05:30
Dan Ungureanu
e733701887
FEATURE: Make report filters reusable (#9444)
This commit also adds 'include subcategories' report filter
2020-04-22 11:52:50 +03:00
Vinoth Kannan
a511bea4cc
FEATURE: admin UI to merge two users. (#9509) 2020-04-22 14:07:51 +05:30
Joffrey JAFFEUX
98039e6cc5
FIX: template-lint uses strict rel-noopener rule which requires noreferrer (#9449) 2020-04-16 22:38:10 +02:00
Joffrey JAFFEUX
28906fdbc7
linting (#9447) 2020-04-16 22:14:46 +02:00
Vinoth Kannan
4a2c4232c5
FIX: remove word boundary regex (\b) for search result highlights. (#9338) 2020-04-15 11:11:00 +05:30
Kane York
c670a34013 DEV: Fix and enable the 'require-button-type' lint 2020-04-14 18:32:16 -07:00
Kane York
5a5685766a DEV: Fix all 'require-valid-alt-text' lints except in reused compoments
Three violations require parameters from the caller to generate valid alt text.
2020-04-14 17:21:20 -07:00
Joffrey JAFFEUX
c4644c61d9
DEV: enforces double quotes ember-template-lint (#9416) 2020-04-14 08:18:49 +02:00
Robin Ward
b6b92a562c
FEATURE: New site setting embed_unlisted (#9391)
If enabled, posts imported to discourse via embeddings will default to
unlisted until they receive a reply.
2020-04-13 15:17:02 -04:00
Joffrey JAFFEUX
b66b277dc4
DEV: enforces block-indentation of ember-template-lint rules (#9408) 2020-04-13 17:17:20 +02:00
Sam Saffron
83f5f9176b
DEV: only load staff logs when page is visited
Previously we would load admin staff action logs unconditionally as soon
as the controller was instantiated, this is not desirable we only want to
run the query when you visit the route.
2020-04-03 14:13:01 +11:00
Joffrey JAFFEUX
9c43963ff3
FIX: allows color-input to set hex and color names through input (#9339) 2020-04-02 21:19:31 +02:00
Kane York
2afb95fe3e DEV: Enable and fix the 'no-multiple-empty-lines' lint 2020-03-30 14:13:33 -07:00
Kane York
1703270055 DEV: Enable and fix no-trailing-spaces lint 2020-03-30 14:13:33 -07:00
Joffrey JAFFEUX
0996c3b7b3
FEATURE: allows multiple custom emoji groups (#9308)
Note: DBHelper would fail with a sql syntax error on columns like "group".

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2020-03-30 20:16:10 +02:00
Joffrey JAFFEUX
f8cb46c0e1
FIX: prevents exception when clicking component title above ace editor (#9309) 2020-03-30 18:55:15 +02:00
Jarek Radosz
67b34600d5
DEV: Use type instead of method in ajax calls (#8974)
Even though `type` is an alias for `method`, we have custom logic in `/discourse/lib/ajax` that checks only `type`, and ~200 other ajax calls in the codebase already use `type` param.
2020-03-26 21:00:10 +01:00
Kane York
07dc8d20c4 DEV: Enable and fix the 'require-iframe-title' lint 2020-03-26 12:31:34 -07:00
Kane York
6a1fe9ff87
FIX: Use 1 column instead of 4 for permalink destination (#9260) 2020-03-25 11:30:39 -07:00
Vinoth Kannan
b09f79366e UX: disallow tag creation in "default tags" site setting choosers. 2020-03-25 23:37:46 +05:30
David Taylor
d62d258fe5
Revert "FIX: word boundary regex (\b) not working in Unicode languages. (#9163)"
Lookbehind regex is not supported in Firefox or IE11

This reverts commit 572bb5988f.
2020-03-25 14:34:45 +00:00
Vinoth Kannan
572bb5988f
FIX: word boundary regex (\b) not working in Unicode languages. (#9163) 2020-03-25 18:39:19 +05:30
Robin Ward
4876884fd1 More JS files 2020-03-24 16:18:56 -04:00
Robin Ward
0fd0a04019 This should be js 2020-03-24 16:13:30 -04:00