Commit Graph

2146 Commits

Author SHA1 Message Date
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
Martin Brennan
e2ce12d414
FIX: Broken computing of userHasTimezone in bookmark modal and missing tap-tile templates for regular users (#9229)
Based on reports here https://meta.discourse.org/t/improved-bookmarks-with-reminders/144542

* Because the `userHasTimezone` property was computed and we were checking on an (essentially) global object, ember was not aware that the user timezone had changed because it changed in a different place. instead set the timezone as internal state for the modal on show and base the computed property off of that so it mutates correctly
* The tap-tile components were in the admin folder completely unnecessarily, move them out into the main discourse folder otherwise noone else can use the new bookmarks (icon + text is missing)
2020-03-18 11:12:23 +10:00
Vinoth Kannan
48d690ae01 FIX: Remote themes Github link should go to custom branch #9184 2020-03-18 03:57:54 +05:30
David Taylor
92e9fa70c7
DEV: Add class to backup restore buttons, for easier targeting 2020-03-17 18:46:17 +00:00
Roman Rizzi
c02273eb8b
FIX: Use delete_all_posts_max to improve consistency when using the delete button from the admin view (#9194) 2020-03-16 09:51:28 -03:00
Robin Ward
e40e06d78c Rename .js.es6 to .js in the admin application 2020-03-13 17:03:08 -04:00
Joffrey JAFFEUX
6102c287f7
FIX: prevents i18n helper to return a SafeString (#9191)
For convenience the i18n helper has been made returning a SafeString, but when used with other helpers, a String is expected and will cause unexpected behaviors.

This is the root cause of the initial bug fixed in d2bb127e2c

This commit is kept as it's a better security in case of unexpected behavior.
2020-03-12 16:50:20 +01:00
Joffrey JAFFEUX
11921c4868
DEV: enforces ember-template-lint: no-html-comments (#9183)
https://github.com/ember-template-lint/ember-template-lint/blob/master/docs/rule/no-html-comments.md
2020-03-12 07:51:05 +01:00
Joffrey JAFFEUX
d3b53fb551
REFACTOR: removes legacy bootstrap css class (#9174) 2020-03-11 15:31:29 +01:00
Joffrey JAFFEUX
61a2c3650d
DEV: enforces ember-template-lint: no-partial (#9173)
selected-posts parial is kept and calling the new component to prevent errors with users who would have rewritten topic.hbs

dashboard-problems and version-checks seem less risky and have only been converted to components
2020-03-11 15:30:14 +01:00
Joffrey JAFFEUX
4e0b2ae294
DEV: defines a constant for INPUT_DELAY (#9169) 2020-03-11 15:28:16 +01:00
Joffrey JAFFEUX
683cb28099
DEV: enforces ember-template-lint: no-triple-curlies (#9165)
This pr replaces `{{{ }}}` usage by a {{html-safe}} helper. While it doesn't solve the underlying issue, it gives us a path forward without risking breaking too much existing behavior.

Also introduces an htmlSafe computed macro:

```
import { htmlSafe } from "discourse/lib/computed";

htmlDescription: htmlSafe("description")
```

Overtime {{html-safe}} usage should be removed and moved to components properties or specialized components/helpers.
2020-03-11 09:23:10 +01:00
romanrizzi
f795c1b8e8 Revert "DEV: enforces ember-template-lint: no-triple-curlies (#9150)"
This reverts commit d436b600fb.

Triple curlies are still necessary for some raw templates.
2020-03-10 15:00:12 -03:00
Joffrey JAFFEUX
d436b600fb
DEV: enforces ember-template-lint: no-triple-curlies (#9150)
This pr replaces `{{{ }}}` usage by a {{html-safe}} helper. While it doesn't solve the underlying issue, it gives us a path forward without risking breaking too much existing behavior.

Also introduces an htmlSafe computed macro:

```
import { htmlSafe } from "discourse/lib/computed";

htmlDescription: htmlSafe("description")
```

Overtime {{html-safe}} usage should be removed and moved to components properties or specialized components/helpers.
2020-03-10 16:46:57 +01:00
Penar Musaraj
68328d2d64
DEV: Replace save-button partial with a component (#9066) 2020-03-10 09:37:54 -04:00
Roman Rizzi
826b4793c0
FEATURE: Approve suspect users is now true by default. The suspect users list was removed (#9151) 2020-03-10 08:56:42 -03:00
Jarek Radosz
5037b80c9c
Merge imports from the same module (#9144) 2020-03-09 17:38:37 +01:00
Joffrey JAFFEUX
f1bb1db354
DEV: enforces ember-template-lint: no-unbound (#9147)
From ember-template-lint documentation (https://github.com/ember-template-lint/ember-template-lint/blob/master/docs/rule/no-unbound.md):

```
{{unbound}} is a legacy hold over from the days in which Ember's template engine was less performant. Its use today is vestigial, and it no longer offers performance benefits.

It is also a poor practice to use it for rendering only the initial value of a property that may later change.
```

Co-Authored-By: Jarek Radosz <jradosz@gmail.com>
2020-03-09 15:28:31 +01:00
Joffrey JAFFEUX
4f37233208
DEV: enforces ember-template-lint: simple-unless (#9146) 2020-03-09 13:44:34 +01:00
Joffrey JAFFEUX
60b47d622e
UX: adds support for a color setting type (#9016) 2020-03-09 10:07:03 +01:00
Joffrey JAFFEUX
8612bfb152
DEV: enforces ember-template-lint: no-unused-block-params (#9138) 2020-03-09 10:03:46 +01:00
Joffrey JAFFEUX
e9b6b0194c
DEV: enforce ember-template-lint: no-unnecessary-concat (#9133) 2020-03-07 12:58:48 +01:00
Jarek Radosz
48ba65f406
DEV: Clean up Ember imports (#8979)
Includes:
* Import `computed` helpers
* Import `@ember/application`
* Import `isBlank` from `@ember/utils`
* Import `A` from `@ember/array`
* Import `EmberArray` from `@ember/array`
* Import `ArrayProxy` from `@ember/array/proxy`
* Import `warn` from `@ember/debug`
* Import `EmberObject` from `@ember/object`
* Import `Application` from `@ember/application`
* Import `EmberRouter` from `@ember/routing/router`
* Import `isPresent` from `@ember/utils`
* Import `computed` from `@ember/object`
* Import `guidFor` from `@ember/object`
* Import `isArray` from `@ember/array`
* Import `TextField` from `@ember/component`
* Import `TextArea` from `@ember/component`
* Import `Promise` from `rsvp`
* Import `Evented` from `@ember/object/evented`
* Replace deprecated `ember-addons/ember-computed-decorators` imports
2020-03-06 23:49:28 +01:00
Jeff Wong
86690155b3
FEATURE: prevent accidental canceling when drafting penalties (#9129)
Pop up a confirmation box when there is input. This prevents accidental closing
of the dialog boxes due to clicking outside.

This adds a development hook on modals in the form of a `beforeClose`
function. Modal windows can abort the close if the funtion returns false.

Additionally fixing a few issues with loop and state on the modal popups:

Escape key with bootbox is keyup.
Updating modal to close on keyup as well so escape key is working.
Fixes an issue where pressing esc will loop immediately back to the modal by:
keydown -> bootbox -> keyup -> acts as "cancel", restores modal

Needs a next call to reopenModal otherwise, keyup is handled again by the modal.
Fixes an issue where pressing esc will loop immediately back to the confirm:
esc keyup will be handled and bubble immediately back to the modal.

Additionally, only handle key events when the #discourse-modal is visible.
This resolves issues where escape or enter events were being handled by
a hidden modal window.
2020-03-06 09:36:56 -08:00
Jarek Radosz
ef6b7bd776
DEV: Use aliased inject imports (#9086)
This is a common Ember idiom for easier differentiation between controller and service imports.
2020-03-06 11:41:41 -05:00
Joffrey JAFFEUX
a24f51278a
DEV: enforces link-rel-noopener linting rule (#8936)
* DEV: enforces link-rel-noopener linting rule

* oops

* better syntax
2020-03-06 11:35:18 -05:00
Jeff Wong
6fe91bbbbb
Revert "FEATURE: prevent accidental canceling when drafting penalties (#9105)" (#9122)
This reverts commit 243284f998.

There are some issues in how the JS tests interact that I will need to figure out here before this can be merged.
2020-03-05 17:29:51 -08:00
Jeff Wong
243284f998
FEATURE: prevent accidental canceling when drafting penalties (#9105)
Pop up a confirmation box when there is input. This prevents accidental closing
of the dialog boxes due to clicking outside.

This adds a development hook on modals in the form of a `beforeClose`
function. Modal windows can abort the close if the funtion returns false.

Additionally fixing a few issues with loop and state on the modal popups:

Escape key with bootbox is keyup.
Updating modal to close on keyup as well so escape key is working.
Fixes an issue where pressing esc will loop immediately back to the modal by:
keydown -> bootbox -> keyup -> acts as "cancel", restores modal

Needs a next call to reopenModal otherwise, keyup is handled again by the modal.
Fixes an issue where pressing esc will loop immediately back to the confirm:
esc keyup will be handled and bubble immediately back to the modal.

Additionally, only handle key events when the #discourse-modal is visible.
This resolves issues where escape or enter events were being handled by
a hidden modal window.
2020-03-05 15:55:35 -08:00
Justin DiRose
a46741cbb9
DEV: Clean up selectors on backup modal (#9114) 2020-03-05 12:25:10 -06:00
Joffrey JAFFEUX
33f77e51b8
FIX: allows to select the action when agreeing with penalty (#9099)
Note this commit also fixes an issue where the edit post actions was trying to focus the edit textarea, but was using jquery functions on a DOM node.

scrollTo is not available on IE11 but that shouldn't cause much trouble.
2020-03-04 09:32:15 -05:00
Joffrey JAFFEUX
11425f8adc
FEATURE: alows to add a description link to a report (#9065)
This commit adds a description link to users_per_trust_level report linking to our blog  article on the subject https://blog.discourse.org/2018/06/understanding-discourse-trust-levels/
2020-03-02 14:30:51 -05:00
Jarek Radosz
fedd8e3e3a
DEV: Remove uses of deprecated Ember.copy and Copyable (#8978) 2020-03-02 14:24:05 -05:00
David Taylor
8ec2d8a814
FIX: Disable save button for API key creation when invalid (#9005) 2020-02-19 16:33:09 +00:00
Joffrey JAFFEUX
74f2d48018
FIX: makes setting-object capable of defining value/name properties itself (#9003) 2020-02-19 10:01:21 +01:00
Joffrey JAFFEUX
30e2867547
FIX: prevents setting default values on setting component to reload page
This would happen when clicking on "add all themes" for example.
2020-02-19 09:04:57 +01:00
jjaffeux
32b3f55ef6 Revert "FIX: enums should be treated as flat arrays (#8995)"
This reverts commit 05be9beefd.
2020-02-19 07:53:29 +01:00
Joffrey JAFFEUX
05be9beefd
FIX: enums should be treated as flat arrays (#8995) 2020-02-18 23:25:12 +01:00
Joffrey JAFFEUX
99746c2850
FIX: ensures report-filter/category is correctly filtering (#8992) 2020-02-18 17:37:43 +01:00
Kris
f81bebf93f UX: Cap staff action detail height 2020-02-14 14:23:31 -05:00
Penar Musaraj
ea0f20e331 DEV: Concatenate value-list choices array
Followup to 89d9704194
2020-02-14 11:33:17 -05:00
Penar Musaraj
89d9704194 FIX: value-list choices when removing a value
Fixes an issue where choices were broken when removing an item from the value-list component.

Adds test case for this scenario.
2020-02-14 11:21:06 -05:00
Joffrey JAFFEUX
7d94de6439
FIX: brings back castInteger as a safer migration path for sk2 (#8966) 2020-02-14 10:00:39 +01:00
Joffrey JAFFEUX
78a0ca53bf
FIX: makes user-selector use real booleans (#8909) 2020-02-11 20:20:12 +01:00
Joffrey JAFFEUX
902d0e1e3a
DEV: enforces no-invalid-interactive linting rule (#8907) 2020-02-11 15:55:16 +01:00
Joffrey JAFFEUX
0d9b99582d DEV: enforces table-groups linting rule (#8903) 2020-02-10 08:14:26 +01:00
Joffrey JAFFEUX
20944e69e4
FEATURE: adds trust_level_growth report (#8878) 2020-02-06 19:44:30 +01:00
Joffrey JAFFEUX
dafd3c3b47
DEV: enforces no self-closing-void-elements (#8879) 2020-02-06 17:26:06 +01:00
Joffrey JAFFEUX
f25e787ae2
FIX: ensures we have a proper component name (#8876) 2020-02-06 11:30:38 +01:00
Mark VanLandingham
499b57a9ed
DEV: Ember linting - disallow Ember.* variable usage (#8782) 2020-02-05 10:14:42 -06:00
Jarek Radosz
be42b87338
FIX: Allow submitting various forms via keyboard (#8866) 2020-02-05 15:23:35 +01:00
Joffrey JAFFEUX
f0fe2ba9ac
UX: introduces icon-picker component for badges (#8844) 2020-02-05 00:41:10 +01:00
Vinoth Kannan
dabba87954 DEV: introduce diffLocalChangesUrl attribute to theme model. 2020-02-04 21:33:19 +05:30
Joffrey JAFFEUX
1d54e78311
FIX: prevents exception on /admin/badges page when model is not set (#8849)
Exception:

TypeError: Cannot read property 'badge_type_id' of null
2020-02-04 15:34:19 +01:00
Joffrey JAFFEUX
5d31f353f4
remove duplicated }} (#8848) 2020-02-04 15:02:40 +01:00
Jarek Radosz
67d5ce8ed1
FIX: Sort out the route navigation in admin/email-style (#8837)
Previously it would go to the "html" page when refreshing on the "css" page, and would open an invalid empty-state page when trying to go to the "email style" tab when already on it.
2020-02-04 11:42:43 +01:00
Vinoth Kannan
e4f3244141 DEV: introduce updateUrl attribute to theme-setting-editor component. 2020-02-04 15:19:17 +05:30
Joffrey JAFFEUX
0431942f3d
DEV: select-kit 2 (#7998)
This new iteration of select-kit focuses on following best principales and disallowing mutations inside select-kit components. A best effort has been made to avoid breaking changes, however if you content was a flat array, eg: ["foo", "bar"] You will need to set valueProperty=null and nameProperty=null on the component.

Also almost every component should have an `onChange` handler now to decide what to do with the updated data. **select-kit will not mutate your data by itself anymore**
2020-02-03 14:22:14 +01:00
Mark VanLandingham
9fa2016d2a
DEV: Plugin outlet for admin backup view (#8793) 2020-01-27 12:31:08 -06:00
Roman Rizzi
9eb622985a
FEATURE: Replace existing badge owners when using the bulk award feature (#8770)
* FEATURE: Replace existing badge owners when using the bulk award feature

* Use ActiveRecord to sanitize title update query, Change replace checkbox text

Co-Authored-By: Robin Ward <robin.ward@gmail.com>

Co-authored-by: Robin Ward <robin.ward@gmail.com>
2020-01-23 14:14:58 -03:00
Bianca Nenciu
0a27086764
FEATURE: Export all types of reports (#8748)
There is a single stacked_chart which was not exportable
2020-01-21 18:43:19 +02:00
Jarek Radosz
fe588cc7f8
DEV: Fix function prototype deprecations (#8681)
* DEV: Fix the function prototype observers deprecation

DEPRECATION: Function prototype extensions have been deprecated, please migrate from function(){}.observes('foo') to observer('foo', function() {}). [deprecation id: function-prototype-extensions.observes] See https://deprecations.emberjs.com/v3.x/#toc_function-prototype-extensions-observes for more details.

* DEV: Fix the function prototype event listeners deprecation

DEPRECATION: Function prototype extensions have been deprecated, please migrate from function(){}.on('foo') to on('foo', function() {}). [deprecation id: function-prototype-extensions.on] See https://deprecations.emberjs.com/v3.x/#toc_function-prototype-extensions-on for more details.

* DEV: Simplify `default as` imports

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2020-01-16 18:56:53 +01:00
romanrizzi
d3091edcea UX: Return a friendlier error when the CSV is invalid. Added a cancel button to return to the /badges view 2020-01-13 15:53:41 -03:00
Robin Ward
e4a85e2a80 Minor tweaks to badge CSV upload 2020-01-13 12:44:22 -05:00
Roman Rizzi
d69c5eebcf
Feature: Mass award badge (#8694)
* UI: Mass grant a badge from the admin ui

* Send the uploaded CSV and badge ID to the backend

* Read the CSV and grant badge in batches

* UX: Communicate the result to the user

* Don't award if badge is disabled

* Create a 'send_notification' method to remove duplicated code, slightly shrink badge image. Replace router transition with href.

* Dynamically discover current route
2020-01-13 11:20:26 -03:00
Penar Musaraj
b1402d9f13 DEV: replace "warning" icons with "exclamation-triangle" 2020-01-06 12:51:44 -05:00
Penar Musaraj
f755810906 DEV: replace "trash" icons with "trash-alt" 2020-01-06 12:35:00 -05:00
David Taylor
4c9ca24ccf
FEATURE: Hash API keys in the database (#8438)
API keys are now only visible when first created. After that, only the first four characters are stored in the database for identification, along with an sha256 hash of the full key. This makes key usage easier to audit, and ensures attackers would not have access to the live site in the event of a database leak.

This makes the merge lower risk, because we have some time to revert if needed. Once the change is confirmed to be working, we will add a second commit to drop the `key` column.
2019-12-12 11:45:00 +00:00
Joffrey JAFFEUX
dc6b02f050
UX: attempts to make charts loading less laggy (#8529) 2019-12-11 15:49:17 +01:00
Martin Brennan
6261339da9
Improving bookmarks part 1 (#8466)
Note: All of this functionality is hidden behind a hidden, default false, site setting called `enable_bookmarks_with_reminders`. Also, any feedback on Ember code would be greatly appreciated!

This is part 1 of the bookmark improvements. The next PR will address the backend logic to send reminder notifications for bookmarked posts to users. This PR adds the following functionality:

* We are adding a new `bookmarks` table and `Bookmark` model to make the bookmarks a first-class citizen and to allow attaching reminders to them.
* Posts now have a new button in their actions menu that has the icon of an actual book
* Clicking the button opens the new bookmark modal.
* Both name and the reminder type are optional.
* If you close the modal without doing anything, the bookmark is saved with no reminder.
* If you click the Cancel button, no bookmark is saved at all.
* All of the reminder type tiles are dynamic and the times they show will be based on your user timezone set in your profile (this should already be set for you).
* If for some reason a user does not have their timezone set they will not be able to set a reminder, but they will still be able to create a bookmark.
* A bookmark can be deleted by clicking on the book icon again which will be red if the post is bookmarked.

This PR does NOT do anything to migrate or change existing bookmarks in the form of `PostActions`, the two features live side-by-side here. Also this does nothing to the topic bookmarking.
2019-12-11 14:04:02 +10:00
Blake Erickson
f5cca4930d DEV: Remove buffered rendering from admin backup logs
This is another refactoring in the multi-step process to remove all uses
of our custom Render Buffer.

Previous commit: da66950cf5 in this
series.

This commit affects the display of the backup logs. It is just a
refactor and does not change any functionality.
2019-12-09 14:45:36 -07:00
Krzysztof Kotlarek
5e29ae3ef5
FEATURE: Warning when component is added and not assigned (#8482)
When a component is installed and not assigned to any theme and the user is changing page, we should display a warning.

If the user decides to skip warning or come back later, a warning should not be shown anymore.

Also, when the user clicks "delete" button right after installation, warning about forgotten themes should not be shown.
2019-12-10 08:43:26 +11:00
Blake Erickson
da66950cf5 DEV: Remove buffered rendering from backup upload progress
This is another refactoring in the multi-step process to remove all uses
of our custom Render Buffer.

Previous commit: 54e4559aea in this
series.

This commit affects the display of the backup upload progress bar. It is
just a refactor and does not change any functionality.
2019-12-06 17:11:25 -07:00
Krzysztof Kotlarek
fa52ed3b16
FIX: bufferedValuesString.split is not a function (#8463)
Fix an error `bufferedValuesString.split is not a function`.
It is happening when bufferedValue is a positive boolean (checkbox value)
2019-12-05 08:25:49 +11:00
Neil Lalonde
875f0d8fd8
FEATURE: Tag synonyms
This feature adds the ability to define synonyms for tags, and the ability to merge one tag into another while keeping it as a synonym. For example, tags named "js" and "java-script" can be synonyms of "javascript". When searching and creating topics using synonyms, they will be mapped to the base tag.

Along with this change is a new UI found on each tag's page (for example, `/tags/javascript`) where more information about the tag can be shown. It will list the synonyms, which categories it's restricted to (if any), and which tag groups it belongs to (if tag group names are public on the `/tags` page by enabling the "tags listed by group" setting). Staff users will be able to manage tags in this UI, merge tags, and add/remove synonyms.
2019-12-04 13:33:51 -05:00
Krzysztof Kotlarek
bb69e8942e
FEATURE: ability to add all active components to theme (#8447)
* FEATURE: ability to add all active components to theme

* FIX: add a component to all themes takes only active ones

* FIX: move select components/themes to top

* FIX: improve defaultIsAvailable

* FIX: Add filter(Boolean) and remove btn class
2019-12-04 17:13:41 +11:00
Blake Erickson
8f708bd6e1 DEV: Run prettier
Follow up to: 80f4b9e227
2019-12-03 17:39:39 -07:00
Blake Erickson
80f4b9e227 DEV: Remove buffered rendering from watched words
This is another refactoring in the multi-step process to remove all uses
of our custom Render Buffer.

Previous commit: bb31e7f5b6 in the series.

This commit affects the display of the Webhooks Deliver Status column. It
is just a refactor and does not change any functionality.
2019-12-03 17:23:10 -07:00
Krzysztof Kotlarek
b120728999
FEATURE: Ability to add components to all themes (#8404)
* FEATURE: Ability to add components to all themes

This is the first and functional step from that topic https://dev.discourse.org/t/adding-a-theme-component-is-too-much-work/15398/16

The idea here is that when a new component is added, the user can easily assign it to all themes (parents).

To achieve that, I needed to change a site-setting component to accept `setDefaultValues` action and `setDefaultValuesLabel` translated label.
Also, I needed to add `allowAny` option to disable that for theme selector.

I also refactored backend to accept both parent and child ids with one method to avoid duplication (Renamed `add_child_theme!` to more general `add_relative_theme!`)

* FIX: Improvement after code review

* FIX: Improvement after code review2

* FIX: use mapBy and filterBy directly
2019-11-28 16:19:01 +11:00
Blake Erickson
2bb36d72a3 DEV: Fix failing test on CI due to whitespace differences
I could not replicate the failure locally, but it was consistently
failing on CI with:

```
  Assertion Failed: it should escape watched words

      Expected:  <img src="x">, Actual:  <img src="x">
```

This commit removes an extra space that was added originally, but I
don't think it is really needed after double checking how it displays in
the UI. The `x` icon and the word have sufficient spacing between them.
If we need to we can tweak it in css instead.
2019-11-27 17:23:49 -07:00
Blake Erickson
83a521e8c6 DEV: Fix failing test with watched words
Follow up to: bb31e7f5b6

This commit fixes this failing test:

`Assertion Failed: it should escape watched words`

Now that we have a handlebars template we can us it for escaping because
it does that for us.
2019-11-27 16:48:01 -07:00
Blake Erickson
bb31e7f5b6 DEV: Remove buffered rendering from watched words
This is another refactoring in the multi-step process to remove all uses
of our custom Render Buffer.

Previous commit: 2673cad142 in this
series.

This commit affects the display of watched words on the admin watched
word page. It is just a refactor and does not change any functionality.
2019-11-27 15:47:13 -07:00
Kris
ff34ab6aef UX: Show obvious message when backup restoration is disabled 2019-11-26 12:55:25 -05:00
Blake Erickson
e0199e8094 DEV: Remove buffered rendering from admin-directory toggle
This is another refactoring in the multi-step process to remove all uses
of our custom Render Buffer.

Previous commit: d0ad5ecc6d in this
series.

This commit affects the table header sorting on the admin directory page.
It is just a refactor and should not change any functionality.
2019-11-25 18:09:18 -07:00
romanrizzi
a53b00a858 DEV: Pass query to the icon outlet 2019-11-22 13:44:31 -03:00
David Taylor
6f9afde9a8 UX: Allow enter key to submit test email in admin panel 2019-11-18 15:36:06 +00:00
Vinoth Kannan
56b19ba740 UX: instead of total user count display only the count of users going to be affected.
edec922803
2019-11-18 00:09:38 +05:30
Penar Musaraj
cc8baa1a7c Fix Prettier using correct version (1.19.1) 2019-11-15 10:34:26 -05:00
Mark VanLandingham
f9894aec97 DEV: Remove Discourse.User and import instead 2019-11-13 15:34:30 -05:00
Mark VanLandingham
3c5df82590 DEV: Remove Discourse.Site in favor of import (#8344)
* DEV: Remove Discourse.Site in favor of importing Site

* Ran prettier
2019-11-13 12:13:47 -05:00
Robin Ward
f518065654 FIX: computed is part of @ember/object not @ember/object/computed 2019-11-13 11:58:09 -05:00
David Taylor
cf4356cd81 UX: Do not add leading/trailing spaces when copying API key in Firefox
If there is any other whitespace in the container, then Firefox will add a leading/trailing space when double clicking the key. This commit wraps the key in a div with no whitespace, to work around the problem.
2019-11-12 16:00:57 +00:00
Mark VanLandingham
3dd2f2f701
DEV: Remove RSS feed polling in favor of plugin (#8233) 2019-11-12 09:49:02 -06:00
Jarek Radosz
9b841ea83f DEV: Run prettier 2019-11-12 11:49:31 +01:00
Jarek Radosz
5d4b240453
DEV: Provide radix argument to parseInt (#8281)
* DEV: Provide radix 10 argument to parseInt

* DEV: Provide radix 16 argument to parseInt

* DEV: Remove unnecessary parseInt calls

* Fix year formatting

parseInt was used here to convert decimals to ints
2019-11-12 10:47:42 +01:00
Robin Ward
e39d89ecd9 REFACTOR: Remove InputValidation which was simply an Ember.Object 2019-11-11 15:48:56 -05:00
Robin Ward
da04c602ba REFACTOR: Remove debounce to discourseDebounce
Otherwise it can be confused with the ember debounce
2019-11-11 13:34:01 -05:00
Robin Ward
f03edb36be REFACTOR: Remove Discourse.Model 2019-11-08 14:13:35 -05:00
Robin Ward
7ac2a55588 REFACTOR: Remove Discourse.Category constants 2019-11-08 13:31:00 -05:00
Mark VanLandingham
e51efce356
DEV: Remove all instances of Ember.computed (#8324) 2019-11-08 12:28:11 -06:00
Roman Rizzi
5a016b7eb0
DEV: Adds a new plugin outles to add custom icons on the admin users list (#8277) 2019-11-08 10:32:57 -03:00
Vinoth Kannan
edec922803 FIX: use 'about.json' endpoint instead of using ember model to get the data. 2019-11-08 14:17:51 +05:30
David Taylor
99b0697bd9 FIX: Correct display of last used date in API key details UI 2019-11-07 23:41:43 +00:00
Mark VanLandingham
6275c05c0d
DEV: Move computed to discourseComputed (#8312) 2019-11-07 15:38:28 -06:00
Mark VanLandingham
f8d69253e8
FIX: Prettier to fix build (#8311) 2019-11-07 12:07:08 -06:00
Mark VanLandingham
9ffdbf912f
DEV: Import ember ENV instead of Ember.testing (#8305) 2019-11-07 11:20:35 -06:00
David Taylor
f611aa6ada FIX: Correct translation key for api key revoke button 2019-11-06 16:13:12 +00:00
Mark VanLandingham
edc135d9c5
DEV: Import set, setProperties, helper, and string functions (#8297) 2019-11-05 12:43:49 -06:00
Mark VanLandingham
014f19b6ea
DEV: Import Promise from rsvp (#8296) 2019-11-05 10:37:32 -06:00
David Taylor
52c5cf33f8
FEATURE: Overhaul of admin API key system (#8284)
- Allow revoking keys without deleting them
- Auto-revoke keys after a period of no use (default 6 months)
- Allow multiple keys per user
- Allow attaching a description to each key, for easier auditing
- Log changes to keys in the staff action log
- Move all key management to one place, and improve the UI
2019-11-05 14:10:23 +00:00
Mark VanLandingham
fa56ba89a5 Import getProperties from @ember/object 2019-11-04 14:24:30 -05:00
Jarek Radosz
d43e7354ec
DEV: Convert <button> tags to {{d-button}} components (#8224)
* DEV: Convert <button> tags to {{d-button}}

* Fixes
2019-11-04 11:23:54 +01:00
Joffrey JAFFEUX
8d69944b4e FIX: update action should be in setting-component mixin (#8287)
This was causing an exception on some component (eg: value-list in a theme-component setting) which couldn't find an action named update.
2019-11-02 18:24:41 +05:30
Robin Ward
0e2261c414 FIX: Linting 2019-11-01 13:57:22 -04:00
Robin Ward
dceb72bc69 FIX: Move makeArray to discourse-common 2019-11-01 13:50:15 -04:00
Robin Ward
640a05c4ee REFACTOR: Remove Ember.get 2019-11-01 13:50:15 -04:00
Robin Ward
89f602f66b REFACTOR: Ember.makeArray was removed from the public API 2019-11-01 13:50:15 -04:00
Robin Ward
90f934a660 REFACTOR: Use a module for Ember.isEmpty 2019-11-01 13:50:15 -04:00
Vinoth Kannan
72aa26c8c5
FEATURE: New site settings for default tags in user preferences. (#8283) 2019-11-01 12:40:13 +05:30
Vinoth Kannan
d355506123 FEATURE: Option to update user preferences of all users when default site setting changed. 2019-10-31 06:48:03 +05:30
Vinoth Kannan
7a264217f2 FIX: default user preferenced categories are not updating in admin site setting UI. 2019-10-31 05:45:57 +05:30
Sam Saffron
13cca3eaa0 DEV: run files through prettier
2ae21e9 was prettiered using an old version of prettier.

This re-applies it using latest.
2019-10-31 10:18:29 +11:00
Mark VanLandingham
02a886ce13
DEV: Import Ember.on from @ember/object/evented (#8268)
* DEV: Import `Ember.on` from @ember/object/evented

* Dont import "on" outsie of the js or admin app

* Fixed error when resolving merge conflicts
2019-10-30 17:05:27 -05:00
Mark VanLandingham
2ae21e9c35
DEV: Import every instance of Ember.computed function (#8267)
* DEV: Import every instance of Ember.computed function

* export default for Ember.computed
2019-10-30 15:28:29 -05:00
Mark VanLandingham
ced3807b23
FIX: Prettier on importing mixin (#8270) 2019-10-30 15:13:48 -05:00
Mark VanLandingham
ba4b557114 DEV: Remove Ember.Mixin to import @ember/object/mixin (#8269) 2019-10-30 15:03:08 -04:00
Jarek Radosz
080e899b8c
DEV: Tag group improvements (#8252)
* DEV: Add the actual "tag_groups/new" route

Allows refreshing the "new" page without an error.

* DEV: Prevent attempts to create group tags if tagging is disabled

* DEV: Refactor the tag-groups controller

Gets rid of `selectedItem`, `selected`, and `selectTagGroup` action.

* DEV: Rename tag-groups-show to tag-groups-edit

* DEV: Refactor tag-groups form

* Extracted the tag-groups-form that's used by tag-groups-new and tag-groups-edit
* The model is now a buffered property
* Serialization relies more heavily on RestAdapter now
* Data is sent as JSON
* Payload is now namespaced ("tag_group")

* Update app/assets/javascripts/discourse/controllers/tag-groups-new.js.es6

Co-Authored-By: Joffrey JAFFEUX <j.jaffeux@gmail.com>

* Update app/assets/javascripts/discourse/components/tag-groups-form.js.es6

Co-Authored-By: Joffrey JAFFEUX <j.jaffeux@gmail.com>

* Update app/assets/javascripts/discourse/controllers/tag-groups-edit.js.es6

Co-Authored-By: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2019-10-30 16:57:13 +01:00
Robin Ward
8d34f4bbd9 Revert "Revert Ember.run refactors"
This reverts commit fcb1ca52f9.
2019-10-30 09:48:24 -04:00
Robin Ward
fcb1ca52f9 Revert Ember.run refactors
This reverts commit 5ca60fcb6b.
2019-10-29 17:10:47 -04:00
Robin Ward
e5525d03b8 FIX: Yet more linting fixes 2019-10-29 16:14:46 -04:00
Robin Ward
5ca60fcb6b REFACTOR: Use imports for Ember.run 2019-10-29 15:31:56 -04:00
Mark VanLandingham
c7475ee03b
DEV: Import EmberObject rather than global variable (#8256)
* DEV: Import ember/object rather than Ember.Object globally

* fixed broken object proxy import

* prettier on js

* added @ember/object/proxy to loader

* added unstaged file

* Fixed objet proxy reference is loader

* Linting!
2019-10-29 14:23:50 -05:00
Robin Ward
356e2a4b4a FIX: Linting 2019-10-29 13:31:44 -04:00
Robin Ward
230541c975 REFACTOR: Use Ember modules for @ember/service 2019-10-29 13:29:08 -04:00
Robin Ward
a99c705c21 REFACTOR: Replace Ember.controller.inject with import
Puts it more in line with updated ember code
2019-10-29 13:17:38 -04:00
Mark VanLandingham
0a499966e9
DEV: Refactor setting component save callback (#8261)
* DEV: Refactor setting component save callback

* refactor site-setting component around new callback

* add callback to theme-translation component

* remove the save callback altogether
2019-10-29 12:01:45 -05:00
Joffrey JAFFEUX
88df84bf2b
FIX: theme component setting was not getting updated in the UI (#8247) 2019-10-28 10:33:31 +01:00
Neil Lalonde
f061aee818 FEATURE: support SCSS in custom email style
In the CSS tab of Admin > Customize > Email Style, SCSS can now be used.
2019-10-23 15:42:37 -04:00
Robin Ward
6287eccb35 REFACTOR: Remove Ember.Controller in favor of import 2019-10-23 13:06:54 -04:00
Robin Ward
e18af18fec Support and examples for Ember.Object and Ember.Controller imports
We should stop using global variables and instead import these as
needed.
2019-10-23 12:55:11 -04:00
Robin Ward
dd3ace5c77 REFACTOR: Replace Ember.Route with proper import 2019-10-23 12:39:32 -04:00
Robin Ward
a8a76198b1 REFACTOR: Remove Ember.Component global variable
Use imports instead.
2019-10-23 12:30:52 -04:00
Mark VanLandingham
e5311ab645 DEV: Import DiscourseRoute rather than Discourse.Route (#8225)
* DEV: Discourse.Route -> DiscourseRoute with import

* ran prettier on all routes

* prettiered one more file
2019-10-22 09:46:10 -04:00
Jarek Radosz
7de3e7b322
DEV: Fix the Function.prototype.on deprecation (#8205)
https://deprecations.emberjs.com/v3.x/#toc_function-prototype-extensions-on
2019-10-18 01:49:41 +02:00
Neil Lalonde
85140aa09a UX: dashboard links to git commits list instead of git comparison
Previously the link went to a comparison of the installed commit with
the tests-passed branch. This change will show the list of installed
commits.
2019-10-17 15:08:43 -04:00
Vinoth Kannan
3cdcd093ee
REFACTOR: improve the code readability. (#8211)
b2f682f35e
2019-10-17 22:05:44 +05:30
Vinoth Kannan
b2f682f35e
FEATURE: Option to update category preferences of all users when site setting changed (#8180) 2019-10-15 18:41:27 +05:30
David Taylor
445a3851d6 FEATURE: Display created and last_used dates for API keys 2019-10-09 14:24:41 +01:00
Kris
9e9d57d7ee General admin style cleanup 2019-10-04 13:25:54 -04:00
Joffrey JAFFEUX
aaf15944f8
FIX: errors due to confusion between trustLevel and trust_level (#8149) 2019-10-03 08:52:07 -04:00
Sam Saffron
1c3cbbe883 UX: bypass chrome autocomplete when editing admin text fields
Same issue as: 918a0ea3

off is ignored in chrome per: https://bugs.chromium.org/p/chromium/issues/detail?id=587466
2019-10-03 09:01:55 +10:00
Joffrey JAFFEUX
91dd6aacfb
FIX: ensures chart parent element is still present before render (#8145) 2019-10-02 17:54:30 -04:00
David Taylor
39f7e98b60
FIX: Ensure page is reloaded correctly when a hash is present (#8096)
To demonstrate the issue:
- Visit https://meta.discourse.org/#somethingHere while logged in
- Click "log out"
- You will be logged out, but the page will not be reloaded

Setting `window.location.pathname = "/"` will not reload the page if there is a hash present. Using `window.location = "/"` gives us the desired behavior.
2019-09-16 13:27:12 +01:00
Jarek Radosz
1dcdcb5c31
FIX: Cast all numerical values in reports (#8087)
* FIX: Cast all numerical values in reports

The backend can return some numerical values in report as strings. That results in unexpected order of values when sorting report tables.

* Create `toNumber()` helper

The `typeof` and `parseFloat` seem to be the fastest path: https://jsperf.com/number-vs-typeof-vs-parsefloat#results
2019-09-12 15:17:34 +02:00
Neil Lalonde
f0586ece32 FIX: errors in qunit tests when version check info is missing 2019-09-10 16:38:23 -04:00
Neil Lalonde
509e61e272 UX: Show installed version with SHA instead of number of commits
Removes the "+ 437" string at the end of "v2.4.0.beta2 + 437",
and adds a link to the exact commit on github underneath.
2019-09-10 14:59:51 -04:00
David Taylor
ca9ef58318 FIX: Allow dashboard to load even when git version cannot be found 2019-08-28 12:37:42 +01:00
Bianca Nenciu
ba396a5384
DEV: Use ResultSet with staff action logs. (#7661) 2019-08-13 20:55:05 +03:00
David Taylor
d348368ab6
FEATURE: Allow themes to override color transformation variables (#7987)
Theme developers can now add any of the transformed color variables to their color scheme in about.json. For example

```
  "color_schemes": {
    "Light": {
      "primary": "333333",
      "secondary": "ffffff",
      "primary-low": "ff0000"
    }
  },
```

would override the primary-low variable when compiling SCSS for the color scheme. The primary-low variable will also be visible in administrator color palette UI.
2019-08-12 11:02:38 +01:00
Joffrey JAFFEUX
731f61a818
UX: modifies admin email template to have more space for the form (#7993) 2019-08-12 10:27:25 +02:00
Joffrey JAFFEUX
d8dfa87f24
UX: improves dates on reports export UI (#7971)
- show it's UTC
- allows future
- shows date in more human readable format
2019-08-06 08:41:21 +02:00
David Taylor
06e757245f FEATURE: Add a test facility to the watched words admin interface 2019-08-02 15:29:12 +01:00
Joe
8531056ad5
UX: style fixes for admin digest email preview page (#7959)
* code formatting: Nothing changed in this commit except code formatting

* adds classes to digest refresh button

* adds margins to digest refresh button

* removes line break tags and uses CSS margins instead
2019-08-01 14:37:42 +08:00
Neil Lalonde
9656a21fdb
FEATURE: customization of html emails (#7934)
This feature adds the ability to customize the HTML part of all emails using a custom HTML template and optionally some CSS to style it. The CSS will be parsed and converted into inline styles because CSS is poorly supported by email clients. When writing the custom HTML and CSS, be aware of what email clients support. Keep customizations very simple.

Customizations can be added and edited in Admin > Customize > Email Style.

Since the summary email is already heavily styled, there is a setting to disable custom styles for summary emails called "apply custom styles to digest" found in Admin > Settings > Email.

As part of this work, RTL locales are now rendered correctly for all emails.
2019-07-30 15:05:08 -04:00
Joffrey JAFFEUX
fe7f0982af
DEV: attemps to limit Discourse.User.current() usage (#7943) 2019-07-26 11:20:11 +02:00
Osama Sayegh
f14c6d81f4
FEATURE: Watched words improvements (#7899)
This commit contains 3 features:

- FEATURE: Allow downloading watched words
This introduces a button that allows admins to download watched words per action in a `.txt` file.

- FEATURE: Allow clearing watched words in bulk
This adds a "Clear All" button that clears all deleted words per action (e.g. block, flag etc.)

- FEATURE: List all blocked words contained in the post when it's blocked
When a post is rejected because it contains one or more blocked words, the error message now lists all the blocked words contained in the post.

-------

This also changes the format of the file for importing watched words from `.csv` to `.txt` so it becomes inconsistent with the extension of the file when watched words are exported.
2019-07-22 14:59:56 +03:00
Roman Rizzi
eb26bee046
DEV: group_list site settings should store IDs instead of group names (#7860)
* DEV: group_list site settings should store IDs instead of group names

* Ship site setting to know when we should migrate group_list settings

* Migrate existing group_list site settings

* Bump migration timestamp and don't set null when migrating is not possible.
2019-07-19 15:17:58 -03:00
Joffrey JAFFEUX
8dfd0e0374 DEV: uses private API for currentPath (#7911)
* DEV: uses with private API for currentPath

router.currentRouteName as a slightly different API and application.currentPath is deprecated

* another fix
2019-07-18 17:00:39 -04:00
Joffrey JAFFEUX
9cdc059a99
fix tests (#7908) 2019-07-18 19:48:12 +02:00
Joffrey JAFFEUX
f9c7d5a4bd DEV: removes application.currentPath deprecation (#7905)
See https://deprecations.emberjs.com/v3.x#toc_application-controller-router-properties for more context
2019-07-18 13:29:37 -04:00
Joffrey JAFFEUX
617c74bc79 DEV: remove .property() deprecations (#7906)
More context at https://deprecations.emberjs.com/v3.x#toc_function-prototype-extensions-property
2019-07-18 13:28:23 -04:00
Neil Lalonde
194a2b612f FIX: string that can't be translated in watched words UI 2019-07-18 11:07:02 -04:00
Roman Rizzi
f5c707c97a
FEATURE: Gz to zip for exports (#7889)
* Revert "Revert "FEATURE: admin/user exports are compressed using the zip format (#7784)""

This reverts commit f89bd55576.

* Replace .tar.zip with .zip
2019-07-18 09:34:48 -03:00
Penar Musaraj
a571efba35
FIX: Rename deprecated icons, allow custom icons in badges
- adds a migration renaming FA4 icon names in badges
- allows all icons to be used in badges (previously was limited to icons prefixed with fa-)
- renames remaining FA 4.7 icons equivalents
2019-07-16 11:13:44 -04:00
Joffrey JAFFEUX
b3eb67976d
DEV: Upgrades to Ember 3.10 (#7871)
Co-Authored-By: majakomel <maja.komel@gmail.com>
2019-07-16 12:45:15 +02:00
Osama Sayegh
6515ff19e5
FEATURE: Allow customization of robots.txt (#7884)
* FEATURE: Allow customization of robots.txt

This allows admins to customize/override the content of the robots.txt
file at /admin/customize/robots. That page is not linked to anywhere in
the UI -- admins have to manually type the URL to access that page.

* use Ember.computed.not

* Jeff feedback

* Feedback

* Remove unused import
2019-07-15 20:47:44 +03:00
Guo Xiang Tan
4b0cf7f6dd SECURITY: XSS when displaying watched words in admin panel.
The XSS here is only possible if CSP is disabled. Low impact since CSP
is enabled by default in SiteSettings.
2019-07-15 10:55:50 +08:00
romanrizzi
f89bd55576 Revert "FEATURE: admin/user exports are compressed using the zip format (#7784)"
This reverts commit 8b2580e20f.
2019-07-10 11:38:51 -03:00
Roman Rizzi
8b2580e20f
FEATURE: admin/user exports are compressed using the zip format (#7784)
* FEATURE: admin/user exports are compressed using the zip format

* Update translations. Theme exporter now exports .zip file. Theme importer supports .zip and .gz files

* Fix controller test, updated locale and skip saving the csv export to disk
2019-07-10 11:13:03 -03:00
Penar Musaraj
f4dc6de9f1 FIX: Clear theme editor content on switching tabs
Issue happens when sending a null value to ACE Editor.
Fixed by sending an empty string to ACE instead of null.
2019-07-08 20:06:56 -04:00
Arpit Jalan
bd084b2147 FIX: do not show invite button if local logins are disabled 2019-07-05 15:16:20 +05:30
Joffrey JAFFEUX
f9f1df7611
DEV: prevents reports key to be time dependant when testing (#7850) 2019-07-03 15:43:01 +02:00
Bianca Nenciu
bfdf740a05 FIX: Show 'Export' button for all tabular reports. (#7838) 2019-07-03 14:47:36 +02:00
Osama Sayegh
3d64532273 FEATURE: allow disabling theme components (#7812)
This allows you to temporarily disable components without having to remove them from a theme. 

This feature is very handy when doing quick fix engineering.
2019-07-03 18:18:11 +10:00
Joffrey JAFFEUX
72441e2c7c
FIX: page starts at 1 (#7844) 2019-07-02 17:26:23 +02:00
Arpit Jalan
ccb3ba509d
FIX: creating new badge is failing on empty SQL query (#7837) 2019-07-02 15:12:53 +05:30
Osama Sayegh
f1c67729de Different fix (#7815) 2019-07-02 11:53:16 +10:00
Joffrey JAFFEUX
11ae5c78db
FEATURE: adds infite scroll on admin users list page (#7821) 2019-07-01 11:00:06 +02:00
Joffrey JAFFEUX
61438c825a
fix prettier (#7823) 2019-06-28 09:36:38 +02:00
Bianca Nenciu
b2eb0f4ad6 FEATURE: Export any type of report supporting table mode. (#7662) 2019-06-28 08:50:31 +02:00
Joffrey JAFFEUX
c63268467e
DEV: prettier 1.18.2 (#7810) 2019-06-26 17:09:52 +02:00
Joffrey JAFFEUX
7c9d62c280
FIX: prevents failure when TL was mutated on internal object (#7808) 2019-06-26 14:51:45 +02:00
Penar Musaraj
e51de4cc25
FEATURE: Add endpoint to individually update a theme setting (#7789)
- also adds a new staff action type called "change theme setting" for easier logging of staff changes to theme settings
2019-06-21 13:49:14 -04:00
Penar Musaraj
0e26c57afa FIX: Do not refresh all settings on save for all settings, limit to only a few
- Followup to 0e303c7f5d

- Automatically reloads site settings after saving only for the logo, logo_small and large_icon settings.
2019-06-20 10:57:31 -04:00
Guo Xiang Tan
2265c5102f DEV: Remove unnecessary condition.
Follow up to 21876d46d6.
2019-06-06 15:55:49 +08:00
Guo Xiang Tan
21876d46d6 DEV: Missing loading spinner for staff action logs.
Follow up to e0c821ebb0.
2019-06-06 15:41:55 +08:00
Bianca Nenciu
e0c821ebb0 FEATURE: Make staff action logs page support infinite loading 2019-06-06 13:02:53 +10:00
Joffrey JAFFEUX
9585a16264
FIX: ensures correct i18n key is used (#7686) 2019-06-04 11:22:44 +02:00
Joffrey JAFFEUX
4283281397
FIX: ensures we have data to compute average (#7685) 2019-06-04 11:21:55 +02:00
Joffrey JAFFEUX
b79d02ff48
FEATURE: displays average for 2 columns tables which support average 2019-06-04 11:08:26 +02:00
Penar Musaraj
16982d2a69
Update UI for wizard themes further reading step (#7669) 2019-06-03 10:47:17 -04:00
Joffrey JAFFEUX
6decdfce5c
DEV: reduces memory footprint of tests - step 1 (#7591) 2019-05-28 12:15:12 +02:00
Robin Ward
d95a68b837 FEATURE: When suspending a user, allow the Delete + Replies action
Previously you could only delete the post
2019-05-27 12:27:16 -04:00
Joffrey JAFFEUX
395f0ca126
FIX: attempts to prevent stacked-chart from being cut off (#7608) 2019-05-27 15:43:27 +02:00
Joffrey JAFFEUX
d93f753b17
apply prettier on gigantic find and replace (#7604) 2019-05-27 10:42:53 +02:00
Joffrey JAFFEUX
bfea922167
DEV: global s/this.get\("(\w+)"\)/this.$1 (#7592) 2019-05-27 10:15:39 +02:00
Kris
dbd14a805c UX: Wrap long names on user admin page 2019-05-24 13:39:16 -04:00
David Taylor
5666316285 FEATURE: Display 'last updated' on dashboard, improve release notes link (#7560) 2019-05-17 15:42:45 +10:00
Régis Hanol
a5a4f9dc1a
DEV: make prettier happy
(cc @jjaffeux)
2019-05-16 11:38:47 +02:00
Joffrey JAFFEUX
d47bf8b6c4
SECURITY: updates lodash from 1.3.0 to 4.17.5 (#7546) 2019-05-16 10:34:19 +02:00
Régis Hanol
501bee56b7 Make prettier happy 2019-05-15 23:46:50 +02:00
Régis Hanol
db89722a98 UX: ignore leading/trailing whitespaces in site settings search 2019-05-15 22:22:20 +02:00
Joffrey JAFFEUX
b8db702a02
REFACTOR: admin-user-index route (#7534) 2019-05-13 17:04:41 +02:00
Joffrey JAFFEUX
df18243827
FIX: prevents exception if report doest define filters (#7532) 2019-05-13 13:34:28 +02:00
Penar Musaraj
a859ddc77e Improve theme/component delete modal warning 2019-05-10 14:14:12 -04:00
Arpit Jalan
ed70595314 UX: add information about the use of permalinks 2019-05-07 17:13:26 +05:30
Joffrey JAFFEUX
4bbb34f7cb
REFACTOR: admin-user (#7475) 2019-05-07 10:53:21 +02:00
Joffrey JAFFEUX
f73ed45429
REFACTOR: color-scheme model (#7477) 2019-05-07 10:51:52 +02:00
Joffrey JAFFEUX
9507eff927
REFACTOR: resumable-upload (#7474) 2019-05-07 10:51:11 +02:00
Guo Xiang Tan
abbc639e0d FIX: Only unregister service workers that belongs to Discourse. 2019-05-07 13:08:06 +08:00
Penar Musaraj
b948d97c8f
FEATURE: Show diff of local changes before updating remote theme (#7443) 2019-05-02 21:43:54 -04:00
Joffrey JAFFEUX
75591664e7
FIX: better handling of category filter deselection (#7468) 2019-05-02 10:03:12 +02:00
David Taylor
0e303c7f5d
FEATURE: Automatically generate optimized site metadata icons (#7372)
This change automatically resizes icons for various purposes. Admins can now upload `logo` and `logo_small`, and everything else will be auto-generated. Specific icons can still be uploaded separately if required.

## Core

- Adds an SiteIconManager module which manages automatic resizing and fallback

- Icons are looked up in the OptimizedImage table at runtime, and then cached in Redis. If the resized version is missing for some reason, then most icons will fall back to the original files. Some icons (e.g. PWA Manifest) will return `nil` (because an incorrectly sized icon is worse than a missing icon). 

- `SiteSetting.site_large_icon_url` will return the optimized version, including any fallback. `SiteSetting.large_icon` continues to return the upload object. This means that (almost) no changes are required in core/plugins to support this new system.

- Icons are resized whenever a relevant site setting is changed, and during post-deploy migrations

## Wizard

- Allows `requiresRefresh` wizard steps to reload data via AJAX instead of a full page reload

- Add placeholders to the **icons** step of the wizard, which automatically update from the "Square Logo"

- Various copy updates to support the changes

- Remove the "upload-time" resizing for `large_icon`. This is no longer required.

## Site Settings UX

- Move logo/icon settings under a new "Branding" tab

- Various copy changes to support the changes

- Adds placeholder support to the `image-uploader` component

- Automatically reloads site settings after saving. This allows setting placeholders to change based on changes to other settings

- Upload site settings will be assigned a placeholder if SiteIconManager `responds_to?` an icon of the same name

## Dashboard Warnings

- Remove PWA icon and PWA title warnings. Both are now handled automatically.

## Bonus

- Updated the sketch logos to use @awesomerobot's new high-res designs
2019-05-01 14:44:45 +01:00
Arpit Jalan
c6409fd2cc FIX: pass correct date arguments to server when exporting CSV 2019-05-01 10:46:30 +05:30
Arpit Jalan
002e1f560a FIX: initialize empty object if no custom filters are present 2019-05-01 10:27:19 +05:30
Neil Lalonde
a00354f11f Prettier site-settings/group-list.js.es6 2019-04-29 16:26:13 -04:00
Neil Lalonde
1ba72ccab8 DEV: add site setting type group_list for a list of groups
Add a js test
2019-04-29 16:15:22 -04:00
Joffrey JAFFEUX
286f2abc65
FIX: prevents exception when clicking directly on site text 2019-04-29 12:07:30 +02:00
Joffrey JAFFEUX
bcca2b5d73
FEATURE: initial implementation of generic filters for reports 2019-04-26 12:17:10 +02:00
Maja Komel
4b455e741e DEV: Ember 3.8.0
Co-Authored-By: majakomel <maja.komel@gmail.com>
2019-04-26 12:16:21 +02:00
Guo Xiang Tan
3ac18b92b3 UX: Editing theme name stays active when switching themes.
* Also fix length of input field.
2019-04-23 14:57:14 +08:00
Dannii Willis
16bfc29164 Move the trend icons on the admin dashboard inside the span (#7367)
so that it will have the tooltip as well
2019-04-17 18:11:01 +10:00
Guo Xiang Tan
347663e852 UX: Switch ellipsis direction when expanding web hook event details. 2019-04-16 14:28:23 +08:00
David Taylor
268d4d4c82
FEATURE: Multiple SCSS file support for themes (#7351)
Theme developers can include any number of scss files within the /scss/ directory of a theme. These can then be imported from the main common/desktop/mobile scss.
2019-04-12 11:36:08 +01:00
Roman Rizzi
536b90e0ef
FEATURE: Support searching custom staff actions (#7346) 2019-04-10 09:53:17 -03:00
Kris
df85d4593e UX: Unify admin intro styles for badges/customize, improve mobile 2019-04-09 20:32:24 -04:00
Joffrey JAFFEUX
a89c90ed5d
FIX: removes link to old dashboard (#7341) 2019-04-09 09:24:41 +02:00
David Taylor
f524f8f811
Remove Yahoo login support from core and deprecate OpenID2.0 (#7310)
- Plugin developers using OpenID2.0 should migrate to OAuth2 or OIDC. OpenID2.0 APIs will be removed in v2.4.0

- For sites requiring Yahoo login, it can be implemented using the OpenID Connect plugin: https://meta.discourse.org/t/103632

For more information, see https://meta.discourse.org/t/113249
2019-04-08 10:38:25 +01:00
Robin Ward
9c8cc73c39 UX: Show user fields when reviewing a user 2019-04-04 14:45:40 -04:00
Guo Xiang Tan
4175de5071 UX: Wrap title on search log term page with a proper div.
Search log filter selector was not floating right as it should.
2019-04-02 11:55:57 +08:00
Guo Xiang Tan
1a9452f24d UX: Pass period params when looking at search logs for a given term. 2019-04-02 11:51:41 +08:00
Joffrey JAFFEUX
e986e96227
DEV: removes old dashboard (#7295) 2019-04-01 12:39:49 +02:00
Robin Ward
67454c71c9 FIX: Missing translations for agree/disagree details 2019-03-29 14:14:59 -04:00
Guo Xiang Tan
8cfd887f33 Make eslint happy. 2019-03-29 12:59:40 +08:00
Guo Xiang Tan
4fa8fe575b UX: Use a step size of 1.
Follow up to 634a213e6d.
2019-03-29 12:14:11 +08:00
Guo Xiang Tan
634a213e6d FIX: Admin chart y axis labels being rounded up/down when value is small. 2019-03-29 12:03:41 +08:00
Guo Xiang Tan
e2ad374e5b UX: USe bar chart for admin search logs details page.
A bar chart is better when comparing the values across the X axis.
2019-03-29 11:54:49 +08:00
Guo Xiang Tan
947495e70d Follow up to 8c2fa99f78.
`/search_logs/term?term` is alittle weird looking but unless we add
proper slug support to term, we're going to have to live with this
first.
2019-03-29 10:39:44 +08:00
Guo Xiang Tan
c42df7ddd7 UX: Use the same default period for search logs index and term.
If the period is different, clicking through to view a term is confusing
because a different period will show a different set of stats.
2019-03-29 09:59:28 +08:00
Guo Xiang Tan
8c2fa99f78 FIX: Remove :term from admin/search_logs/term/:term route.
Search log terms is a string that can contain characters like `/` which
messes with the route.
2019-03-29 09:48:20 +08:00
Robin Ward
8c98c18c2b FIX: Remove old flagging scss, fix more linting 2019-03-28 13:48:35 -04:00
Robin Ward
b58867b6e9 FEATURE: New 'Reviewable' model to make reviewable items generic
Includes support for flags, reviewable users and queued posts, with REST API
backwards compatibility.

Co-Authored-By: romanrizzi <romanalejandro@gmail.com>
Co-Authored-By: jjaffeux <j.jaffeux@gmail.com>
2019-03-28 12:45:10 -04:00
Joffrey JAFFEUX
675d950eab
FIX: corrects link to moderators_activity report (#7265) 2019-03-27 10:14:42 +01:00
Gerhard Schlager
de011b53b5 UX: Hide link to incoming email when there is no bounce key
For example, webhooks mark email log entries as bounced without there ever being an incoming email.
2019-03-26 18:00:27 +01:00
Joffrey JAFFEUX
8fb63b2706
FEATURE: unified popover implementation (#7244) 2019-03-26 15:43:27 +01:00
Gerhard Schlager
60e6070c27 UX: Show spinner during text replacement 2019-03-25 16:47:55 +01:00
Tim Lange
da187f0967 FIX: Clear unsaved groups when switching user (#7236) 2019-03-22 12:46:36 +01:00
Maja Komel
34730a0b16 UX: show if webhook is disabled (#7217)
+ show in staff logs when webhook is created/updated/destroyed
2019-03-21 16:13:09 +01:00
Tim Lange
d16a0db4e1 UX: Enabled sorting for more columns in admin user list (#7208) 2019-03-21 17:16:58 +08:00
Gerhard Schlager
41c7423985 UX: Use a less technical term ("replace") for reseeding (#7223) 2019-03-21 16:22:07 +11:00
Maja Komel
f3d0d8fe7d Upgrade to Ember 3.7.0 2019-03-20 14:43:25 +01:00
Gerhard Schlager
3fd04df781
FEATURE: Locale support for seeded categories and topics (#7110) 2019-03-18 21:09:13 +01:00
Tarek Khalil
f8480ed911
FEATURE: Exposing a way to add a generic report filter (#6816)
* FEATURE: Exposing a way to add a generic report filter

## Why do we need this change?

Part of the work discussed [here](https://meta.discourse.org/t/gain-understanding-of-file-uploads-usage/104994), and implemented a first spike [here](https://github.com/discourse/discourse/pull/6809), I am trying to expose a single generic filter selector per report.

## How does this work?

We basically expose a simple, single generic filter that is computed and displayed based on backend values passed into the report.

This would be a simple contract between the frontend and the backend.

**Backend changes:** we simply need to return a list of dropdown / select options, and enable the report's newly introduced `custom_filtering` property.

For example, for our [Top Uploads](https://github.com/discourse/discourse/pull/6809/files#diff-3f97cbb8726f3310e0b0c386dbe89e22R1423) report, it can look like this on the backend:

```ruby
report.custom_filtering = true
report.custom_filter_options = [{ id: "any", name: "Any" }, { id: "jpg", name: "JPEG" } ]
```

In our javascript report HTTP call, it will look like:

```js
{
  "custom_filtering": true,
  "custom_filter_options": [
    {
      "id": "any",
      "name": "Any"
    },
    {
      "id": "jpg",
      "name": "JPG"
    }
  ]
}
```

**Frontend changes:** We introduced a generic `filter` param and a `combo-box` which hooks up into the existing framework for fetching a report.

This works alright, with the limitation of being a single custom filter per report. If we wanted to add, for an instance a `filesize filter`, this will not work for us. _I went through with this approach because it is hard to predict and build abstractions for requirements or problems we don't have yet, or might not have._

## How does it look like?

![a1ktg1odde](https://user-images.githubusercontent.com/45508821/50485875-f17edb80-09ee-11e9-92dd-1454ab041fbb.gif)

## More on the bigger picture

The major concern here I have is the solution I introduced might serve the `think small` version of the reporting work, but I don't think it serves the `think big`, I will try to shed some light into why.

Within the current design, It is hard to maintain QueryParams for dynamically generated params (based on the idea of introducing more than one custom filter per report).

To allow ourselves to have more than one generic filter, we will need to:

a. Use the Route's model to retrieve the report's payload (we are now dependent on changes of the QueryParams via computed properties)
b. After retrieving the payload, we can use the `setupController` to define our dynamic QueryParams based on the custom filters definitions we received from the backend
c. Load a custom filter specific Ember component based on the definitions we received from the backend
2019-03-15 12:15:38 +00:00
Gerhard Schlager
c34a6ba674 REFACTOR: Rename site settings to make them less confusing 2019-03-14 13:40:14 +01:00
Roman Rizzi
77931b70c3
Revert "DEV: Upgrade to Ember 3.7.0 (#6977)" (#7165)
This reverts commit 3eebf8be73.
2019-03-13 15:49:47 -03:00
Maja Komel
3eebf8be73
DEV: Upgrade to Ember 3.7.0 (#6977)
* Upgrade to Ember 3.7.0

* use ember source 3.7.0.2

* fix mobile header

* fix navigation
2019-03-13 12:16:06 +01:00
venarius
dc4541a95c FIX: Text content search warning if more than 50 results 2019-03-11 12:56:15 -04:00
Arpit Jalan
05ebb52ec4
FEATURE: defer flags when deleting child replies (#7111) 2019-03-06 14:32:25 +05:30
Penar Musaraj
64a3d63ddc DEV: Rename some icons with deprecated names 2019-02-28 13:03:14 -05:00
David Taylor
e67474daf4 UX: Don't link to theme source unless it's http(s) 2019-02-28 17:01:59 +00:00
David Taylor
3517103398 UX: Correct locale key for theme compatibility error 2019-02-28 14:40:33 +00:00
David Taylor
6296554ed1 DEV: Add additional hook for theme-creator 2019-02-28 10:48:30 +00:00
Joffrey JAFFEUX
fbedaea5ed
FIX: prevents double network calls and other quirks on admin emails (#7074) 2019-02-26 17:53:52 +01:00
Joffrey JAFFEUX
71360436ff
FIX: users list show was loading multiple times with different params (#7058)
A first load was happening in route, which was setting properties on controller. These properties were observed on the controller and were triggering a reload of the AdminUser model.

Not only was it doing loading two times it was also sometimes resulting on the controller model refresh end to happen after route has been changed, resulting in a wrong model.
2019-02-26 10:43:24 +01:00
Arpit Jalan
91e771ece6 FIX: send test email doesn't show a status 2019-02-25 17:42:58 +05:30
Joffrey JAFFEUX
900e187627
DEV: removing blank files (#7057) 2019-02-25 09:52:44 +01:00
Penar Musaraj
74ed72e825 DEV: Remove d-checkbox component
Replaces the last occurrence of `d-checkbox` with a regular input element.

Includes a minor refactor of admin site text search.
2019-02-21 09:54:54 -05:00
Guo Xiang Tan
46e62c0d22
UX: Default user facing routes to /g instead of /groups. (#7042) 2019-02-21 13:44:25 +08:00
Joffrey JAFFEUX
353eeef72a
fix prettier offense (#7041) 2019-02-20 22:22:38 +01:00
Penar Musaraj
cafe637407
UX: List popular themes and components in admin panel (#6997)
Reorganizes theme create/upload flows into one install flow
Adds quick list of popular themes/components with one-click installation
2019-02-20 14:58:31 -05:00
Gerhard Schlager
6a8007e5fb FEATURE: Improve handling of backup storage errors 2019-02-20 15:16:49 +01:00
David Taylor
49e7073438 FIX: Hide advanced theme fields behind a flag, pending UI improvement 2019-02-19 22:25:00 +00:00
David Taylor
d08939ab05 FIX: Should be possible to save an empty theme_field in the editor
Removing the theme_field JS object when the value was empty caused the server to maintain the previous value, making it impossible to delete the content of a field.
2019-02-19 21:49:31 +00:00
David Taylor
dbcf05d62c DEV: Code style improvements following review
Followup to 05ee1d1aba
2019-02-19 20:02:29 +00:00
Joffrey JAFFEUX
9ade04b709
FIX: removes legacy browsers-refresh button (#7028) 2019-02-19 16:38:21 +01:00
David Taylor
05ee1d1aba
FEATURE: Added settings/translations support to theme editor UI (#7026)
- These advanced fields are hidden behind an 'advanced' button, so will not affect normal use
- The editor has been refactored into a component, and styling cleaned up so menu items do not overlap on small screens
- Styling has been added to indicate which fields are in use for a theme
- Icons have been added to identify which fields have errors
2019-02-19 12:56:01 +00:00
Joffrey JAFFEUX
15fd875855
REFACTOR: color-scheme-color model (#7019) 2019-02-19 09:31:26 +01:00
Joffrey JAFFEUX
cba0dd33ee
REFACTOR: admin-customize-color (#7018) 2019-02-19 09:31:11 +01:00
Joffrey JAFFEUX
2c6bf184bc
REFACTOR: admin-badge-preview (#7017) 2019-02-19 09:30:52 +01:00