Commit Graph

15252 Commits

Author SHA1 Message Date
Joe 293323af38
UX: Splash screen v1 improvements (#17214)
This commit does six things

* changes the animation for the splash screen. To a more subtle animation.
* defers displaying the splash by 1.5 seconds
* defers displaying the splash "loading" text by 2.5 seconds
* defers removing the splash until all Discourse initializers have run
* fixes a display issue in Firefox
* Inlines the SVG as a base64 and inlines the required CSS.

The encoded SVG is hard coded for now, but we will use a helper to generate that based on the file after some testing.
2022-06-23 14:07:04 +08:00
Rafael dos Santos Silva a0f3ec7b13
FIX: darkMode availiability detection was broken (#17207)
This regressed on 2f66eb5 where CSS was moved from the HTML document
head to the body.

Bug report at https://meta.discourse.org/t/-/230656?u=falco
2022-06-22 14:32:13 -03:00
Joffrey JAFFEUX 684bc821be
DEV: allows category-badge helper to display a link (#17206) 2022-06-22 18:36:49 +02:00
Andrei Prigorshnev 033f72c65f
FEATURE: user status emoji (#17025) 2022-06-22 18:15:33 +04:00
Alan Guo Xiang Tan 0b8e6adabe
FEATURE: New/unread messages count in experimental sidebar (#17117)
* FEATURE: Expand messages filter links when viewing private messages.

* FEATURE: New/unread messages count in experimental sidebar
2022-06-22 11:01:37 +08:00
Jarek Radosz b09cce6897
DEV: Update ember-source-channel-url (#17196) 2022-06-22 00:12:43 +02:00
Jarek Radosz 06feeed187
DEV: Update `@ember/optional-features` (#17193) 2022-06-22 00:12:33 +02:00
Jarek Radosz 216663effa
DEV: Update ember-cli-dependency-checker (#17192) 2022-06-22 00:12:24 +02:00
Jarek Radosz b50056a9f3
DEV: Update ember-cli-inject-live-reload (#17191) 2022-06-22 00:12:15 +02:00
Jarek Radosz 1e522b0ee7
DEV: Update ember-buffered-proxy (#17190) 2022-06-22 00:12:04 +02:00
Jarek Radosz 0421a14319
DEV: Actually debounce functions in tests (#16213) 2022-06-21 23:34:04 +02:00
Joe e82a2ce9ae
UX: Introduces a splash screen behind a hidden site setting (#17094)
This PR introduces a new hidden site setting that allows admins to display a splash screen while site assets load.

The splash screen can be enabled via the `splash_screen` hidden site setting.

This is what the splash screen currently looks like

5ceb72f085.mp4

Once site assets load, the splash screen is automatically removed.

To control the loading text that shows in the splash screen, you can change the preloader_text translation string in admin > customize > text
2022-06-22 04:35:46 +08:00
Jarek Radosz 624c684d51
DEV: Transpile all plugin js by default (#17175)
Goodbye `# transpile_js: true`? 🙂
2022-06-21 22:07:10 +02:00
Jarek Radosz 9cb9d1105e
DEV: Update ember-auto-import (#17176) 2022-06-21 22:06:41 +02:00
Isaac Janzen 7fd38f4933
DEV: Remove `isLegacyEmber` (#17181) 2022-06-21 15:01:03 -05:00
Isaac Janzen 41028a84ef
DEV: add deprecation notice to `isLegacyEmber` (#17186) 2022-06-21 14:08:12 -05:00
Isaac Janzen b59e3b0b7c
DEV: Remove `isLegacyEmber()` from tests (#17184) 2022-06-21 13:37:29 -05:00
Jarek Radosz def39b2d58
DEV: Update `@babel/core` (#17163) 2022-06-21 12:48:44 +02:00
Joe 03ffb0bf27
FIX: Defer scripts on theme-tests route (#17171)
Small follow-up to #17063. That PR broke the theme tests route locally.

This PR fixes that.
2022-06-21 12:44:31 +08:00
Martin Brennan 54a518b21d
FIX: Quoting local dates bbcode regeneration (#17141)
This commit allows quoting of discourse-local-date elements
and converts the quoted tags back into bbcode so that the
rendered quote will also render the discourse-local-date HTML.
This works on single dates as well as date ranges, and supports
all of the options used by discourse-local-date.

This also necessitated adding addTextDecorateCallback to the
to-markdown core lib (similar to addBlockDecorateCallback and
addTagDecorateCallback) to transform the text nodes between
date ranges to remove the -> in the final quote.

c.f. https://meta.discourse.org/t/quotes-that-contain-date-time/101999
2022-06-21 10:07:21 +10:00
David Taylor d5743c0326
DEV: Add a discourse-booted performance mark (#17162)
This is useful when analysing performance in developer tools, and can also be used for analytics plugins
2022-06-20 19:39:39 +01:00
Jarek Radosz 011a16cb8a
DEV: Rename `translatedtitle` to `translatedTitle` (#17160) 2022-06-20 12:28:05 -06:00
Jarek Radosz 36c2284dea
DEV: Fix typos "formated" -> "formatted" (#17156)
(nothing in all-the* relies on these)
2022-06-20 20:02:05 +02:00
Jarek Radosz c9d3c45ba9
DEV: Remove obsolete parts of our custom loader (#17157) 2022-06-20 18:40:25 +02:00
David Taylor 1b4692039e DEV: Remove legacy JS manifests and vendored scripts
Now that we've switched to Ember CLI, these things are no longer used.

- These sprockets manifests are superceded by the assets generated by ember cli
- These vendored scripts are now fetched by ember-auto-import at compile time
2022-06-20 15:01:06 +01:00
Jarek Radosz ba2c7b8f35
DEV: Use the block form of `module()` (#17151) 2022-06-20 15:42:10 +02:00
Jarek Radosz 321118f384
DEV: Change `locationType` to `history`. (#17152)
`auto` value is deprecated, and we never really supported `hash` (which was the type `auto` was falling back into)
2022-06-20 15:41:53 +02:00
Gerhard Schlager 1c6f8f8a36
DEV: Upgrade Markdown.it to v13.0.1 (#17099)
Updates markdown-it to v13.0.1

Noteworthy changes:
* `markdownit()` is now available on `globalThis` instead of `window`.

* The `text_collapse` rule was renamed to `fragments_join` which affected the `bbcode-inline` implementation.

* The `linkify` rule was added to the `inline` chain which affected the handling of the `[url]` BBCode. If available, our implementation reuses `link_open` and `link_close` tokens created by linkify in order to prevent duplicate links.

* The rendered HTML for code changed slightly. There's now a linebreak before the `</code>` tag. The tests were adjusted accordingly.
2022-06-20 15:25:13 +02:00
Jarek Radosz 051167c98a
DEV: Fix `this.clearRender` deprecation warning (#17150)
```
{"type":"warn","text":"DEPRECATION: Using this.clearRender has been deprecated, consider using `clearRender` imported from `@ember/test-helpers`. [deprecation id: ember-test-helpers.setup-rendering-context.clearRender]"}
```
2022-06-20 15:13:42 +02:00
Joe 93b8811f08
DEV: Moves SVG sprite to `<discourse-assets>` element (#17148)
Similar to #17145

This commit moves the SVG sprite container to the <discourse-assets> element.

There is 0 visual or functional changes in this PR. It just tidies up the element view in devTools.
2022-06-20 20:58:50 +08:00
Joe 9d86a2b567
DEV: Adds missing defer attribute to wizard js in dev layout (#17146)
Small followup to #17063

The wizard `js` file slipped through the cracks. This only affected dev installs.
2022-06-20 16:59:42 +08:00
Joe b2bf1db36f
DEV: Move preloaded `json` into `<discourse-assets>` element (#17145)
This PR introduces 0 visual or functional changes. The only thing that it changes is that it moves the data-preloaded div (which has the app boot json into the <discourse-assets> element.

See #17078 for a bit more context.

The reason behind this change is that it makes devTools element view a little bit less cluttered.
2022-06-20 16:39:11 +08:00
Osama Sayegh 5176c689e9
UX: Change wording for 'regular' categories to 'normal' (#17134)
At some point in the past we decided to rename the 'regular' notification state of topics/categories to 'normal'. However, some UI copy was missed when the initial renaming was done so this commit changes the spots that were missed to the new name.
2022-06-20 06:49:33 +03:00
Alan Guo Xiang Tan 986060a850
FEATURE: Expand messages filter links when viewing private messages. (#17106) 2022-06-20 11:43:01 +08:00
Joe 2f66eb59c2
DEV: Slightly defer loading Discourse stylesheets (#17078)
This is related to #17063 and is also a pre-request for the splash screen work.

This PR introduces 0 visual or functional changes. It just relocates the stylesheets in the load order.
`.css` stylesheets block the browser render. We need to move those out of the <head> tag.

However, they still need to be loaded before core/plugin/theme rendered HTML to avoid FOUC.
2022-06-20 10:37:28 +08:00
Alan Guo Xiang Tan ef5b504e9a
DEV: Remove ember legacy env conditional in sidebar tests (#17140) 2022-06-20 10:07:06 +08:00
Alan Guo Xiang Tan 222a7755a0
DEV: Rely on route action to open composer. (#17118)
Avoid duplicating composer logic in multiple places.
2022-06-20 10:06:15 +08:00
Penar Musaraj 78fab9b7e1
DEV: Add `before-list-area` plugin outlet (#17136) 2022-06-20 10:05:46 +08:00
Joe 804b8fd9f9
DEV: Defer loading core/plugin/theme JS files (#17063)
This is pre-request work to introduce a splash screen while site assets load.

The only change this commit introduces is that it ensures we add the defer attribute to core/plugin/theme .JS files. This will allow us to insert markup before the browser starts evaluating those scripts later on. It has no visual or functional impact on core.

This will not have any impact on how themes and plugins work. The only exception is themes loading external scripts in the </head> theme field directly via script tags. Everything will work the same but those would need to add the defer attribute if they want to keep the benefits introduced in this PR.
2022-06-20 09:47:37 +08:00
Discourse Translator Bot 7ac485fb9f
FEATURE: Add Croatian language (#17130)
Co-authored-by: Gerhard Schlager <gerhard.schlager@discourse.org>
2022-06-18 00:18:22 +02:00
Ghassan Maslamani 84b0a6414d
FIX: double selecting replies (#17086)
When selecting a post and its replies using the "select +replies" button, the action would push all ids, without checking if some were already selected. 

This change add a filter to remove ids that are already selected.

This fixes https://meta.discourse.org/t/selecting-posts-replies-miscounts-the-number-of-posts/229242

Co-authored-by: @ZogStriP
2022-06-17 18:32:57 +02:00
Isaac Janzen 6ad5db80de
DEV: Remove use of run-loop-dot-access (#17114)
Context: https://deprecations.emberjs.com/v3.x/#toc_deprecated-run-loop-and-computed-dot-access
2022-06-17 11:19:14 -05:00
Isaac Janzen 1ada3a9404
DEV: Remove use of run-loop-and-computed-dot-access (#17113)
Context: https://deprecations.emberjs.com/v3.x/#toc_deprecated-run-loop-and-computed-dot-access
2022-06-17 09:43:13 -05:00
Osama Sayegh b0a896a10f
UX: Skip special paste handling in email-group-user-chooser when maximum is 1 (#17124)
`email-group-user-chooser` currently handles paste events to allow users to paste multiple entries at once instead of entering them one by one. This behavior makes sense when the component is used in scenarios where it makes sense to provide multiple entries such as the recipients field when creating a PM. However, for instances where the component accepts only 1 entry, it doesn't make a lot of sense to do custom handling of paste events.

This commit makes our paste event handler a NOOP when the component is configured to accept only 1 entry in which case pasting will simply input the value into the component's search field.
2022-06-17 16:53:50 +03:00
Jarek Radosz fcb4e5a1a1
DEV: Make wizard an ember addon (#17027)
Co-authored-by: David Taylor <david@taylorhq.com>
2022-06-17 14:50:21 +02:00
Jarek Radosz 79d3b25d97
DEV: Fix various frontend warnings (#17122)
3 computed property overrides and a tippy warning
2022-06-17 13:45:05 +02:00
Jarek Radosz f27f95b2e9
DEV: Don't print uppy warnings in test env (#17121) 2022-06-17 13:44:52 +02:00
Loïc Guitaut 1166db12b4
FIX: Make watched words uploads work as intended (#17097)
* FIX: Make watched words uploads work as intended

Currently when we upload a file containing watched words, it will always
add the words to the action that was initially selected: this is the
`block` action by default but if changing manually the action in the URL
to `flag` for example, then this action will be selected and uploaded
watched words will be categorised as `flag` no matter what.

The problem lies with how the component works: it’s an Uppy object where
extra data is defined to provide an action key to the server but when
navigating to another listed action, while this action key is properly
updated on the component itself, the underlying Uppy object has already
been created and doesn’t care about the new value.

This patch solves this by using the `_perFileData` method instead of
`data`: the former is merged just before uploading a file whereas the
latter is used when the Uppy object is created.
2022-06-17 11:07:58 +02:00
Alan Guo Xiang Tan f618fdf17f
Revert "DEV: Centralize user updates to a single MessageBus channel. (#17058)" (#17115)
This reverts commit 94c3bbc2d1.

At this current point in time, we do not have enough data on whether
this centralisation is the trade-offs of coupling features into a single
channel.
2022-06-17 12:24:15 +08:00
David Taylor 691afa2593
DEV: Handle emoji-picker and d-editor being destroyed simultaneously (#17109) 2022-06-16 17:16:15 +01:00