Commit Graph

15726 Commits

Author SHA1 Message Date
Vinoth Kannan 62f4fc728d UX: lowercase tag name before checking it with topic title.
Tag names can contain uppercase letters if `force_lowercase_tags` site setting disabled.
2020-08-23 21:09:51 +05:30
Vinoth Kannan 66976baefa DEV: skip using `br` tag in header widget rendering.
562180dd9a
2020-08-22 13:38:37 +05:30
Penar Musaraj 8b2c4b07a4
UX: Tweaks to admin color palette dropdown (#10502) 2020-08-21 09:30:11 -04:00
Martin Brennan 2aa1482421
FIX: Bookmark list showing wrong no content message (#10501)
Meta report: https://meta.discourse.org/t/spurious-permissions-error-after-deleting-last-bookmark/161289

When deleting all bookmarks in their list, users were seeing an "access denied" message instead of the regular no content message. This is because when we were calling loadMore and no further results were returned, we were presuming the null response from the resolved promise meant that there was a permissions error. Fixed this and moved the message into a computed property to show the correct message.
2020-08-21 11:01:12 +10:00
Penar Musaraj 3c06dd9b99
FIX: Detect dark scheme server-side for better dark logo support (#10490)
* FIX: Use dark logo when dark scheme is default

* Small refactor
2020-08-20 14:23:18 -04:00
Gerhard Schlager 0bd27cd10b Make prettier happy 2020-08-20 16:27:32 +02: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
Neil Lalonde 96511e4548
UX: better wording when there are no unused tags to delete 2020-08-19 12:17:48 -04:00
jbrw aa1fc01307
FEATURE - Moderators can create and manage groups (#10432)
Enabling the moderators_manage_categories_and_groups site setting will allow moderator users to create/manage groups.

* show New Group form to moderators

* Allow moderators to update groups and read logs, where appropriate

* Rename site setting from create -> manage

* improved tests

* Migration should rename old log entries

* Log group changes, even if those changes mean you can no longer see the group

* Slight reshuffle

* RouteTo /g if they no longer have permissions to view group
2020-08-19 10:41:40 -04:00
Robin Ward 3640c00b03
Remove `Discourse` constant usage (#10470)
* REFACTOR: Get us closer to no `Discourse` constants in tests

* REFACTOR: Remove `Discourse.currentUser`

* REFACTOR: `prioritizeNameInUx` is really a helper and can use context

* REFACTOR: Rename test

* REFACTOR: Remove `Discourse.MarkdownItURL` and use session

* REFACTOR: Remove unused `LetterAvatarVersion`

* REFACTOR: Remove unused `Discourse.ThemeSettings`

* REFACTOR: Remove unused CDN constants

* REFACTOR: The `globalNotice` property doesn't exist anymore

* REFACTOR: Remove `Discourse.__container__` from plugin api

* REFACTOR: Consider `logout()` a helper and remove container.
2020-08-19 08:51:48 -04:00
Joffrey JAFFEUX 3e49c5b4d8
FIX: do not cancel search early in tests (#10445)
This is done to avoid cases where search would be cancelled before debounce.
2020-08-19 09:57:40 +02:00
Penar Musaraj 328ad921fb
FIX: display label when theme uses default color scheme 2020-08-18 21:11:15 -04:00
Penar Musaraj 1a7391a251
FIX: do not override logo markup when loading page in dark mode
Ensures that when loading the page in dark mode, logo can switch back to light logo if user toggles their OS appearance.
2020-08-18 20:33:42 -04:00
Jordan Vidrine ed0e1e28b4
FIX: Fix css var issues + button :active gradient (#10469)
* FIX: Fix css var issues

Adds ability for published page to use css `var()` + import the `var()` definitions
2020-08-18 14:25:38 -05:00
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 bad7c287dd
FIX: Always wait for promise when loading a topic (#10465)
It turns out that `setupController` doesn't always wait when returning a
promise, but the `model` hook does. This fixes issues with the
`page:changed` event firing before the transition has complete.
2020-08-18 11:11:02 -04:00
Joffrey JAFFEUX 93a370863f
FIX: more efficient and resilient widget-dropdown body (#10458) 2020-08-18 13:39:08 +02:00
Vinoth Kannan 562180dd9a
FEATURE: add option to skip new user tips in first notification. (#10462) 2020-08-18 13:43:40 +05:30
Martin Brennan bb74ccf288
FIX: Add bookmark-list component (#10451)
Moving the bookmark list into its own component to solve click binding issues for external links, because controllers are not the place for DOM manipulation!
2020-08-18 12:15:00 +10:00
Blake Erickson ba9fbb3443 FIX: Composer upload icon regression because of HEIC
Now that HEIC conversion is enabled by default we need to update a few
file extension checks to include `heic` and heif` formats.

https://meta.discourse.org/t/-/144326/23?u=blake

bug reported here:

https://meta.discourse.org/t/-/161197?u=blake
2020-08-17 19:39:26 -06:00
David Taylor 5f7839f0a4
FIX: Allow safari to load and autoplay videos in posts
This improves the reloading workaround in a few ways:
  - Multiple videos in posts are now reloaded. Previously only the first was reloaded.
  - An empty `poster` string is treated the same as a missing attribute
  - If the video is set to autoplay, it will be reloaded (and therefore autoplayed correctly)
2020-08-17 23:48:36 +01:00
Robin Ward e2e51ee348 FIX: Refactor broke wizard 2020-08-17 16:34:12 -04:00
Penar Musaraj 2567bb4a67
DEV: Facilitate replacing category lock icon in components 2020-08-17 16:09:17 -04:00
Robin Ward 1a2156a0c2 REFACTOR: Remove `Discourse.BaseUrl` global 2020-08-17 16:08:40 -04:00
Robin Ward 441ac21053 FIX: Broken when iconList missing 2020-08-17 15:49:32 -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
Penar Musaraj 3745f2bb86
FEATURE: Dark mode alternative logos (#10441) 2020-08-17 15:43:20 -04:00
Robin Ward 386a9d26ec REFACTOR: Remove `Discourse.SvgIconList` and `Discourse.SvgSpritePath`
We use the session instead. This patch also removes some jQuery usage in
favor of regular HTML apis
2020-08-17 15:28:22 -04:00
jahan-ggn 65649eaef0
User card settings (#10302)
* settings implemented

* prettier

* settings updated

* rubocop

* prettier

* Revert "rubocop"

This reverts commit 7805145a7d.

* Revert "prettier"

This reverts commit 2c53f4fa12.

* settings updated and changed

* rubocop

* changes applied

* final changes done

* Server side feature added

* spec changed

* changed user_updater and profile file

* Fix user card specs

* web hook serializer solved

* site-setting changed

Co-authored-by: Mark VanLandingham <markvanlan@gmail.com>
2020-08-17 12:37:45 -04:00
Mark VanLandingham f2588e1c85
FIX: Clicking on category autocomplete row (#10457) 2020-08-17 11:02:00 -05:00
Joffrey JAFFEUX 6d0eb7178d
FIX: prevents errors on /tags when a tag `constructor` exists (#10449)
This is due to js objects having a constructor property:

```
const obj = {};
obj['constructor'] // return [native code] and not undefined
```
2020-08-17 17:40:34 +02:00
Robert c164e9bbe0
DEV: Add computed property to Create Account modal (#10455)
Carry over the regime used in the Login modal to Create Account to
facilitate overriding of the classes set for the d-modal Component
using a new Computed Property having the same naming convention.
2020-08-17 12:31:41 +01:00
Kris 630ec7b49c Enable hamburger menu scrolling on mobile, follow-up to 1972364 2020-08-15 20:31:22 -04:00
Robin Ward 58ee947b35 FIX: Mobile group add dropdown was broken
It looks like we removed the bulk add modal but didn't update the mobile
template.
2020-08-14 21:03:41 -04:00
Robin Ward 51a6e96b7f FIX: defer topic was broken 2020-08-14 17:25:37 -04:00
Robin Ward afa9a61080 REFACTOR: These `Discourse` constants do not seem required in vendor 2020-08-14 13:42:15 -04:00
Robin Ward 41fd7a8b72 REFACTOR: Add `themeSettings` to the `helperContext` to avoid a global 2020-08-14 13:34:21 -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 f52927cd33 REFACTOR: Migrate `screenTrack` to a service 2020-08-14 13:14:17 -04:00
Robin Ward 86aa5d5e48 FIX: `application` controller is not used by the card 2020-08-14 12:49:53 -04:00
Robin Ward 99764d8108 REFACTOR: Don't use container in Scrolling mixin 2020-08-14 12:49:53 -04:00
Robin Ward 37c6fef535 REFACTOR: Remove dead code (property was typo'd, no longer used) 2020-08-14 12:49:53 -04:00
Robin Ward 01e213c930 REFACTOR: Clean up router usage and private APIs 2020-08-14 12:49:53 -04:00
Robin Ward 6a9bde3bf4 REFACTOR: Remove `router:main` and `getOwner` 2020-08-14 12:49:53 -04:00
Robin Ward cf466f7b84 REFACTOR: Simplify `willTransition` 2020-08-14 12:49:53 -04:00
Jarek Radosz 7cc5c5bb31
FIX: DEV: Introduce `@bind` decorator (#10439)
Fixes a bug in `controllers/insert-hyperlink` where `addEventListener` was called with different (anonymous) functions than the matching `removeEventListener` calls.
2020-08-14 17:13:20 +02:00
Jarek Radosz a3e2152265
DEV: Add ember-buffered-proxy import shim (#10438)
Just a bit of 🧹
2020-08-14 17:07:17 +02: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
Jarek Radosz 6287c8e171 FIX: A paste event listener was re-added instead of being removed
cc: @eviltrout 😉
2020-08-14 15:21:27 +02:00
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
Jarek Radosz be6a73f654 DEV: Fix package.json issues and reroll yarn.lock 2020-08-14 12:00:35 +02:00
Neil Lalonde d65a839577
FEATURE: allow group membership to unmute categories and tags
For sites that are configured to mute some or all categories and tags
for users by default, groups can now be configured to set members'
notification level to normal from the group manage UI.
2020-08-13 17:20:53 -04:00
Kris 18fb34bf2e formatting follow-up to 32102dd 2020-08-13 17:01:22 -04:00
Kris 32102ddff3 UX: Use the same formatting for both user and group card bios 2020-08-13 16:55:30 -04:00
Mark VanLandingham b9891e3def
FIX: Update preview when autocomplete is clicked (#10430) 2020-08-13 15:42:38 -05:00
Jarek Radosz d0d651d8bc
FIX: Prevent `LockOn` conflicts (#10422)
If there's already a `LockOn` instance, clear its lock before creating creating a new one. Fixes a shaky viewport effect after certain transitions.

Includes:
* Slight refactor (elementId wasn't an id, but a selector - it included the "#" prefix)
* Add support for a[name=X] anchors in `jumpToPost`
* Scope down anchors to the #main element (Embeded fontawesome sprites are causing conflicts, e.g. when given `bed` anchor, `<a name="bed">` was at odds with `<symbol id="bed" viewBox="0 0 640 512">(…)</symbol>`)
2020-08-13 19:39:40 +02:00
Robin Ward ba3ee3444e
FIX: Move queryParams to each discovery controller rather than shared (#10424)
* REFACTOR: `refreshSort` doesn't cause it to sort again, it's misleading

* FIX: Move queryParams to each discovery controller rather than shared

This fixes issues where params previously would not reset between
routes. For example if you added `max_posts=1` to /latest and then went
to a category.

* Add backward compatibility for (action "changeSort") for themes

* FIX: refreshing was not working

* Update app/assets/javascripts/discourse/app/controllers/discovery/topics.js

Co-authored-by: Jarek Radosz <jradosz@gmail.com>

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2020-08-13 11:33:46 -04:00
Jarek Radosz ab5df7b2bd
FIX: Preserve anchors in permalink transitions (#10421)
When visiting a permalink with an anchor (e.g. /important-link#notes) the anchor part was being dropped during redirection.

The change doesn't have a test. Functions like scrollToPost or scrollToElement don't have any effect in the test environment.
2020-08-13 16:44:34 +02:00
Jarek Radosz 7a8442435c
REFACTOR: `LockOn` class (#10428)
Mostly de-jQuery-ification. This refactor tries to closely preserve the original behavior.

Changes:
* Store the interval inside the class (allows using `clearLock()` on `LockOn` objects)
* Extract the interval function to a separate method
* Math.max result is never undefined (per MDN: "[Return value] The largest of the given numbers. If at least one of the arguments cannot be converted to a number, NaN is returned.")
* Replace jQuery's `offset()`
* Private methods be private
* Native `scrollTop` (jQuery's just a wrapper for this)
* `addEventListener`/`removeEventListener`
2020-08-13 16:43:05 +02:00
Mark VanLandingham 2008ecd68e
DEV: Remove incorrect comment in tag/show controller (#10423) 2020-08-13 09:19:09 -05:00
Martin Brennan ef461ffd60
FIX: Make sure user preference to open external links in new tab works for bookmark list excerpts (#10409)
Meta post: https://meta.discourse.org/t/bookmark-page-does-not-respect-open-all-external-links-in-new-tab-user-preference/160118
2020-08-13 14:56:13 +10:00
Kris 9bc992dce4 follow-ups to 1972364: increase notification limit, make show-all a link 2020-08-12 17:14:48 -04:00
Kris 95a454abb6 specificity fix to d1c570c 2020-08-12 16:03:08 -04: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
Jeff Wong 70d4420c8e DEV: Add profile-hidden selector to user page for styling 2020-08-12 09:48:42 -07:00
Robin Ward 9525d3506b FIX: Heisentest with topic timings
We trigger `/topics/timings` requests without ever caring about the
promise afterwards, so they can bleed from one test to another.

If you're very unlucky, this might happen and then the next test
is testing a subfolder, which means you end up with a path like
`/forum/topics/timings` which is not caught by pretender and causes the
suite to fail.

It's easier (and faster) to never send these requests in test mode
than to track the ajax requests and abort them between runs.
2020-08-12 12:27:17 -04:00
Vinoth Kannan fc5111508f FIX: allow mods to choose restricted categories as parent category.
Currently moderators can't choose a category with only “See” permission as a parent in `edit-category` modal.
2020-08-12 20:58:52 +05:30
Mark VanLandingham 00a0767c35
DEV: Remove directory-toggle component (#10413) 2020-08-12 08:11:32 -05:00
Guo Xiang Tan 808e84a856
FIX: Expose PG headline highlighting for all search results. 2020-08-12 16:43:47 +08:00
Penar Musaraj 8633e3cae8
FIX: iOS/iPadOS freezing when changing notification level in topic footer 2020-08-11 22:39:17 -04:00
Kris d1c570cf2c Hamburger menu needs to be able to scroll, follow-up to 1972364 2020-08-11 22:33:51 -04:00
jbrw 6391db5921
FIX: use correct site setting when uploading images 2020-08-11 18:13:55 -04:00
Joe 1c941a19d7 DEV: removes the Vincent theme from the "popular theme" list
This theme is currently not maintained so it shouldn't be on that list
2020-08-12 03:11:05 +08:00
Vinoth Kannan f3154e783f UX: preload muted categories list to prevent rendering delay. 2020-08-12 00:34:40 +05:30
Kris cfa37d1670 prevent search panel more link from causing horizontal overflow 2020-08-10 22:15:42 -04:00
Kris 1972364d0f
REFACTOR: Update the notification menu to remove scrolling (#10371) 2020-08-10 16:17:15 -04:00
Joe e3bc8f34ed UX: ensures search results wrap on mobile 2020-08-11 02:17:41 +08:00
Mark VanLandingham b7a092bd28
FEATURE: Group category permissions tab (#10388) 2020-08-10 09:49:05 -05:00
Robin Ward 232d277833 REVERT: Resetting the filters is causing double transitions 2020-08-07 16:41:41 -04:00
Penar Musaraj 31e9e0c41b
UX: Update header background color in mobile app webview
Sends the updated value when switching color schemes.
2020-08-07 16:13:22 -04:00
Jordan Vidrine 77a9c6aa80
FIX: Smaller header font size for published page (#10398) 2020-08-07 13:46:08 -05:00
Rafael dos Santos Silva a97e36cfda
FEATURE: Block vibration in Firefox Android (#10389)
Legacy Firefox Android has some quirks around vibration where it:

- asks for permission
- doesn't persist the permission

This makes the default like vibration popup a permission on Firefox
Android <= 68.

This isn't the case (yet?) on their new Firefox which is rolling out
worldwide right now.

I'd say we merge this now and revert in 3 months or so when
https://arewefenixyet.com/ shows a full rollout.
2020-08-07 15:38:53 -03:00
Régis Hanol bc63232d2e
FIX: sync reviewable count when opening the hamburger menu (#10368)
When a tab is open but left unattended for a while, the red, green, and blue
pills tend to go out of sync.

So whevener we open the notifications menu, we sync up the notification count
(eg. blue and green pills) with the server.

However, the reviewable count (eg. the red pill) is not a notification and
is located in the hamburger menu. This commit adds a new route on the server
side to retrieve the reviewable count for the current user and a ping
(refreshReviewableCount) from the client side to sync the reviewable count
whenever they open the hamburger menu.

REFACTOR: I also refactored the hamburger-menu widget code to prevent repetitive uses
of "this.".

PERF: I improved the performance of the 'notify_reviewable' job by doing only 1 query
to the database to retrieve all the pending reviewables and then tallying based on the
various rights.
2020-08-07 18:13:02 +02:00
Joffrey JAFFEUX b86198198f
FIX: removes persistedQueryParams as it should work out of the box (#10394)
This hack is only attempting to hide something which should have been working in core and for which we should provide a fix soon. Also it's not working as it should.
2020-08-07 09:51:37 +02:00
Guo Xiang Tan cf2797bf58
DEV: Fix lint take 2. 2020-08-07 13:17:51 +08:00
Guo Xiang Tan e2fc05705f
DEV: Fix lint. 2020-08-07 13:16:17 +08:00
Guo Xiang Tan e60c74d3c1
FEATURE: Use PG `ts_headline` for highlighting topic title in search. 2020-08-07 12:43:09 +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
Krzysztof Kotlarek fb9c2e5f89
FEATURE: notification for vote plugin (#10384)
This must exist in core as we want to see a correct notification after disable of the voting plugin.
2020-08-07 09:51:16 +10:00
Blake Erickson 149801f99a FIX: PM participants list refreshing after inviting
When inviting users to a PM a small post is created showing that you
invited the user, but the actual list of participants never updated
until you refreshed the page or interacted with the private-message-map
widget triggering it to refresh. This change will trigger a refresh on
the private-message-map widget ensuring that the UI is updated with the
current list of participants.
2020-08-06 14:57:55 -06:00
Kris 7a1816ce23
DEV: Set application template plugin outlets to tagName="" (#10382) 2020-08-06 16:01:24 -04:00
Robin Ward f03f58e52c REFACTOR: Remove `Discourse` constants from `cleanDOM` 2020-08-06 15:34:20 -04:00
Robin Ward db443d2289 REFACTOR: Use the session for the `ServiceWorkerURL` 2020-08-06 15:24:43 -04:00
Robin Ward 036a79d273 REFACTOR: Use `isTesting()` instead of `Discourse.testing` 2020-08-06 15:18:25 -04:00
Robin Ward a80d749b9d REFACTOR: Remove an unnecessary `Discourse.__container__` 2020-08-06 15:14:20 -04:00
Robin Ward 7cd11bad0c REFACTOR: Use the session to track assetVersion/requiresRefresh
This saves us having to put the data on `Discourse`
2020-08-06 15:09:13 -04:00
Penar Musaraj af63871d4d
FIX: Missing bottom border in select-kit color list settings 2020-08-06 14:52:17 -04:00
Robin Ward 7df57b35da REFACTOR: Remove `Discourse.__widget_helpers`
It's now a variable in the context where the templates are created.
2020-08-06 14:35:46 -04:00
Robin Ward 792bd3faff Remove `getURL` and `getURLWithCDN` deprecations, they have been removed 2020-08-06 14:01:31 -04:00
Neil Lalonde 1ca81fbb95
FEATURE: set notification levels when added to a group (#10378)
* FEATURE: set notification levels when added to a group

This feature allows admins and group owners to define default
category and tag tracking levels that will be applied to user
preferences automatically at the time when users are added to the
group. Users are free to change those preferences afterwards.
When removed from a group, the user's notification preferences aren't
changed.
2020-08-06 12:27:27 -04:00
Jarek Radosz cd4f251891
FEATURE: Poll breakdown 2.0 (#10345)
The poll breakdown modal replaces the grouped pie charts feature.

Includes:

* MODAL: Untangle `onSelectPanel`
Previously modal-tab component would call on click the onSelectPanel callback with itself (modal-tab) as `this` which severely limited its usefulness. Now showModal binds the callback to its controller.

"The PR includes a fix/change to d-modal (b7f6ec6) that hasn't been extracted to a separate PR because it's not currently possible to test a change like this in abstract, i.e. with dynamically created controllers/components in tests. The percentage/count toggle test for the poll breakdown feature is essentially a test for that d-modal modification."
2020-08-06 17:57:06 +02:00
Penar Musaraj 6fdc711b4a
FEATURE: Allow users to opt out of automatic dark mode (#10377) 2020-08-06 09:45:37 -04:00
Joe c047e16285 UX: ensure CSS vars are loaded in the Wizard stylesheet
The in-app select-kit stylesheet references some of the CSS vars we recently added. This commit ensures that those vars are available when that sheet is complied since the wizard lives outside of the app.
2020-08-06 19:19:15 +08:00
Sam Saffron ba482c251c
FIX: stop sync of tracking state when list is filtered
This stops sync of tracking state when list is filtered, in the past this
would cause the tracking state to go off wack.

Additionally this introduces an alias for "filter=tracking", called "f=tracking"

This was done cause the term "filter" is used internally in 2 different ways
the main way is for /unread /new filtering.

Trying to also call a query param "filter" causes enormous amounts of
internal pain, this circumvents the issue.
2020-08-06 16:34:02 +10:00
Robin Ward 09254410ea FIX: Only raise proper `"error"` messages
Also support "1" for `QUNIT_FAIL_FAST` to make it consistent with other
arguments.
2020-08-05 16:27:06 -04:00
Robin Ward f1b6b1bd0e FIX: Pretender errors were being swallowed
Lots of test were broken and needed fixes.
2020-08-05 15:48:57 -04:00
Robin Ward b0564205d9 FIX: Raise errors for broken pretender responses in test mode 2020-08-05 15:48:56 -04:00
Vinoth Kannan aa017f276f FIX: replace `fullPath` while rewriting the `/my/` URLs.
And added the tests. Follow-up to cdca5a2ee4
2020-08-05 23:22:15 +05:30
jbrw 67e8bc5342
FEATURE - allow category group moderators to split/merge topics (#10351) 2020-08-05 10:33:25 -04: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
Kane York 8850f51fd0
FIX: Show "group members forbidden" message on mobile (#10370)
This commit fixes an oversight in commit 88359b0f16.
2020-08-04 16:16:52 -07:00
Kris eb619c8e98 prevent long email addresses from breaking admin table layout 2020-08-04 16:47:50 -04:00
tshenry 0cda5b9d55
FEATURE: New plugin outlet for category-heading (#10363) 2020-08-04 12:52:43 -07:00
Vinoth Kannan cdca5a2ee4 FIX: rewrite of `/my/`URL should work on sub directory site too. 2020-08-05 00:59:10 +05:30
Joffrey JAFFEUX 4593bb60c5
FIX: allows to change a user group notification level (#10369)
The current code has an ambiguous name of "user" which is actually not a user model, the real user model is accessible on the model key of user.
2020-08-04 21:23:55 +02:00
Penar Musaraj fb91320cba
UX: Refactor pikaday month prev/next button styling
And topic-list last poster halo effect
2020-08-04 14:39:25 -04:00
Robin Ward 92b26ecbfb REFACTOR: Move Page title / focus / counts logic to service
We had a handful of methods attached to the root `Discourse` object
related to focus and notification counts.

This patch pulls them out into a service called `document-title` for
updating the title, and a component called `d-document` to attach
and listen for browser events related to focus.

It also removes some computed properties and observers in favor of plain
old Javascript objects.
2020-08-04 12:02:25 -04:00
Mark VanLandingham b76731d722
FEATURE: Invite emails to groups from add member modal (#10308) 2020-08-04 10:02:01 -05:00
Penar Musaraj 413fa49032
UX: Refactor lightbox hover drop shadow
For parity with auto dark mode switching, this includes a subtle effect in dark themes too.
2020-08-04 10:43:18 -04:00
Penar Musaraj c937afc75e
FEATURE: automatic dark mode (#10341)
A first step to adding automatic dark mode color scheme switching. Adds a new SCSS file at `color_definitions.scss` that serves to output all SCSS color variables as CSS custom properties. And replaces all SCSS color variables with the new CSS custom properties throughout the stylesheets. 

This is an alpha feature at this point, can only be enabled via console using the `default_dark_mode_color_scheme_id` site setting.
2020-08-03 22:57:10 -04:00
Sam Saffron eb18f91cf7
DEV: new api to iterate through tracked topics
`topicTrackingState.forEachTracked(topic,isNew,isUnread)` can be used to
iterate through tracking state efficiently.

This is handy for extension looking at subsets of tags and categories.
2020-08-04 10:40:03 +10:00
Kris 5e46ec8b76 width fix for category chooser in move posts modal 2020-08-03 17:44:11 -04:00
Penar Musaraj 52b864facf
FIX: bug with sharing when used outside a topic
Followup to ac76bfb, fixes share buttons in topic lists (only used in themes or plugins)
2020-08-03 16:27:11 -04:00
Penar Musaraj e6349685d3
UX: Uniform focus styles for composer inputs/textarea (#10296)
Uses a thin border as indicator that element is in focus for all editable items in the composer (inputs, select kit, textarea).

 Disables a default iOS style that has a blinking background color on inputs/textareas
2020-08-03 10:01:04 -04:00
Joffrey JAFFEUX eb61916e23
UX: allows to navigate widget dropdown with tab and enter (#10356) 2020-08-03 10:37:30 +02:00
Bianca Nenciu 12913a46e4
FIX: Reset max_posts query parameter (#10334) 2020-08-03 11:19:36 +03:00
Penar Musaraj ac76bfb400
Disable social media sharing on private categories, unlisted topics (#10349)
* Do not show social media sharing on private categories, unlisted topics

* Disable quote sharing entirely in private categories and unlisted topics
2020-08-03 17:06:09 +10:00
Joffrey JAFFEUX 8a9e4504fe
DEV: allows to decouple csv-uploader texts from bulk invite (#10344) 2020-08-01 10:29:09 +02:00
Robin Ward 0b3f963804 FIX: Removes an error in the console in test mode 2020-07-31 14:06:52 -04:00
Jordan Vidrine 831802aedc
Change pp to published-page (#10343)
* UI: Markdown Code Wrapping

* pp -> published-page

change to match previous syntax

* pp -> published-page

change to match previous syntax
2020-07-31 09:24:08 -05:00
Vinoth Kannan 6a1746a0c5
FEATURE: add expandable muted categories ui to `/categories` page. (#10303)
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2020-07-30 23:32:51 +05:30
Jordan Vidrine f90e02162b
UI: Styling for Published Page (#10335)
* UI: Styling for Published Page

Styling to look more visually connected to Discourse
2020-07-30 10:25:28 -05:00
Sam Saffron dc14d156b6
FEATURE: g,j and g,k to navigate to next and prev topic
After visiting a topic list (by tag / category / top level) we track the list

Once a list is tracked the combo `g` `j` can be used to go to the next topic
in the list and `g` `k` to go to previous topic.

This allows you to quickly work through subsets of topics without having
to navigate back to the top level lists

The shortcut does not work in PM lists yet, or search results, both are
under consideration.
2020-07-30 17:54:47 +10:00
Kris 6da90af6c6 fix triple-click text selection in firefox 2020-07-29 22:38:38 -04:00
Penar Musaraj 25dcc577ae
DEV: More color transformation refactoring 2020-07-29 12:01:12 -04:00
Penar Musaraj 3116591dc6
DEV: Refactor `dark-light-choose()` usage in SCSS
Covers most, but not all, cases.
2020-07-29 09:09:37 -04:00
Penar Musaraj fb2fce037b
DEV: Refactor `.coldmap` styles
Component is only used in mobile category lists, no need to have it available globally

Uses opacity instead of color manipulation to deliver the same effect
2020-07-29 09:00:21 -04:00
Bianca Nenciu 27d853e2ea
FIX: Reset 'filter' query parameter when clicking on a nav-item (#10299)
Usually, this would have been implemented using resetController, but
because we do not use link-to component for linking, that method is not
called.
2020-07-29 15:38:15 +03:00
Bianca Nenciu fd02856f80
FIX: Keep category name in URL when filtering (#10317) 2020-07-29 14:57:05 +03:00
Sam Saffron 04a3b949a4
FIX: add protection when removing auto delete on post bookmarks
If you reply to a topic and are looking at an admin page (like site settings)
,you have no postStream or posts.
2020-07-29 16:42:39 +10:00
Penar Musaraj c2d31f5336
DEV: Remove effectively unused `disable-no-hover` class 2020-07-28 21:44:16 -04:00
Penar Musaraj 29276a37ed
DEV: Refactor `scale-color()` usage in SCSS 2020-07-28 19:56:35 -04:00
Penar Musaraj 8ae66047fc
Remove unused SCSS rules 2020-07-28 19:48:08 -04:00
Rafael dos Santos Silva 2ea17c06dd
FEATURE: Allow picture HTML element in posts 2020-07-28 20:26:32 -03:00
Kris 150e83d2a6 Add color definition so bold/italic btn localization matches icon color 2020-07-28 18:24:25 -04:00
Jordan Vidrine 7cf45dab01
Remove darken & lighten functions from scss (#10330) 2020-07-28 18:21:53 -04:00
Rafael dos Santos Silva c65c3407f8
FIX: Allow playsinline for videos in posts
This is used in webkit browsers mostly.
2020-07-28 19:03:54 -03:00
jbrw 74ab4f3bff
FEATURE - group modetators visual indicator (#10310) 2020-07-28 17:15:04 -04:00
Penar Musaraj 81ab62c72a
DEV: Refactor `blend-primary-secondary()` usage in SCSS 2020-07-28 13:33:31 -04:00
Joffrey JAFFEUX cfd3dcee4a
FIX: reduces charts height (#10327) 2020-07-28 18:42:14 +02:00
Joffrey JAFFEUX 11faec71ae
FIX: prevents group show serializer to override basic group serializer (#10326) 2020-07-28 18:11:15 +02: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
Robin Ward fc63f0d316 FIX: page:changed was sometimes reporting the wrong URL
(This change could be considered a little risky so we should keep an eye
on it.)

The core issue here is that sometimes as far as the router was concerned
we had transitioned to a route even if a Topic model was still in the
process of loading. In this case the callback could not retrieve the
correct title yet because it had not loaded.

This fix returns a promise from `setupController` when visiting a topic,
which will have the router block until the topic is loaded. This means
that the transition never triggers until the topic title is present.

Note: adding a test for this is basically impossible - it was super hard
to reproduce even in a browser.
2020-07-28 11:48:40 -04:00
Penar Musaraj 69efbd213b
DEV: Refactor `dark-light-diff` usage in stylesheets
- Adds new `$danger-low-mid` SCSS variable
- Removes `dark-light-diff` outside variables and color transformations
2020-07-28 11:06:06 -04:00
Robin Ward c9485692ed FIX: Add back group redirects 2020-07-28 10:59:42 -04:00
Joffrey JAFFEUX 0c7eaa57b2
FEATURE: allows to display charts by day/week/month (#10325) 2020-07-28 16:14:41 +02:00
Kris 074fa5cb18 Follow-up Safari fixes for 89f6ff1 2020-07-27 20:45:29 -04:00
Kris 7508c55a7b Remove extra whitespace between d-button icon and text 2020-07-27 18:49:57 -04:00
Blake Erickson 070a1d6e1e DEV: Remove duplicate allowedPmUsernames property
This property is already declared in the same file, so this removes the
one that isn't needed.
2020-07-27 16:10:00 -06:00
Kris 89f6ff1574 Prevent topic title from clipping some characters due to overflow 2020-07-27 17:26:48 -04:00
Jarek Radosz 223b6d17bf DEV: Fix a function name typo 2020-07-27 11:22:57 +02:00
Sam Saffron de5ef5d895
DEV: add CSS class for composer action
This CSS class can be used to style specific composer actions
2020-07-27 16:51:01 +10:00
Sam Saffron 179335b5e3
DEV: correct performance hack
This code was intended to bypass iterating through tags in absence of a new
or unread topic.

Instead it always fired cause it was checking for function existence which
was clearly always true.
2020-07-27 16:51:01 +10:00
Krzysztof Kotlarek f2342c2d32
FIX: reserve id for reaction notifications (#10315)
Use id 25 for reaction notifications
2020-07-27 11:39:50 +10: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 5077cf52fd REFACTOR: Remove `Discourse.SiteSettings` from upload.js 2020-07-24 13:39:16 -04:00
Robin Ward bb2460fe66 FIX: Uploads was not testing properly 2020-07-24 09:45:55 -04:00
Robin Ward 808b5aa5ba FIX: Pass `siteSettings` through in more places 2020-07-24 09:45:55 -04:00
Robin Ward f8aa304c7d REFACTOR: Remove `Discourse.SiteSettings` from uploads.js
This involves passing the siteSettings around, which is somewhat error
prone so I tried to be careful.
2020-07-24 09:45:55 -04:00
Robin Ward 8456252c21 Add deprecation for `Discourse.SiteSettings` in a helper 2020-07-24 09:45:55 -04:00
Robin Ward c4d5c0c91b REFACTOR: Remove `Discourse.SiteSettings` from utilities
This involves a little refactoring of how our `defaultHomepage()` works.
It previously would check the meta tag / site settings each time it was
called but now it only checks once on application boot.
2020-07-24 09:45:55 -04:00
Robin Ward 4def5a8339 Remove old redirect rules 2020-07-24 09:45:55 -04:00
Robin Ward 06a3fd0566 This initializer is not used anymore 2020-07-24 09:45:55 -04:00
Robin Ward bad083b3a3 REFACTOR: Remove `Discourse.SiteSettings` from clipboardData
Also rename method to `clipboardHelpers` to make searching easier since
`clipboardData` refers to browser functionality.
2020-07-24 09:45:55 -04:00
Robin Ward 0213211068 REFACTOR: Remove `Discourse.SiteSettings` from text helpers 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
Robin Ward 656abe22c7 REFACTOR: Remove `Discourse.SiteSettings` from more lib-like helpers 2020-07-24 09:45:55 -04:00
Martin Brennan 1dd3af20c6
FIX: Do not show Email tab for group settings unless IMAP + SMTP enabled (#10301)
Also hide all the SMTP/IMAP related settings to avoid confusion, as this feature is still not 100% ready to go.
2020-07-24 12:00:36 +10:00
David Taylor 61d3640643
DEV: Improve HTML structure for group-reports-nav-item outlet 2020-07-23 12:44:11 +01:00
Martin Brennan e027acd367
FIX: Move consts and translations for bookmark auto delete prefs (#10295) 2020-07-23 13:12:28 +10:00
Penar Musaraj 1100b3d185
UX: fix spacing of composer preview on mobile
Followup to 723d7e3a
2020-07-22 14:36:05 -04:00
Robin Ward c1bcb78441 REFACTOR: Allow helpers to access site settings
Since `Discourse.SiteSettings` is removed, helpers can now include and
call `helperContext().siteSettings` to get access to the settings
without using a global variable.
2020-07-22 14:14:38 -04:00
Robin Ward 939fae3500 REFACTOR: Remove `Discourse.SiteSettimgs` from @setting decorator 2020-07-22 13:27:57 -04:00
Robin Ward 4ecb4439b9 REFACTOR: Remove `Discourse.SiteSettings` from lightbox.js 2020-07-22 13:27:57 -04:00
Robin Ward 94419d0176 REFACTOR: Remove `Discourse.SiteSettings` from static route builder 2020-07-22 13:27:57 -04:00
Robin Ward 0bf28e418f REFACTOR: Remove `Discourse.SiteSettings` from `lib:search` 2020-07-22 13:27:57 -04:00
Robin Ward aa2eea7729 REFACTOR: Remove `Discourse.SiteSettings` from click tracking 2020-07-22 13:27:57 -04:00
Robin Ward bc7dac852f REFACTOR: Remove `Discourse.SiteSettings` from Category model 2020-07-22 13:27:57 -04:00
Robin Ward 217b970e16 REFACTOR: Remove `Discourse.SiteSettings` from desktop notifications 2020-07-22 13:27:57 -04:00
Robin Ward 37f2611d9c REFACTOR: Remove `Discourse.SiteSettings` from topic bulk actions 2020-07-22 13:27:57 -04:00
David Taylor 5b7c016ebc
FIX: Restore navigation-bar on tag topic list
This was accidentally removed in ac0d5b1d
2020-07-22 18:26:37 +01:00
tshenry 723d7e3a61
FEATURE: Submit post from mobile composer preview (#10286) 2020-07-22 09:17:51 -07:00
Bianca Nenciu 1fc58b5a4e
FEATURE: Add query params to staff action logs (#10279) 2020-07-22 18:25:58 +03:00
Penar Musaraj 09eb087f84
FIX: Remove iOS trick to prevent scrolling when focusing on input
No longer needed, removing it also fixes blinking when tapping the composer textarea
2020-07-22 11:18:01 -04:00
Jarek Radosz 300e30dcbf
FIX: Remove the border from YT thumbnail placeholder (#10288) 2020-07-22 16:38:35 +02:00
Penar Musaraj 45ae24a1e9
FIX: Apply video preview trick for Safari to stream only 2020-07-22 10:31:08 -04:00
Jordan Vidrine 5f19fd64ea
Update wizard.scss 2020-07-22 09:24:04 -05:00
Jordan Vidrine b0b42a3209
FIX: add system fonts to wizard 2020-07-22 09:07:57 -05:00