Commit Graph

15669 Commits

Author SHA1 Message Date
Jordan Vidrine
7cdef9f793
Remove tag name from classList (#10540)
* Remove tag name from classList
2020-08-26 17:20:57 -05:00
Jordan Vidrine
ce2491dc2f
Css class additions (#10532)
* Category Page / Tag Class Additions

These additions add:

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

After this commit it should still be present
2020-08-26 19:01:08 +02:00
Robin Ward
ff4de97dfd
REFACTOR: Move bootbox to an import instead of global variable (#10533) 2020-08-26 12:57:13 -04:00
Gerhard Schlager
354014099d Update copy and remove unused strings 2020-08-26 18:08:41 +02:00
jahan-ggn
ae7ff5eb73
FEATURE: Added sort by username for directory items (#10482)
* done-sorting-usernames-on-users-page

* sorted-usernames-on-users-page

* spec written

* specs added
2020-08-26 10:14:20 -04:00
Kane York
93e136ae0e
UX: show a generic error on upload for XHR status 0 (#10521)
This indication covers all cases of network errors, not just "cancelled by user".
The post upload component already has its own handling for user-cancelled uploads, but the generic upload component does not.

Tested by stopping my localhost server right before attempting to upload a file.
2020-08-25 12:08:03 -07:00
Penar Musaraj
7277ca6cb6
UX: Add category-title-before to categories-boxes layout
Makes it consistent with the other /categories layouts
2020-08-25 13:35:13 -04:00
Robin Ward
2523a21fc3 FIX: Server side rendering was broken with new helperContext() 2020-08-25 09:16:32 -04:00
Robin Ward
a3fb732b23 REFACTOR: We can reuse getOwner for some container stuff 2020-08-25 09:16:32 -04:00
Robin Ward
347a4981a0 REFACTOR: Remove Discourse constant from get-owner 2020-08-25 09:16:32 -04:00
Robin Ward
185ed80702 REFACTOR: Remove Discourse constants from nav-item 2020-08-25 09:16:32 -04:00
Robin Ward
c068098f75 REFACTOR: Remove container from User class 2020-08-25 09:16:32 -04:00
Robin Ward
c94ba34882 REFACTOR: Remove __container__ from Site 2020-08-25 09:16:32 -04:00
Robin Ward
ac498ae2a0 REFACTOR: Remove container from ajax 2020-08-25 09:16:32 -04:00
Robin Ward
df8ae6891c REFACTOR: Remove constants from text helper 2020-08-25 09:16:32 -04:00
Robin Ward
4063cab8c2 REFACTOR: Missed containers in DiscourseURL 2020-08-25 09:16:32 -04:00
Robin Ward
02e8d84e30 REFACTOR: Remove Discourse constant from showModal 2020-08-25 09:16:32 -04:00
Robin Ward
98e5e1cd53 REFACTOR: Remove container from DiscourseURL 2020-08-25 09:16:32 -04:00
Robin Ward
dae8b9bcfb FIX: Remove container from utilities 2020-08-25 09:16:32 -04:00
Robin Ward
89d766d089 REFACTOR: Remove container from safari-hacks 2020-08-25 09:16:32 -04:00
Robin Ward
c7c3fd4209 REFACTOR: Remove container from pwa-utils 2020-08-25 09:16:32 -04:00
Robin Ward
ebc0298ea0 REFACTOR: Remove Discourse.authenticationComplete 2020-08-25 09:16:32 -04:00
Robin Ward
20e1233f89 REFACTOR: Remove container from raw template helper 2020-08-25 09:16:32 -04:00
Gerhard Schlager
dac0e5b3cc
Merge pull request #10519 from gschlager/get-url
Fixes for getURL() in subfolders and basePath in translations
2020-08-25 11:42:50 +02:00
Jarek Radosz
e66f95de3a
FIX: DEV: Lock-on improvements (#10448)
* DEV: Don't listen for deprecated events

https://developer.mozilla.org/en-US/docs/Web/API/Element/DOMMouseScroll_event

https://developer.mozilla.org/en-US/docs/Web/API/Element/mousewheel_event

* DEV: Listen only on the `body` element

* DEV: clearLock after a while if target is missing

* DEV: Bind the callback

* FIX: Use `requestAnimationFrame`

Prevents content jumps
2020-08-25 11:42:00 +02:00
Gerhard Schlager
6c09fd4289 DEV: Remove unused code and translations 2020-08-25 11:41:19 +02:00
Joe
66aa94c515
UX: Timeline should jump to the bottom of the post in single-post topics (#10503) 2020-08-25 16:22:07 +08:00
Kris
a92a6b7b10 UX: Minor layout fixes and improved consistency on theme admin 2020-08-24 22:51:58 -04:00
Mark VanLandingham
cef51b3489
DEV: Remove hasBlock from user-info component (#10415) 2020-08-24 21:44:01 -05:00
Neil Lalonde
ed30f49315
FIX: duplicate categories and tags allowed in inputs where they shouldn't be allowed
blocklist was renamed to blockedCategories/Tags
2020-08-24 17:37:04 -04:00
Neil Lalonde
52217099ed
FIX: group categories inputs not filled sometimes
If you land on the group > manage > categories page or reload it,
the fields will all be blank when there should be categories.
2020-08-24 17:15:37 -04:00
Gerhard Schlager
1959745c2c FIX: Current title wasn't visible when assigning badge title 2020-08-24 21:39:44 +02:00
Roman Rizzi
dd13304b81
FEATURE: More API scopes (#10493) 2020-08-24 12:15:08 -03:00
Joffrey JAFFEUX
b6dd3eca9a
FIX: ensures diversity code is not applied multiple times (#10517) 2020-08-24 16:10:47 +02:00
Joffrey JAFFEUX
265d8bc1d7
FIX: close picker on emoji selection when on mobile device (#10516) 2020-08-24 15:04:44 +02:00
Joffrey JAFFEUX
c3364b3a6b
UX: improves picker on automatic dark themes (#10515) 2020-08-24 15:04:11 +02:00
Joffrey JAFFEUX
226be994da
REFACTOR: rewrite the emoji-picker (#10464)
The emoji-picker is a specific piece of code as it has very strong performance requirements which are almost not found anywhere else in the app, as a result it was using various hacks to make it work decently even on old browsers.

Following our drop of Internet Explorer, and various new features in Ember and recent browsers we can now take advantage of this to reduce the amount of code needed, this rewrite most importantly does the following:
- use loading="lazy" preventing the full list of emojis to be loaded on opening
- uses InterserctionObserver to find the active section
- limits the use of native event listentes only for hover/click emojis (for performance reason we track click on the whole emoji area and delegate events), everything else is using ember events
- uses popper to position the emoji picker
- no jquery code
2020-08-24 14:20:51 +02:00
David Taylor
9debfed060
FIX: Add cache-busting parameter to ace-editor javascript
Long-term we should consider adding the file hash to javascript URLs, so that the URL changes whenever the file changes
2020-08-24 12:29:46 +01:00
David Taylor
ac80109705
DEV: Improve user card styling extensibility (#10508)
- Add a metadata-row class
- Remove wrapper tags from user-card-after-metadata and user-card-before-badges outlets
- Correct max-height for mobile card
2020-08-24 11:02:40 +01:00
Joffrey JAFFEUX
23b823dd3a
FIX: removes us_pacific-new from the list of available timezones (#10514) 2020-08-24 11:04:46 +02:00
Guo Xiang Tan
4b30799054
FIX: Correct personal_messages:<username> advanced search filter.
Renamed from `private_messages` to `personal_messages` without
deprecation because the `private_messages` advanced search filter never
worked in the first place when it was implemented.
2020-08-24 11:54:30 +08:00
Martin Brennan
9022e4516f
FIX: Remove unnecessary audio/video parent element load (#10511)
Meta report: https://meta.discourse.org/t/sending-many-requests-for-video-audio-upload-while-editing-post/161487

When typing in the composer we are sending a lot of unnecessary load() requests for the video/audio elements. This line was added months ago before we improved previewing/video thumbnails, which have improved things, so it is no longer required. After removing this line everything still works and no more additional requests are sent.
2020-08-24 13:18:38 +10:00
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