Commit Graph

40966 Commits

Author SHA1 Message Date
Kris e3e8fd4f7c
FIX: login modal max-width wasn't specific enough (#12207)
follow up to 362dd79
2021-02-24 18:32:40 -05:00
Krzysztof Kotlarek 57bfc398d4
FIX: paste table with multiline cell (#12194)
When a cell is multiline, it is wrapped with quotes. It can be used to determine if it is a "real" new line or not.

Meta: https://meta.discourse.org/t/pasting-google-sheets-table-with-a-cell-that-contain-a-line-break/173106
2021-02-25 09:39:54 +11:00
Kris 362dd798ae
UX: add link for email login below username, remove button (#12118) 2021-02-24 16:30:08 -05:00
Vinoth Kannan 437c348598
DEV: add CORS header for all nginx rules of public folder files. (#12205)
* DEV: add CORS header for all nginx rules of public folder files.

This reverts commit d628c65af0 and adding CORS header in two more places individually.
2021-02-25 02:57:37 +05:30
dependabot[bot] 7fa7bf61d5
Build(deps-dev): Bump parallel_tests from 3.4.0 to 3.5.0 (#12203)
Bumps [parallel_tests](https://github.com/grosser/parallel_tests) from 3.4.0 to 3.5.0.
- [Release notes](https://github.com/grosser/parallel_tests/releases)
- [Changelog](https://github.com/grosser/parallel_tests/blob/master/CHANGELOG.md)
- [Commits](https://github.com/grosser/parallel_tests/compare/v3.4.0...v3.5.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-24 16:21:49 -05:00
dependabot[bot] c946535f1b
Build(deps-dev): Bump minitest from 5.14.3 to 5.14.4 (#12202)
Bumps [minitest](https://github.com/seattlerb/minitest) from 5.14.3 to 5.14.4.
- [Release notes](https://github.com/seattlerb/minitest/releases)
- [Changelog](https://github.com/seattlerb/minitest/blob/master/History.rdoc)
- [Commits](https://github.com/seattlerb/minitest/compare/v5.14.3...v5.14.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-24 16:21:10 -05:00
Osama Sayegh a6850d9691
FIX: Detect installed themes using URLs instead of names (#12201)
Context: https://meta.discourse.org/t/not-all-installed-theme-components-listed-as-installed/179756?u=osama
2021-02-25 00:10:17 +03:00
Neil Lalonde 7c45ff6659
DEV: new plugin API to change default new category colors (#12200)
api.setNewCategoryDefaultColors(
  'FFFFFF', // background color
  '000000'  // text color
)
2021-02-24 16:00:50 -05:00
Osama Sayegh bd709c89a7
FIX: Unsubscribe from topic presence when navigating between topics (#12198)
This PR fixes a bug where if you navigate from topic to another one (via suggested topics, notifications etc.), the previous topic is not unsubscribed from presence manager, which means if you visit lots of topics all the subscriptions will accumulate and can cause rate limit errors.

This bug is exposed by the loading slider we're currently experimenting with on Meta because we no longer have an intermediate state when navigating between topics which means the `willDestroyElement` hook that's responsible for unsubscribing is not called.
2021-02-24 23:14:38 +03:00
Bianca Nenciu dc7e3fab50
FIX: Pass ajax function to loadOneboxes (#12199)
When enable_diffhtml_preview is true, oneboxes failed to load because a
wrong parameter was passed.

This commit also unhides enable_diffhtml_preview.
2021-02-24 21:42:09 +02:00
Bianca Nenciu 0c8d658ba8
SECURITY: Prefer Loofah for processing cooked HTML 2021-02-24 17:17:49 +02:00
Jarek Radosz daf34ae7e2
DEV: Fix settings/interface UI breaking on Ember CLI (#12154)
Fixes failures in user-preferences-interface-test on Ember CLI.

Included:
* DEV: User themes have `theme_id` not `id`
* FIX: `themeId` could point to a non-existent theme
* DEV: Add request stub

Co-authored-by: Penar Musaraj <pmusaraj@gmail.com>
2021-02-24 16:14:06 +01:00
dependabot[bot] b7b81afe55
Build(deps): Bump regexp_parser from 2.0.3 to 2.1.1 (#12191)
Bumps [regexp_parser](https://github.com/ammar/regexp_parser) from 2.0.3 to 2.1.1.
- [Release notes](https://github.com/ammar/regexp_parser/releases)
- [Changelog](https://github.com/ammar/regexp_parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ammar/regexp_parser/compare/v2.0.3...v2.1.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-24 13:26:30 +01:00
David Taylor d22ab6fe22
FIX: Ensure badge description is updated when routing without loading state (#12196) 2021-02-24 10:16:47 +00:00
Joffrey JAFFEUX de32fa299d
DEV: adds DiscourseEvent - topic_first_visited_by_user (#12195)
This event would mostly allow plugins to create workflows once users have visited a specific topic.
2021-02-24 10:50:02 +01:00
Martin Brennan f2126acf5a
FIX: Allow entering blank values in relative-time-picker (#12193)
In certain cases such as the category auto-close hours setting, it makes sense to blank out the relative time picker duration so 
`null` is sent to the server to clear the value.

Meta example: https://meta.discourse.org/t/how-do-i-disable-topic-auto-close/180487
2021-02-24 13:25:26 +10:00
Bianca Nenciu 845987ce23
FIX: Improve error message when login_required sites are under load
Previously a confusing message would pop up making private communities thing that anonymous access is granted.
2021-02-24 13:25:55 +11:00
Sam c9256b717f
DEV: hide the site setting rebake_old_posts_count (#12181)
This setting is confusing admins, it is now hidden by default

It only applies to major updates of the rendering engine or imports and
very infrequently needs tweaking
2021-02-24 09:45:26 +11:00
Penar Musaraj c0fd4ab9d6
DEV: Remove deprecated plugins variables importer (#12168) 2021-02-23 16:20:59 -05:00
Penar Musaraj bd679b95a7
UX: Remove redundant focus style (#12192)
This style is unnecessary because text inputs and textareas have
focus styles set elsewhere (lines 228 and 288 respectively) and we don't
have any `select` elements.
2021-02-23 16:20:39 -05:00
Penar Musaraj 76967ee788
UX: use default browser focus styling for checkbox and radio inputs (#12173) 2021-02-23 14:01:02 -05:00
tshenry 14e86e943f
Bump discourse-fonts to 0.0.7 (#12190)
The discourse-fonts gem needs a version bump after discourse/discourse-fonts@6334ebb. The change restored Helvetica to our font stack.
2021-02-23 10:40:15 -08:00
Rafael dos Santos Silva 01584c5b22
FIX: emails.rake-use domain when sending mail test (#12188)
`rake emails:test` task was always sending `localhost` as the domain name rather than using `smtp[:domain]` (aka `DISCOURSE_SMTP_DOMAIN`. `discourse-setup` has recently been modified to always set `DISCOURSE_SMTP_DOMAIN`, so it's important that this test rake task actually use the value.

I tested this change on a standard production install, and it's working as expected. Hopefully I managed not to bungle the copy/paste of the single line here in the github edit window.

Co-authored-by: Jay Pfaffman <jay@literatecomputing.com>
2021-02-23 14:16:51 -03:00
Penar Musaraj e58922e1e3
UX: Styling adjustments for admin new features (#12189)
- Fixes an alignment issue when emojis have varying widths
- Adjusts mobile alignment
2021-02-23 11:58:20 -05:00
Roman Rizzi 4bc3a64982
A11Y: Improve the header menu "view all" title. (#12175)
* A11Y: Improve the header menu "view all" title.

The title attribute has been used to attempt to provide the link with an accessible name, but the value of the title attribute is “view all” for the link in each of the tabs, and so their purpose is not uniquely identified.
2021-02-23 12:24:42 -03:00
Roman Rizzi 95d3877709
FIX: Don't update `posts_read_count` when the post is from a PM. (#12131)
We don't want TL0 users doing the discobot tutorial to increase their read count.
2021-02-23 11:36:00 -03:00
Discourse Translator Bot 2757003ef1
Update translations (#12186) 2021-02-23 15:10:04 +01:00
David Taylor 3787bbc223
DEV: Remove unused `max_api_keys_per_user` site setting (#12185)
This was added in fc095acaaa, but a check was never implemented
2021-02-23 13:07:42 +00:00
Blake Erickson 0b2b4bc245
DEV: Document the user suspend api endpoint (#12179)
Wrote an api docs rspec test for documenting the user suspend api
endpoint.
2021-02-23 05:58:22 -07:00
Arpit Jalan 73fa4263fb
FIX: log warning when context is missing when a user is destroyed (#12182) 2021-02-23 16:47:54 +05:30
David Taylor 1844bde57c
FIX: Allow mobile-nav to work without loading transitions (#12184)
Previously, the `{{mobile-nav}}` component required a `currentRouteName` property, passed from the router service. It would observe changes in this property, and update the UI accordingly.

If we change between routes which have the same `currentRouteName` (e.g. two different group message inboxes), then the `currentRouteName` does not change and does not trigger the observer. Currently in core, we are relying on the fact that currentRouteName temporarily enters a `.loading` substate during a transition. This will change when we remove the loading substate in the near future.

This commit refactors `{{mobile-nav}}` to inject the router directly, and use the `routeDidChange` event instead of an observer. The change is backwards compatible, but plugins passing the old `currentPath` property will be shown a deprecation notice.
2021-02-23 11:16:40 +00:00
Osama Sayegh 0f807ba85b
UX: Allow select-kit to have an autofocus option (#12183)
On some modals the main/primary input field is a select-kit component (like `{{email-group-user-chooser}}` on the assign modal), so it makes sense to allow select-kit to steal focus on modals like these. This PR adds an `autofocus` option (default false) that allows select-kit to steal focus when it's rendered.
2021-02-23 13:20:32 +03:00
Penar Musaraj 7fb4633b5a
DEV: Remove very old mocha deprecation workaround (#12151) 2021-02-22 20:26:49 -05:00
Kris 477930683b
UX: More consistent group mention style (#12156) 2021-02-22 19:02:47 -05:00
Roman Rizzi e485e95792
FIX: Adding a custom scope should not modify the original ones. (#12178)
Default scopes are stored inside a class variable, which shouldn't be modified when a custom scope is added. If this happens, we're no longer to remove the scope when the plugin is disabled.
2021-02-22 20:10:53 -03:00
Neil Lalonde 9a72876863
DEV: add plugin outlets above and below discovery-categories (#12176) 2021-02-22 17:17:03 -05:00
David Taylor 063690d28d
DEV: Correct DeprecatedSettings test cleanup (#12177)
If this test ran before the new SiteSettingsController spec from 8cd7c9b259, it would fail the run. We need to `dup` the array before calling `.clear` on the original
2021-02-22 21:55:15 +00:00
Penar Musaraj 9063520d89
FIX: Avoid Safari service worker error on back navigation (#12171) 2021-02-22 14:11:20 -05:00
David Taylor 8cd7c9b259
DEV: Support setting deprecated site settings via the API (#12172) 2021-02-22 18:10:54 +00:00
Penar Musaraj 0620f6298e
UX: Remove emoji step in wizard (#12169) 2021-02-22 12:14:18 -05:00
Jarek Radosz 3ba0a47e61
UX: Tweak `group` layout to fix button alignment (#12167)
Included:

* DEV: Span can't contains divs
* DEV: Drop extra elements
* UX: Tweak `group` layout to fix button alignment
* UX: Add space between "Members" and "(N)"
2021-02-22 16:06:52 +01:00
Jarek Radosz b693bf8ca0
FIX: Don't show "bulk" icon on group-index for unauthorized users (#12166)
Closes https://meta.discourse.org/t/group-management-tools-show-up-for-all-users/179259/9

Includes:
* DEV: Add missing <tr>
2021-02-22 15:29:04 +01:00
Jarek Radosz 858436b17c
DEV: Fix group-index-test under Ember CLI (#12153)
`:nth()` and `:first` are jQuery-only selectors and fail when used with `querySelector`/`querySelectorAll`.
2021-02-22 15:27:01 +01:00
Jarek Radosz 24f828c467
DEV: Scope `query` to the testing container (#12152)
We don't want it to find QUnit UI elements… This fixes some Ember CLI test failures.
2021-02-22 15:26:50 +01:00
Joffrey JAFFEUX d0d54bbead
A11Y: deselect focused choice when using enter in multi-select (#12165) 2021-02-22 14:34:31 +01:00
Arpit Jalan f75e1867ff
FIX: do not send rejection emails to auto-deleted reviewable users (#12160)
FIX: add context when user is deleted via auto handle queued reviewable
FIX: do not delete email_log when a user is deleted
2021-02-22 18:37:47 +05:30
David Taylor a040f72f96
FIX: Make email_valid handling consistent (#11556)
Previously we were checking truthiness in some places, and `== true` in
others. That can lead to some inconsistent UX where the interface says
the email is valid, but account creation fails.

This commit ensures values are boolean when set, and raises an error for
other value types.

If this safety check is triggered, it means the specific auth provider
needs to be updated to pass booleans.
2021-02-22 12:05:36 +00:00
David Taylor ef19431e44
DEV: Improve User#email= behavior (#11338)
- Only apply the change after `save` is called on the record
- Automatically remove matching secondary emails
2021-02-22 11:42:37 +00:00
Joffrey JAFFEUX 74d83abcc7
A11Y: gives autocomplete in search a more accessible name (#12164)
s/discourse/discourse-search
2021-02-22 12:11:06 +01:00
Joffrey JAFFEUX b7dbdec6fb
A11Y: makes other and color, fieldset/legend elements (#12163) 2021-02-22 12:10:51 +01:00