Commit Graph

15721 Commits

Author SHA1 Message Date
Bianca Nenciu 58b97ace23
DEV: Use a special import to declare font faces (#10583)
Update discourse-fonts to v0.0.3.

Follow-up to 7b7357147e.
2020-09-04 16:25:50 +03:00
Joffrey JAFFEUX 52672b9eab
DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
awesomerobot e4ebc303bb FEATURE: Add below-static plugin outlet 2020-09-03 22:58:58 -04:00
Robin Ward 8c0f18794e FEATURE: Deprecate lodash so we can remove it.
It's currently 240k of Javascript we don't need anymore. It's been
replaced by ES6 and a couple helper functions.
2020-09-03 10:03:33 -04:00
Robin Ward 3a46e44ed8 Rename `merge` to `deepMerge` so it's more clear what it's doing 2020-09-03 10:03:33 -04:00
Robin Ward f365d4639a REFACTOR: Remove `_.isEqual` 2020-09-03 10:03:33 -04:00
Robin Ward c4079780be REFACTOR: Remove `_.merge` 2020-09-03 10:03:33 -04:00
Robin Ward 720cd57fb5 FIX: Convert jQuery array to JS array 2020-09-03 10:03:33 -04:00
Robin Ward 5e5d5b4f35 REFACTOR: Remove `_.last` 2020-09-03 10:03:33 -04:00
Robin Ward 0da953b40e REFACTOR: Remove `_.compact` 2020-09-03 10:03:33 -04:00
Robin Ward c2cfa62000 REFACTOR: Remove `_.intersection` 2020-09-03 10:03:33 -04:00
Robin Ward 0b098566ff REFACTOR: Remove `_.union` 2020-09-03 10:03:33 -04:00
Robin Ward e60d06d880 REFACTOR: Remove `_.isString` 2020-09-03 10:03:33 -04:00
Robin Ward b4444070b3 REFACTOR: Remove `_.groupBy` 2020-09-03 10:03:33 -04:00
Robin Ward 1265a5f7c0 REFACTOR: Remove `_.max` 2020-09-03 10:03:33 -04:00
Robin Ward d06deb0c4f REFACTOR: Remove `_.chain` 2020-09-03 10:03:33 -04:00
Robin Ward 71ddcefffa REFACTOR: Remove `_.filter` 2020-09-03 10:03:33 -04:00
Robin Ward 87b3caf927 REFACTOR: Remove `_.reject` 2020-09-03 10:03:33 -04:00
Robin Ward 2a4dfa83b0 REFACTOR: Remove `_.omit` 2020-09-03 10:03:33 -04:00
Robin Ward 17bca14c4b REFACTOR: Remove `_.sortBy` 2020-09-03 10:03:33 -04:00
Robin Ward 2353794a30 REFACTOR: Remove `_.findIndex` 2020-09-03 10:03:33 -04:00
Robin Ward e3ec7b72d0 REFACTOR: Remove `_.uniq` and use ember version 2020-09-03 10:03:33 -04:00
Robin Ward 66021abe41 REFACTOR: Remove `_.first` from codebase 2020-09-03 10:03:33 -04:00
Robin Ward 55c9c54b8b REFACTOR: Remove `_.range` and use ES6 instead 2020-09-03 10:03:33 -04:00
Robin Ward 115b3b6921 REFACTOR: Remove `_.isEmpty` in favor of the existing version 2020-09-03 10:03:33 -04:00
Robin Ward 65f6a92129 REFACTOR: Replace `_.extend` with `Object.assign` 2020-09-03 10:03:33 -04:00
Robin Ward 2f11457263 REFACTOR: Use `Array.isArray` instead of `_.isArray` 2020-09-03 10:03:33 -04:00
Penar Musaraj 50827684d5
UX: Hide category settings badges checkbox when enable_badges is off 2020-09-02 11:23:59 -04:00
Joffrey JAFFEUX c6e336b519
REFACTOR: simplifies connectors code (#10579)
- directly uses factoryFor to avoid having to set owner later
- drops jquery usage
- renames view into component as I find it more explicit
2020-09-02 15:53:42 +02:00
Joe 879e274dc7 UX: wrap extra long links in GitHub oneboxes instead of overflowing 2020-09-02 21:50:57 +08:00
awesomerobot ec0b4b2acc FIX: wait for groups before showing empty message 2020-09-01 22:36:00 -04:00
Ahmed Gagan b14098ce28
removed REGEXP_IN_MATCH regex to make it flexible to use with plugins (#10476)
* dynamic regex generation for 'STATUS' and 'IN' ddropdown
2020-09-01 14:33:05 +02:00
Joffrey JAFFEUX f8062300da
DEV: removes jquery usage from highlight-syntax (#10564) 2020-09-01 09:50:49 +02:00
Krzysztof Kotlarek 084e15b447
FIX: modify notification after remove auto_watch_category (#10568)
When a category is removed from `auto_watch_category` we are removing
CategoryUser. However, there are still TopicUser with notification level
set to `watching` which was inherited from Category.

We should move them back to `regular` unless they were modified by a user.
2020-09-01 13:07:41 +10:00
awesomerobot e824385e64 only remove edit button margin when text is hidden 2020-08-31 22:45:43 -04:00
Martin Brennan 594d919d22
FIX: Focus first button in topic admin menu (#10562)
When using Shift+A to toggle the admin menu for a topic the first button was not focused, so the menu could not be navigated with tab.
2020-09-01 10:29:35 +10:00
Joe c3560a66f3 DEV: CSS truncation followup
After merging this

58fe78bf28 (diff-fed21847d651f6eb2cc76abbd770f5f8)

I noticed that the code I'm removing in this commit is causing text to be truncated a bit early on desktop. So, I'm removing it for now.
2020-09-01 02:01:17 +08:00
tshenry 2550c5bd03
FIX: Ensure disabling 2FA works as expected (#10485) 2020-08-31 09:56:57 -07:00
Roman Rizzi 2a3a173e8e
FIX: Disable insert link button when editing a category (#10549) 2020-08-31 13:50:40 -03:00
Joe 58fe78bf28 UX: don't wrap topic status icons in the header if there's more than one
Context: https://meta.discourse.org/t/when-a-topic-is-closed-and-pinned-the-pin-icon-in-header-not-in-correct-place/162473

Flex is causing a bit of a problem here since it makes the `topic-statuses` div in the header wrap when it has more than one icon. Given that we already use grid on the parent and that the icons are aligned properly, I think it's safe to remove it here.
2020-09-01 00:40:42 +08:00
Bianca Nenciu f2e14a3946
FEATURE: Add site setting and wizard step to set base font (#10250)
Co-authored-by: Neil Lalonde <neillalonde@gmail.com>
2020-08-31 13:14:09 +03:00
Penar Musaraj b4c5f6631f
FIX: Do not set color_scheme_id in user options when no schemes are marked as selectable 2020-08-30 09:32:40 -04:00
Kris 7bba65b6f5
UX: Restyle user menu so user links are findable (#10554) 2020-08-28 20:20:59 -04:00
Robin Ward aae97457d2
REFACTOR: Don't use `layoutName` in select-kit (#10556)
Instead import the templates as modules, the way Ember CLI wants us to.
2020-08-28 15:30:20 -04:00
Penar Musaraj b7cfc9e861
FEATURE: User selectable color schemes (#10544) 2020-08-28 10:36:52 -04:00
Robin Ward 96edb7da38 REFACTOR: Move Mousetrap library to an import 2020-08-27 16:17:19 -04:00
Robin Ward c172f2068d
REFACTOR: Remove $.cookie in favor of a local library based on it (#10548)
This helps us out in a few ways:

1. It lessens our reliance on jQuery
2. It's slightly less code because it omits options we don't use
3. It is one less library to import and put into ES6 modules
2020-08-27 14:07:51 -04:00
Vinoth Kannan a8502ae1c4
FEATURE: add dismiss unread topics button when filtered by tag. (#10547) 2020-08-27 23:04:45 +05:30
Joffrey JAFFEUX 1cc5e8ea63
DEV: gives didRender and willRerender hooks to widgets (#10496)
didRender will be called each time the widget is rendered
willRerender will be called the second time a widget is rendered to give an opportunity to clean some state before the tree is replaced
2020-08-27 16:07:14 +02:00
Kane York a51db9a7bf
UX: make category topic counts clickable on mobile (#10541) 2020-08-27 01:50:18 -07:00
Kris 95179a5ab6 Button bar needs visible overflow, follow-up to 489443e 2020-08-26 20:52:03 -04:00
Kris 489443e3a9
UX: Better handling of long category names and button bar in composer (#10542) 2020-08-26 19:38:20 -04:00
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 `container`s 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