Commit Graph

19154 Commits

Author SHA1 Message Date
Jarek Radosz
545bfcaca7
DEV: Simplify "Editing a post stages new content" test (#18007) 2022-08-21 09:20:26 +02:00
Jarek Radosz
870ff48470
DEV: Rework two composer actions tests (#18008) 2022-08-21 09:19:39 +02:00
Jarek Radosz
d35ffe8361
DEV: zoom isn't used anymore (#18016) 2022-08-21 09:18:19 +02:00
Jarek Radosz
1284d746b0
DEV: Remove progid:DXImageTransform (#18017) 2022-08-21 09:17:58 +02:00
Jarek Radosz
cb49fcad63
DEV: Clean up keyTrapper prototype override (#18018) 2022-08-21 09:17:33 +02:00
Jarek Radosz
dc5dc78309
DEV: Use async and sinon.resolves instead of rsvp (#18001)
…in tests
2022-08-20 11:20:55 +02:00
Jarek Radosz
e3108ded11
UX: Hide chat image overflow (#18000)
When there was a problem with an image the built-in frame would expand way outside the message.
2022-08-20 11:19:55 +02:00
Jarek Radosz
9b55c42eee
UX: Correctly center the reply-where modal (#17999)
And make the buttons actually full width, and use css vars.
2022-08-20 11:19:38 +02:00
Isaac Janzen
42385d020d
DEV: Add values to bread-crumbs-right plugin outlet (#18005) 2022-08-19 12:34:46 -05:00
Isaac Janzen
ce30422d6c
DEV: Add select-kit option to hide values from preview (#18002)
* DEV: Add select-kit option to hide values from preview
2022-08-19 11:39:58 -05:00
Isaac Janzen
36f766399d
DEV: Add after-title-and-category plugin outlet (#18004) 2022-08-19 11:39:46 -05:00
Osama Sayegh
67bb0d8a55
DEV: Add profile tab to the experimental user menu (#17982)
This commit adds the profile tab to the experimental user menu. We're adding it to the user menu because it contains links/buttons that are not available anywhere else. We may remove the tab again if we find better places for those links/buttons, but for now it'll stay.

For more context on the experimental user menu, see https://github.com/discourse/discourse/pull/17379.
2022-08-19 13:02:11 +03:00
David Taylor
66376a6569
PERF: Minify admin and wizard JS bundles to match app (#17992)
This regressed when we switched these bundles to be compiled by ember-cli. Before/after sizes:

```
          before                  after
admin.js: 1370 KB (190 KB gz) --> 782 KB (125 KB gzipped)
wizard.js: 127 KB ( 22 KB gz) -->  68 KB ( 18 KB gzipped)
```
2022-08-19 08:35:00 +01:00
Alan Guo Xiang Tan
2d1e50911b DEV: Use button for sidebar section header
Buttons can be focused and action triggered via the enter key compared
to a span.
2022-08-19 10:21:36 +08:00
Martin Brennan
49a70a37f1
FIX: Remove last_unread_post excerpt logic for bookmarks (#17979)
The logic to determine what post excerpt to show for
a topic-level bookmark based on the last unread post
was complex and slow, so we decided to remove it and
always just use the first post excerpt.

This commit also fixes an issue where a couple of
instances of for_topic were missed when doing the
Bookmarkable refactors, so:

1. Clicking the topic bookmark link was not taking
   the user to the last unread post
2. When replying to a topic where there was a topic
   level bookmark with the auto delete preference
   of "on owner reply", we were not removing the
   bookmark from the UI correctly.

A test has been added for the former, the latter would
be quite time-consuming to test and not really worth
it considering it's quite an edge case UI bug.
2022-08-19 09:35:25 +10:00
David Taylor
df9e546f5d
DEV: Abort qunit tests when clicking in the toolbar (#17989)
Ever opened `/tests`, immediately tried to change the config, and got frustrated that focus keeps getting stolen by the running tests? Worry no more - this commit will make the tests auto-abort when you click any of the input/dropdowns in the QUnit header. It's not perfect - abort will wait until the end of the currently running test, so sometimes focus will be stolen one more time. But it's still a lot better than having to manually find and click the abort button.
2022-08-18 23:32:38 +01:00
David Taylor
c63580b226
DEV: Add hint when qunit assertion fails and app is unsettled (#17984) 2022-08-18 16:19:46 +01:00
Andrei Prigorshnev
e49167b311
UX: Improve empty state copy on the activity/replies page (#17784) 2022-08-18 18:00:15 +04:00
Andrei Prigorshnev
d7c1ff3116
UX: show blank page placeholder instead of the blue panel that says "No Activity" (#16293) 2022-08-18 17:24:52 +04:00
Jarek Radosz
6c46f4af71
UX: Don't shrink avatar/number box (#17985)
Fixes an issue where longer sidebar item text would squeeze the prefix element
2022-08-18 14:36:30 +02:00
Arpit Jalan
1e58bed4d2
DEV: add tests for --composer-height calculation (#17986)
Follow up for 2b43238973
2022-08-18 18:03:15 +05:30
Jarek Radosz
7b51ac418b
DEV: Asyncify most of Composer controller (#17974)
…and fix cases where we were breaking the promise/async chain (by not awaiting or not returning promises)
2022-08-18 13:58:08 +02:00
Arpit Jalan
a252bbf3e8
FIX: show hide bootstrap mode notice in real time (#17981) 2022-08-18 17:09:33 +05:30
Andrei Prigorshnev
be1b202fd6
FEATURE: show default custom date on time-shortcut-pickers (#17867) 2022-08-18 14:55:54 +04:00
Alan Guo Xiang Tan
5990842dd9 UX: Revamp styling of sidebar
The following changes are made in this commit:

1. Move caret icon in sidebar section header to the right.
1. Each row in sidebar takes the full width which enables us to do a
full width highlight on hover and when sidebar link is active.
1. Ensure each row in Sidebar is of the same height.

Internal refs: /t/70546, /t/72196, /t/71820
2022-08-18 16:14:49 +08:00
David Taylor
44c53cb3bf
DEV: Update internal package.json metadata (#17978)
These packages are not published anywhere - they only exist for organizational purposes within this repository. Even so, it makes sense for their metadata to match that of the top-level discourse/discourse repository.
2022-08-17 23:27:16 +01:00
David Taylor
72ea00d0cc
DEV: Add progress output in CI during ember-cli build (#17977)
By default, in CI environments, Ember CLI does not output anything between "building..." and "cleaning up". Depending on configuration and hardware, Discourse asset builds can take upwards of 60s, and so this lack of output can make the build feel 'stuck'.

This commit introduces an addon which checks for CI mode, and then outputs status information periodically. The logic is very similar to Ember CLI's non-CI progress output implementation (https://github.com/ember-cli/ember-cli/blob/04a38fda2c/lib/models/builder.js#L183-L185).
2022-08-17 22:39:52 +01:00
David Taylor
e70bab16e0
DEV: Ensure custom ember-cli addons only output JS files (#17976)
Without this filter, a binary file (e.g. `.DS_Store`) in one of these addon directories will be concatenated into the output JS. Note that this filter is applied at the end of the build pipeline, so any hbs files have already been transpiled into `.js`.

This mirrors the filtering performed on the main application bundle by Ember CLI: https://github.com/ember-cli/ember-cli/blob/04a38fda2c/lib/broccoli/default-packager.js#L1255
2022-08-17 21:42:55 +01:00
Keegan George
602efedd81
UX: Make popup menu options scroll on limited screen height (#17973) 2022-08-17 13:42:25 -07:00
Jarek Radosz
665327f7a4
DEV: Clean up loadDraft() (#17969) 2022-08-17 20:43:35 +02:00
Arpit Jalan
2b43238973
FIX: set --composer-height when the composer is in collapsed state (#17968) 2022-08-17 20:51:09 +05:30
Jarek Radosz
83a975a28b
DEV: Await for all async MessageBus callbacks (#17966)
Should take care of yet another category of flaky tests
2022-08-17 12:44:48 +02:00
Osama Sayegh
129885c260
DEV: Add test for arrow keys navigation in the experimental user menu (#17961)
This test is extracted from the changes proposed in: https://github.com/discourse/discourse/pull/17379.
2022-08-17 11:51:29 +03:00
Alan Guo Xiang Tan
95c7cdab94 DEV: Template colocation for sidebar files
We can finally rely on template colocation in our app and we'll be
standarizing on that in the near future. However, I want to have sidebar
adopt this convention earlier.
2022-08-17 16:44:04 +08:00
Alan Guo Xiang Tan
0f0ea75a21
DEV: Display Sidebar template for anonymous user (#17962)
Setup the stage for the sidebar which will be shown to anonymous users.
2022-08-17 16:17:36 +08:00
Arpit Jalan
42c64abe15
FEATURE: open create invite modal from the bootstrap notice banner (#17960) 2022-08-17 13:11:09 +05:30
Alan Guo Xiang Tan
97a20d6d82
UX: Sort tags alphabetically in sidebar (#17959) 2022-08-17 14:47:29 +08:00
Alan Guo Xiang Tan
f7ed09a02c
UX: Sort categories alphabetically in Sidebar (#17958) 2022-08-17 12:39:02 +08:00
Alan Guo Xiang Tan
4657110c35
UX: Make category section link icons consistent with Sidebar's interface (#17922)
Instead of relying on another help to generate the icons, we want to
rely on the interface for adding prefix icons. This ensures that prefix
icons are consistent across the section links in Sidebar
2022-08-17 09:40:43 +08:00
Penar Musaraj
2e09a88a29
A11Y: Accessible full-screen and minimize composer buttons (#17936) 2022-08-17 09:39:41 +08:00
Penar Musaraj
c790b0305c
A11Y: Use button in d-modal-cancel component (#17938)
Fixes issue under User profile > Preferences > Security > Recently Used
devices > Cog icon. And cleans up the "reply where" modal as well.
2022-08-17 09:39:28 +08:00
Arpit Jalan
f788c1b3e4
FIX: welcome topic title was not editable (#17950)
The topic title was not editable when composer was opened from the
welcome topic banner.
2022-08-16 21:27:40 +05:30
David Taylor
3e010bc88c
DEV: Ensure RenderGlimmer handles in-place component changes (#17946)
If a widget toggles between displaying two different RenderGlimmer instances, the Widget framework treats them as the same, and so `update()` is called rather than destroy/init. This commit detects this scenario and manually destroys/inits to ensure the correct component is being rendered.
2022-08-16 16:44:21 +01:00
Penar Musaraj
e862373899
A11Y: Don't include aria on reply count span element (#17948) 2022-08-16 10:28:31 -04:00
Jarek Radosz
5c6f8d64f9
DEV: Use afterEach instead of try/finally (#17944)
Also removes _clearSnapshots calls, as those are already being reset in testCleanup
2022-08-16 10:49:09 +02:00
Jarek Radosz
53af30ec3f
DEV: Do the full cleanup after **every** test (#17943)
Previously the global state wasn't cleared in some cases leading to widespread test failures.
2022-08-16 10:48:32 +02:00
Jarek Radosz
655941b79c
DEV: Await for async helpers (#17942)
Fixes flaky tests. Also, a typo.
2022-08-16 10:48:17 +02:00
Jarek Radosz
7673899a6b
DEV: Remove commented-out code (#17945) 2022-08-16 10:46:26 +02:00
Alan Guo Xiang Tan
083c0074d6
DEV: Remove code that is not being used (#17941) 2022-08-16 13:58:43 +08:00
Alan Guo Xiang Tan
7a05a9d411
UX: Make Sidebar more consistent with user menu on mobile (#17940)
Before this commit, we carried custom code and styles for the sidebar on
mobile. This meant the look and feel of bringing up the sidebar on
mobile was very different from the user menu resulting in a very
inconsistent experience on mobile. Also, we could not leverage on the
existing swipe to close support on mobile.

In this commit, we made it such that the sidebar dropdown is always
rendered on mobile and made the interaction with the dropdown more
consistent with the user menu. There is also more parity with the old
hamburger dropdown when the experimental sidebar is disabled.
2022-08-16 13:45:32 +08:00
David Taylor
e4de738f59
DEV: Introduce on-resize modifier and service (#17935)
This commit introduces a new `{{on-resize}}` modifier along with its companion `resize-observer` Service. These automatically take care of setting up the observer and handling cleanup.
2022-08-16 10:39:42 +08:00
Osama Sayegh
75599fb88e
DEV: Refactor new user menu files (#17879)
This commit includes the changes proposed in #17823. I've made these changes so that plugins that need to add tabs/lists with mixed item types - like the bookmarks tab that displays notifications and bookmarks - to the menu, don't have to write 2 templates like we currently do for the bookmarks/messages tabs (see user-menu/bookmark-notification-item.js that has been deleted in this commit).
2022-08-16 10:37:56 +08:00
Penar Musaraj
b930f4886a
UX: Add flat text button styles and use in date/time cancel modal (#17892)
Also fixes an A11Y issue with the date/time cancel button.
2022-08-15 15:06:03 -04:00
Penar Musaraj
0d6fd1a606
A11Y: Add clearer focus states for date picker elements (#17890)
Affects date dropdowns, prev/next month arrows and day grid.
2022-08-15 14:50:07 -04:00
Jarek Radosz
5043669d05
DEV: Proxy mobile_view param to /bootstrap.json (#17934)
Without this it took an extra request for the setting to take in dev mode.

Also, append `preview_theme_id` only when present.
2022-08-15 18:56:38 +02:00
Jarek Radosz
2a1de963ac
DEV: Fix /logs in dev env (#17933)
The space character was missing in CSP between `_lr` and `logs` urls.
2022-08-15 18:56:23 +02:00
David Taylor
55f34c45c6
DEV: Modernise discovery controller query parameter construction (#17927)
Using `URLSearchParams` means that we don't have to manually encode/join strings
2022-08-15 17:20:44 +01:00
David Taylor
7067f13169
DEV: Silence resolver deprecations for now (#17931)
These are in widespread use, and upgrading themes/plugins right now would break their compatibility with the stable branch. These should be unsilenced for the release of 2.9.0 stable.
2022-08-15 16:11:46 +01:00
David Taylor
3ffc213fa9
FEATURE: Add safe-mode toggle to /u/admin-login (#17930)
Previously, this would require manually adding `?safe_mode=...` multiple times during the email-based login flow. `/u/admin-login` is often used when debugging a site, so it makes sense for this to be easier.

This commit introduces a new checkbox on the `/u/admin-login` screen. When checked, it'll set the safe_mode parameter on the `/email-login` link, and then pass it all the way through to the homepage redirect.
2022-08-15 15:30:07 +01:00
David Taylor
64a66cf82b
UX: Improve safe-mode usability (#17929)
- `no_custom` -> `no_themes` (history: before themes existed, we had a similar tool called 'customizations')
- `only_official` -> `no_unofficial_plugins` (matches format of `no_themes` and `no_plugins`, and makes it clear that this doesn't affect themes)
- `?safe_mode=no_themes%2C%no_plugins` -> `?safe_mode=no_themes,no_plugins` (the query portion of a URL does not require commas to be encoded. This is much nicer to read)
- If `no_plugins` is chosen from `/safe-mode` the URL generated will omit the superfluous `no_unofficial_plugins` flag
- Some tweaks to copy on `/safe-mode`
2022-08-15 15:15:15 +01:00
David Taylor
a9e9adf253
DEV: Modernise rest adapter query parameter construction (#17925)
Using `URLSearchParams` means that we don't have to manually encode/join strings
2022-08-15 14:44:07 +01:00
David Taylor
b6c6c803c2
DEV: Allow safe_mode and preview_theme_id to work via ember-cli proxy (#17928) 2022-08-15 14:43:43 +01:00
David Taylor
3d070b4a32
FIX: Ensure topic-list adapter never serializes undefined (#17924)
There was existing logic for this, but it was broken because the values were being run through `encodeURI` before checking its type. This commit takes the opportunity to modernise the function to use `URLSearchParams`, which means we no longer need to handle encoding/joining strings manually.

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2022-08-15 12:16:01 +01:00
David Taylor
6e5f08543e
DEV: Modernise navigation-item query parameter construction (#17926)
Using `URLSearchParams` means that we don't have to manually encode/join strings
2022-08-15 12:12:32 +01:00
David Taylor
a185713e5f
DEV: Ensure date-time-input-range-test works in all timezones (#17923)
The test was failing when run outside of the UTC timezone
2022-08-15 11:28:30 +02:00
David Taylor
6cac35ca29 DEV: Update JS class sorting to match new lint rule 2022-08-15 09:28:31 +01:00
Krzysztof Kotlarek
8cd1340170
Revert "DEV: Experimental scroll sidebar to specific element event handler (#17727)" (#17920)
This reverts commit af912b4b0e.
2022-08-15 11:10:58 +08:00
Alan Guo Xiang Tan
6c13d82630
UX: Reduce font-size of sidebar section link suffix icon (#17919) 2022-08-15 10:34:30 +08:00
Alan Guo Xiang Tan
5a271fdc90
DEV: Skip flaky sidebar test (#17918)
The test is still useful and I intend to look at it in the future but
this is not the utmost priority at this point.

Follow-up to 68cefc9f9d
2022-08-15 10:33:59 +08:00
Penar Musaraj
c66d544cf9
A11Y: Keep composer as focused element when dismissing Link modal via keyboard (#17893) 2022-08-15 09:37:19 +08:00
Penar Musaraj
a32019d1e7
A11Y: add focus state for advanced search toggles (#17894)
Using `focus-visible` to ensure this only shows when navigating using
a keyboard.
2022-08-15 09:36:55 +08:00
Penar Musaraj
3fd929534c
A11Y: Improve group box hover highlight on dark schemes (#17895) 2022-08-15 09:36:28 +08:00
Jarek Radosz
cac1608213
DEV: Fix sidebar-hidden localStorage value (#17915)
Previously ,`undefined` value for `sidebar-hidden` would mean "hide". Not it uses `true`.

Also, extract it into a const.
2022-08-15 09:35:01 +08:00
Jarek Radosz
afaa2d5417
DEV: Fix localStorage test leakage (#17917)
We weren't clearing the store in all cases.
2022-08-15 09:33:25 +08:00
Arpit Jalan
3a21618e4e
FEATURE: allow wizard checkbox field to be disabled (#17916)
* FEATURE: allow wizard checkbox field to be disabled

* Changes per review feedback
2022-08-15 05:52:07 +05:30
Jarek Radosz
0be67cb513
DEV: Fix random test ordering (#17905)
And don't reorder failed tests when providing a seed - that was making failure debugging more difficult.
2022-08-15 02:04:44 +02:00
Jarek Radosz
f25e779226
DEV: Prefer kvs over raw localStorage (#17907) 2022-08-14 17:31:49 +02:00
Jarek Radosz
92035cdc62
DEV: Change test localStorage prefix (#17906)
…to something more easily recognizable and less collision-prone
2022-08-14 17:31:37 +02:00
Andrei Prigorshnev
fdfac8c720
UX: improve styles of the user status message component (#17904) 2022-08-14 18:55:54 +04:00
Jarek Radosz
4f7c29845d
UX: Remove extraneous margins in profile pic modal (#17896)
(notice horizontal margins around "Gravatar")
2022-08-13 17:52:16 +02:00
Joffrey JAFFEUX
ccd76ec48d
FIX: markdown-it parse fn requires an env arg with {} as default (#17900)
See https://markdown-it.github.io/markdown-it/#MarkdownIt.parse for more details
2022-08-13 15:56:41 +02:00
Joffrey JAFFEUX
7476c22324
DEV: implements parseAsync in discourse/lib/text (#17899)
`parseAsync` allows to parse a block of markdown into tokens.

Usage:

```javascript
import { parseAsync } from "discourse/lib/text";

// ...

await parseAsync("**test**").then((tokens) => {
 console.log(tokens);
})
```
2022-08-13 14:25:32 +02:00
Joffrey JAFFEUX
3dac4fe075
A11Y: ensures featured topic btn is focused when modal closes (#17898) 2022-08-13 14:21:58 +02:00
Isaac Janzen
5e521b6c0d
DEV: Add before-composer-fields plugin outlet (#17891)
Add ability to insert content before composer-fields
2022-08-12 15:37:41 -05:00
Joffrey JAFFEUX
bcb89beb99
A11Y: makes toolbar tabindex independent from its context (#17889)
Prior to this fix, if `<DEditor />` was used in a context where quote would not be the first button, then no  button would be focusable.
2022-08-12 15:24:20 -04:00
Joffrey JAFFEUX
494cc2c69d
A11Y: moves anchor rendering out of conditional to prevent losing focus (#17887) 2022-08-12 15:20:18 -04:00
Rafael dos Santos Silva
5afdf24292
FEATURE: PWA users are prompted for push before first post (#17888) 2022-08-12 15:30:28 -03:00
David Taylor
636be8cac5
DEV: Remove discourse/components/glimmer superclass (#17877)
This was a temporary solution while we updated the resolver and migrated all our singletons to true ember services. Now that's done, we can switch to use `@glimmer/component` directly, and explicitly inject services as required.
2022-08-12 17:05:51 +01:00
Penar Musaraj
2c5ab47204
FIX: Regression with Categories nav item (#17885) 2022-08-12 11:30:39 -04:00
Osama Sayegh
69664d2153
DEV: Make group message summary notification Link to the group inbox (#17884)
This fix is for the experimental user menu.
2022-08-12 15:15:43 +03:00
Osama Sayegh
b5a6015155
DEV: Fallback to bookmarkable_url if bookmark reminder notification has no topic info (#17883)
This fix is for the experimental user menu. Some `bookmark_reminder` notifications may not be associated with a topic/post (e.g. bookmark reminder for a chat message) in which case the default notification renderer cannot figure out the `href` for those `bookmark_reminder` notifications. This commit teaches the `bookmark_reminder` notification type renderer to fallback to `bookmarkable_url` that's present in the notification data if the default notification renderer doesn't return a `href` for the notification.
2022-08-12 14:40:44 +03:00
Alan Guo Xiang Tan
b653b86806
DEV: Remove undefined in Sidebar::SectionLink class attribute (#17881) 2022-08-12 12:12:39 +08:00
Alan Guo Xiang Tan
68cefc9f9d
DEV: Remove flaky sidebar acceptance test. (#17882)
At a certain point, the cost of debugging a flaky acceptance test is
just too high for what we're testing for here. I've decided to just
accept the risk of a minor UX feature.

Follow-up to 55fa94f759
2022-08-12 12:12:19 +08:00
Alan Guo Xiang Tan
3deabb00d4
DEV: Route PM only tags to PM tags show route (#17870)
Previously, PM only tags were being routed to the public topic list with
the tag added as a filter. However, the public topic list does not fetch
PMs and hence PM only tags did not provide any value when added to the
Sidebar. This commit changes that by allowing the client to
differentiate PM only tag and thus routes the link to the PM tags show
route.

Counts for PM only tags section links are not supported as of this
commit and will be added in a follow up commit.
2022-08-12 11:26:56 +08:00
David Taylor
e4fbb3be21
DEV: Update composer-fullscreen-prompt to template-only component (#17871)
1. Replace `{{did-insert` with the builtin `{{on` modifier
2. Move the i18n call into the template

With both of those changes, there is no logic left in the backing class, so we can switch to `templateOnly()` which is significantly faster. (granted, not a big deal for a component like this, but it makes for a good demonstration)
2022-08-12 10:43:38 +08:00
David Taylor
06030743e8
DEV: Update sidebar components to use @glimmer/component (#17875)
Now that all of our singletons have been converted to true Ember Services, we can remove our custom `discourse/component/glimmer` superclass and use explicit injection

This also updates `section-message` to be a templateOnly glimmer component rather than a classic component.
2022-08-12 07:07:57 +08:00
David Taylor
cef264ab1f
DEV: Update welcome-topic-banner to use @glimmer/component (#17876)
Now that all of our singletons have been converted to true Ember Services, we can remove our custom `discourse/component/glimmer` superclass and use explicit injection
2022-08-11 18:47:15 +01:00
Vinoth Kannan
fe436523a5
FIX: don't preview color scheme if it's not current user's profile. (#17855) 2022-08-11 19:47:49 +05:30
Joe
c85921a548
FEATURE: Adds full screen composer submit button and prompt (#17839)
Context: https://meta.discourse.org/t/still-display-the-reply-create-topic-button-when-using-full-screen-composition/123597/6?u=johani

Right now, we don't show the submit buttons when you enter the full-screen composer. The reasons for that are described in the context link above.

This PR adds the improvements highlighted here: https://meta.discourse.org/t/still-display-the-reply-create-topic-button-when-using-full-screen-composition/123597/12?u=johani

Here's a list of the changes this PR introduces:

1. When you enter full-screen mode, we will now add a prompt that matches the browser fullscreen <kbd>F11</kbd> function. It looks like so

    <img width="500" src="https://user-images.githubusercontent.com/33972521/183529813-71a20167-a661-466c-b9ef-c4d34e231000.png">
    
    The prompt fades away after a couple of seconds.
    
2. This PR adds the submit buttons to the full-screen composer mode. The submit buttons should work like normal if the post has no errors. If the post has errors (title too short, body too short, required categories/tags), then the button will make the composer exit the full-screen mode so that users will see the errors and fix them. The error logic is based on what we currently have; this PR doesn't add any new validation. Here's a video of what that looks like:

    https://meta.discourse.org/t/-/127948/14?u=johani
2022-08-11 14:38:56 +08:00
David Taylor
5ee2741a4c
DEV: Update user-menu components to use @glimmer/component (#17869)
Now that all of our singletons have been converted to true Ember Services, we can remove our custom `discourse/component/glimmer` superclass and use explicit injection
2022-08-11 07:56:52 +03:00
Kris
3764ebf963
minor padding update for revamped user-menu (#17864) 2022-08-10 12:17:31 -04:00
Andrei Prigorshnev
e87ca397be
FEATURE: show status in search results when mentioning user in composers (#17811) 2022-08-10 19:49:26 +04:00
Alan Guo Xiang Tan
55fa94f759
DEV: Attempt to fix flaky sidebar test (#17852)
Makes displaying and hiding the list more deterministic.

```
Error: QUnit Test Failure: Exam Partition 1 - Acceptance: Sidebar - Community Section: clicking on more... link
not ok 491 Firefox 91.0 - [722 ms] - Exam Partition 1 - Acceptance: Sidebar - Community Section: clicking on more... link
    ---
        actual: >
            true
        expected: >
            false
        stack: >
            @http://localhost:7357/assets/core-tests.js:9826:14

        message: >
            additional section links are hidden
        negative: >
            false
        browser log: |
```
2022-08-10 21:22:55 +08:00
Alan Guo Xiang Tan
5283088269
DEV: site-settings:main -> service:site-settings (#17854) 2022-08-10 21:08:25 +08:00
Bianca Nenciu
e029a9b36c
FEATURE: Allow private themes to be partially installed (#17644)
A public key must be added to GitHub when installing private themes.
When the process happens asynchronously (for example if the admin does
not have admin permissions to the GitHub repository), installing
private themes becomes very difficult.

In this case, the Discourse admin can partially install the theme by
letting Discourse save the private key, create a placeholder theme and
give the admin a public key to be used as a deploy key. After the key
is installed, the admin can finish theme installation by pressing a
button on the theme page.
2022-08-10 13:30:18 +03:00
Osama Sayegh
590a13377b
DEV: Fix the build (#17853)
473695ee4d and 23520b88c2 were merged very close to each other, but they had some subtle conflicting changes that broke some tests.
2022-08-10 10:10:34 +03:00
Osama Sayegh
473695ee4d
DEV: Add messages tab to the new user menu (#17850)
Some of the changes in this PR are extracted from https://github.com/discourse/discourse/pull/17379.

Similar to the bookmarks tab in the new user menu, the messages tab also displays a mix of notifications and messages. When there are unread message notifications, the tab displays all of these notifications at the top and fills the remaining space in the menu with a list of the user's messages. The bubble/badge count on the messages tab indicates how many unread message notifications there are.
2022-08-10 08:25:39 +03:00
Alan Guo Xiang Tan
23520b88c2
DEV: Add registerUserMenuTab plugin API (#17851)
Co-authored-by: OsamaSayegh <asooomaasoooma90@gmail.com>
2022-08-10 13:21:37 +08:00
Kris
424e968538
UX: add left sidebar toggle when sidebar enabled (#17831) 2022-08-10 10:12:35 +08:00
Arpit Jalan
10a1b6b0a9
FEATURE: update bootstrap mode notice to add invite and wizard links (#17822)
* FEATURE: update bootstrap mode notice to add invite and wizard links

* Updates per feedback on PR

* Fix the wizard link not showing

* Remove unneeded function

* Remove router service injection
2022-08-10 00:13:42 +05:30
Arpit Jalan
d57bea4de3
FEATURE: add welcome topic cta banner (#17821) 2022-08-09 21:52:39 +05:30
David Taylor
7f9c2c0bfb
DEV: Remove vendored babel and update config for plugins/themes (#17832)
The new plugin list is based on the ones currently used in our ember-cli pipeline, and are based on our official browser support policy.

This commit includes an update to the raw-handlebars compiler to remove the 'very hacky but lets us use ES6' code. It's  served us well for the last 6 years, but the babel config changes broke it (`const` -> `let`). This commit takes the opportunity to refactor it to take a similar approach to PrettyText, by leaning on `mini-loader.js`.
2022-08-09 11:53:24 +01:00
Jarek Radosz
9645cbea26
DEV: Clear extra header buttons (#17829) 2022-08-08 19:57:56 +02:00
Sérgio Saquetim
e0f469eab8
FEATURE: Add above-modal-header plugin outlet (#17812) 2022-08-08 14:40:35 -03:00
Jarek Radosz
f7e7f9a6a7
DEV: Fix a function name typo (#17828)
Co-authored-by: Osama Sayegh <asooomaasoooma90@gmail.com>
2022-08-08 18:50:39 +02:00
Jarek Radosz
8b8cbe7905
DEV: Set owner of sidebar section objects (#17827)
Allows e.g. `@service` usage in their implementation
2022-08-08 16:35:14 +02:00
Osama Sayegh
4fdb275683
DEV: Add bookmarks tab to the new user menu (#17814)
Some of the changes in this commit are extracted from https://github.com/discourse/discourse/pull/17379.

The bookmarks tab in the new user menu is different from the other tabs in that it can display a mixture of notifications and bookmarks. When there are unread bookmark reminder notifications, the tab displays all of these notifications at the top and fills the remaining space in the menu with the rest of the bookmarks. The bubble/badge count on the bookmarks tab indicates how many unread bookmark reminder notifications there are.

On the technical aspect, since this commit introduces a new `bookmark-item` component, we've done some refactoring so that all 3 "item" components (`notification-item`, `reviewable-item` and the new `bookmark-item`) inherit from a base component and get identical HTML structure so they all look consistent.

Internal tickets: t70584 and t65045.
2022-08-08 17:24:04 +03:00
Andrei Prigorshnev
94ac8611f4
FEATURE: show status on post streams (#17813) 2022-08-08 17:35:26 +04:00
Jarek Radosz
e6fa05f8c3
DEV: Asyncify findTopicList() (#17816) 2022-08-08 11:46:09 +02:00
Joffrey JAFFEUX
2003c2d4cd
FIX: prevents android keyboard to be hidden instantly on sk focus (#17810) 2022-08-05 13:09:38 -04:00
Andrei Prigorshnev
8f66d57b86
UX: Improve empty state copy on the activity/topics page (#17746) 2022-08-05 18:37:06 +04:00
Andrei Prigorshnev
4283cef2ed
DEV: add status to the user info component (#17809)
We use the user-info component in several places, and we want to show status on some of them. If you want status to appear, do this:

{{user-info showStatus=true}}
2022-08-05 16:54:54 +04:00
Andrei Prigorshnev
9f5ba2db90
DEV: Make it possible to hide tooltip on the user status (#17808)
Sometimes status appears on popovers, and we may not want to show a tooltip in that case. But by default, tooltip is enabled.
2022-08-05 16:53:28 +04:00
Loïc Guitaut
5c37a5d0f2
FIX: Allow to add the same watched word with a different case (#17799)
Currently we can’t add a case-sensitive watched word if another one
exists with a different case. For example, the existing watched word
`Meta` has been created and is case-sensitive. Now an admin tries to add
`metA` while marking it as case-sensitive too, this won’t work and the
word won’t be added.

This patch changes this behavior by allowing to add same words that have
different cases, so the example above will now work as expected.

We still check for uniqueness but case-sensitivy is now taken
into account. It means that if the watched word `meta` already exists
and is not case-sensitive then it will not be possible to add `Meta`
(case-sensitive or not) as `meta` already matches every possible
variations of this word.
2022-08-05 12:18:17 +02:00
Osama Sayegh
0df1c4eab2
DEV: Refactor notification/reviewable items rendering in the new user menu (#17792)
Prior to this commit, we had a default Glimmer component that was responsible for handling generic rendering of notifications in the user menu, and many notification types had a custom Glimmer component that inherited from the default component to customize how they were rendered. That implementation was less than ideal because it meant plugins would have to create Glimmer components to customize notification types added by them and that would make the surface area of the API too big.

This commit changes the implementation so there's only one Glimmer component for rendering notifications, and then notification types that need to be customized can create a regular JavaScript class - `renderDirector` in the code - that provides the Glimmer component with the content it should display. We also introduce an API for plugins to register a renderer for a notification type or override an existing one.

Some of the changes are partially extracted from https://github.com/discourse/discourse/pull/17379.
2022-08-05 07:55:00 +03:00
David Taylor
c1cdb6bc51
DEV: Replace topic-tracking-state:main with service:topic-tracking-state (#17802)
This will allow consumers to inject it using `topicTrackingState: service()` in preparation for the removal of implicit injections in Ember 4.0. `topic-tracking-state:main` is still available and will print a deprecation notice.

Ideally we would convert topic-tracking-state into a true service, rather than registering a model instance into the registry. However, inter-dependencies between service injections make this very difficult to achieve. We don't want to block Glimmer Component work, so this commit does the minimum for now.
2022-08-05 08:48:55 +08:00
Peter Wagenet
d0cbc61619
DEV: Add jsconfig (#17800)
This enables intelligent IDE features like "Go To Reference" to function correctly within the Discourse core codebase
2022-08-04 22:50:47 +01:00
Ghassan Maslamani
2d6bd30dd8
FEATURE: add image delete button in preview. (#17624)
This commit adds a delete button to the composer preview next to the image scale buttons.

Reference: https://meta.discourse.org/t/image-remover-button-to-composer-preview/233005
2022-08-04 16:33:23 -04:00
jbrw
46f43d4f7c
UX: Display gap between tag sort options on PMs (#17342)
Adjust whitespace on tag sorting options so that the two links are rendered with a gap between them.
2022-08-04 11:45:54 -04:00
Alan Guo Xiang Tan
ad18f7488c
FIX: Secondary more section links not marked as active (#17797)
When the route of the link is equal to the active route, we promote it
out of the "more..." links drawer and display it directly under the
community section. This commit fixes a bug where the secondary links in
the "more..." links drawer was not being marked as active.

Follow-up to e09fd7cde2
2022-08-04 18:51:32 +08:00
Alan Guo Xiang Tan
02987e05d5
DEV: Support old hamburger menu custom footer links in Sidebar (#17796)
This commit extends the existing API bridge for supporting custom
general links in the old hamburger menu in Sidebar to support custom
footer links. Custom footer links can be added to the old hamburger
menu via the `api.decorateWidget("hamburger-menu:footerLinks")` API.
Footer links are added into the secondary section of the "More..." links
drawer in the Community section of the sidebar.
2022-08-04 15:05:14 +08:00
Alan Guo Xiang Tan
a36584b8c8
Add support for toggling between mobile and desktop view on sidebar (#17794)
In the current hamburger menu dropdown, we have a link which allows users to toggle between mobile and desktop view on mobile and touch devices. This commit brings the same behaviour to sidebar.
2022-08-04 14:26:35 +08:00
Alan Guo Xiang Tan
e09fd7cde2
UX: Move About and FAQ links into secondary section in More... dropdown (#17793)
This commit does not change any behaviour of the links and is simply
changing the positions of the links being displayed.
2022-08-04 13:41:08 +08:00
Kris
fc421ca41e
UX: update register admin wizard page styles (#17785) 2022-08-03 21:49:21 -04:00
Kris
8177f45369
UX: fix chat lock icon position and background (#17791) 2022-08-03 21:49:08 -04:00
Jean
8ab6b17c36
FIX: show update banner only once on categories with subcategory lists (#17782)
* FIX: show update banner only once on categories with subcategory lists
2022-08-03 15:27:03 -04:00
Kris
afa7c1ed9b
UX: account for iPad hub nav when calculating top (#17780) 2022-08-03 12:00:36 -04:00
Osama Sayegh
3d7829c01f
FIX: Unsubscribe from the /reviewable_counts channel when leaving the review-index route (#17778)
Follow-up to ce9eec8606.

When the review-index route is entered, we listen to the `/reviewable_counts` (or `/reviewable_counts/<user_id>` when the new user menu is enabled) channel so we can listen for changes to reviewables and update the UI accordingly. However, we currently don't unsubscribe when leaving the route which means each time the route is entered, we setup a new listener causing the browser to do unnecessary work and potentially state leakage.
2022-08-03 17:16:02 +03:00
David Taylor
0e6f9ef406
DEV: Replace site:main with service:site (#17766)
This will allow consumers to inject it using `site: service()` in preparation for the removal of implicit injections in Ember 4.0. `site:main` is still available and will print a deprecation notice.
2022-08-03 14:38:35 +01:00
Osama Sayegh
062a5f316d
DEV: Wire up the dimiss button in the new notifications menu (#17745)
This commit is a subset of the changes proposed in https://github.com/discourse/discourse/pull/17379.
2022-08-03 15:32:35 +03:00
Peter Wagenet
40cb46631f
DEV: Update /admin/badges to modern Ember patterns (#17672)
* Nest admin badges controller and route files

* Use standard file names for admin-badges

* Update resolver to allow standardized file structure for admin

* Add adminBadges.index controller for property tracking

* Modernize admin badges controller

* Modernize admin-badges route

* Add admin-badges index route

* Modernize admin-badges.show controller and route

* Modernize admin-badges.award controller and route

* Convert BadgeButton to a Glimmer component
2022-08-03 10:12:17 +01:00
David Taylor
36446649ff
DEV: Clear custom sidebar sections after each test (#17775)
Initializers are re-run before each test, so we need to clear out the list to avoid duplicates building up over multiple tests.
2022-08-03 09:42:29 +01:00
Alan Guo Xiang Tan
d1d760ae7b
UX: Move links in Sidebar footer under community section (#17774)
Now that we have a "more..." links drawer, we can move some of the links
in footer into the links drawer. The footer itself does not have much
horizontal or vertical space for us to work with and hence limits the
amount of links which we can add to it.
2022-08-03 14:47:03 +08:00
Osama Sayegh
53dd9b0c66
DEV: Add aria-label option to the d-icon helper (#17741)
Extracted from https://github.com/discourse/discourse/pull/17379.
2022-08-03 09:33:50 +03:00
Osama Sayegh
ce9eec8606
DEV: Combine all header notification bubbles into one in the new user menu (#17718)
Extracted from https://github.com/discourse/discourse/pull/17379.
2022-08-03 08:57:59 +03:00
Alan Guo Xiang Tan
bd92df6bbe
FIX: Links incorrectly marked as active in Sidebar::MoreSectionLinks (#17771)
Before this commit, links with routes that require multiple models were
incorrectly displayed as the active link in the
Sidebar::MoreSectionLinks component because we were only checking if the
routeName was active.
2022-08-03 12:39:21 +08:00
Jeff Wong
d4dda2c93a REFACTOR: Update fastly URLs in tests to generic example URLs 2022-08-02 14:32:08 -10:00
Jeff Wong
8d525b4188 REFACTOR: update search fixture urls 2022-08-02 14:32:08 -10:00
David Taylor
be55367d6f
DEV: Replace session:main with service:session (#17765)
This will allow consumers to inject it using `session: service()` in preparation for the removal of implicit injections in Ember 4.0. `session:main` is still available and will print a deprecation notice.
2022-08-02 23:55:20 +01:00
David Taylor
89518f3155
DEV: Modernize store and messageBus injections in Glimmer base class (#17763)
These were overlooked when `store` and `messageBus` were converted to true services
2022-08-02 23:22:52 +01:00
Martin Brennan
d2ddb140dd
FEATURE: Show SMTP response on admin email sent list and rearrange columns (#17143)
Follow up to 4d3c1ceb44, this commit
shows the SMTP response in the admin email sent list and also moves the
topic/post link into a new column. Reply key is now in its own column.
2022-08-03 08:11:54 +10:00
Sérgio Saquetim
b16028bc79
FIX: Inject appEvents in ScreenTrack (#17751)
This commit reverts partially https://github.com/discourse/discourse/pull/17543.

Service appEvents was not being injected in ScreenTrack. This causes
`this.appEvents.trigger("topic:timings-sent", data);` to fail and the error is
swallowed by the `catch` on the promise.

This caused a regression on plugins that rely on this event to implement other
behaviors.
2022-08-02 16:22:17 -03:00
David Taylor
4c2f08b6e2 DEV: Replace current-user:main with service:current-user
This will allow consumers to inject it using `currentUser: service()` in preparation for the removal of implicit injections in Ember 4.0. `current-user:main` is still available and will print a deprecation notice.
2022-08-02 20:16:11 +01:00
David Taylor
2463a8d568 DEV: Improve injectServiceIntoService function
Previously we were preventing circular dependencies by looking up the service before adding it as an injection for future-initialized services. This works, but it means that the order of service injection is important, and we cannot have two services auto-injected into each other.

This commit takes a different approach. It removes the `lookup`, and instead adds a dummy injection which prevents the service being injected into itself during initialization. This allows us to have circular auto-imports, without breaking the injection resolver by injecting a service into itself.
2022-08-02 20:16:11 +01:00
Meghna
5ac4e82540
UX: add ellipsis for long category names in category chooser dropdown (#17758) 2022-08-02 21:57:47 +05:30
David Taylor
58defe7169
DEV: Move all resolver deprecations into resolver.js (#17757)
Having them all in one place is much easier to reason with. It also means we can handle them without needing 'fake' registrations (which can sometimes cause odd behavior). This commit just moves the deprecation logic - it does not introduce any new deprecations.
2022-08-02 17:05:02 +01:00
David Taylor
4bf9b73296
DEV: Ensure censorFn copes with null regexpList (#17754)
This fixes the test suite failures introduced by 862007fb18
2022-08-02 11:09:51 +01:00
Arpit Jalan
d3e8442937
DEV: add test for wizard last step and some minor optimizations (#17752) 2022-08-02 14:13:25 +05:30
Selase Krakani
862007fb18
FEATURE: Add support for case-sensitive Watched Words (#17445)
* FEATURE: Add case-sensitivity flag to watched_words

Currently, all watched words are matched case-insensitively. This flag
allows a watched word to be flagged for case-sensitive matching.
To allow allow for backwards compatibility the flag is set to false by
default.

* FEATURE: Support case-sensitive creation of Watched Words via API

Extend admin creation and upload of Watched Words to support case
sensitive flag. This lays the ground work for supporting
case-insensitive matching of Watched Words.

Support for an extra column has also been introduced for the Watched
Words upload CSV file. The new column structure is as follows:

 word,replacement,case_sentive

* FEATURE: Enable case-sensitive matching of Watched Words

WordWatcher's word_matcher_regexp now returns a list of regular
expressions instead of one case-insensitive regular expression.

With the ability to flag a Watched Word as case-sensitive, an action
can have words of both sensitivities.This makes the use of the global
Regexp::IGNORECASE flag added to all words problematic.

To get around platform limitations around the use of subexpression level
switches/flags, a list of regular expressions is returned instead, one for each
case sensitivity.

Word matching has also been updated to use this list of regular expressions
instead of one.

* FEATURE: Use case-sensitive regular expressions for Watched Words

Update Watched Words regular expressions matching and processing to handle
the extra metadata which comes along with the introduction of
case-sensitive Watched Words.

This allows case-sensitive Watched Words to matched as such.

* DEV: Simplify type casting of case-sensitive flag from uploads

Use builtin semantics instead of a custom method for converting
string case flags in uploaded Watched Words to boolean.

* UX: Add case-sensitivity details to Admin Watched Words UI

Update Watched Word form to include a toggle for case-sensitivity.
This also adds support for, case-sensitive testing and matching of  Watched Word
in the admin UI.

* DEV: Code improvements from review feedback

 - Extract watched word regex creation out to a utility function
 - Make JS array presence check more explicit and readable

* DEV: Extract Watched Word regex creation to utility function

Clean-up work from review feedback. Reduce code duplication.

* DEV: Rename word_matcher_regexp to word_matcher_regexp_list

Since a list is returned now instead of a single regular expression,
change `word_matcher_regexp` to `word_matcher_regexp_list` to better communicate
this change.

* DEV:  Incorporate WordWatcher updates from upstream

Resolve conflicts and ensure apply_to_text does not remove non-word characters in matches
that aren't at the beginning of the line.
2022-08-02 10:06:03 +02:00
Alan Guo Xiang Tan
df264e49a9
DEV: Supports href attribute for hamburger links API bridge to sidebar (#17750)
In the old `decorateWidget("hamburger-menu:generalLinks", callbackFn)`
API, the return value of the callback function can either return a
`route` or `href`. The API bridge added in
de54bdd73d supported `route` but not `href` and
hence the need for this commit.
2022-08-02 15:30:13 +08:00
Pixlz
b9c1e63bd1
UX: Change unrelated icon in the CTA Signup prompt (#17732) 2022-08-02 13:27:18 +08:00
David Taylor
5d6694ac4f
DEV: Remove duplicate getter from category-section-link (#17705) 2022-08-02 13:26:36 +08:00
Alan Guo Xiang Tan
f204538f7c
UX: Remove count from more section links (#17747)
Less is more...
2022-08-02 11:20:55 +08:00
Kris
8df2756bba
DEV: set CSS custom property for footer-nav-height (#17744) 2022-08-01 18:01:06 -04:00
Arpit Jalan
cfd0a04965
FIX: wizard last step "corporate" was not saving changes (#17739) 2022-08-01 14:49:09 +05:30
Joffrey JAFFEUX
6ce75d3824
DEV: dom clean should be cancelled on aborted transition (#17736) 2022-08-01 10:56:41 +02:00
Alan Guo Xiang Tan
de54bdd73d
DEV: Add API bridge for custom hamburger menu links to sidebar (#17742)
The old hamburger menu widget was customizable via the
`api.decorateWidget("hamburger-menu:generalLinks")` plugin API. As the
hamburger menu is going to be replaced by the sidebar dropdown, we need
a way to smoothly transit plugins and theme components to the new
sidebar. This commit makes a best effort attempt to bridge
`api.decorateWidget` with `api.addCommunitySectionLink`. If an error is
encountered, a deprecation notice is logged.
2022-08-01 16:45:09 +08:00
David Taylor
9534f13256
DEV: Replace site-settings:main with service:site-settings (#17734)
This will allow consumers to inject it using `siteSettings: service()` in preparation for the removal of implicit injections in Ember 4.0. `site-settings:main` is still available and will print a deprecation notice.
2022-08-01 09:43:33 +01:00
Alan Guo Xiang Tan
ad6b5825bf
DEV: addTopicsSectionLink -> addCommunitySectionLink plugin api (#17740) 2022-08-01 15:19:52 +08:00
Krzysztof Kotlarek
af912b4b0e
DEV: Experimental scroll sidebar to specific element event handler (#17727) 2022-08-01 12:39:00 +08:00
Kris
2743339a7e
UX: adjust sidebar margin to avoid composer height (#17731) 2022-08-01 11:02:11 +08:00
Pixlz
e58c25939c
UX: Fix extra spacing for group metadata in user profile (#17725) 2022-07-29 13:47:14 -04:00
Meghna
b5ea6e746c
UX: updated account activation page design (#17730) 2022-07-29 22:33:11 +05:30
Kris
c97bfa1c44
UX: Add the TOS disclaimer to the invite signup (#17717) 2022-07-29 12:04:36 -04:00
Angus McLeod
867929d843
DEV: Add topic title suffix outlet (#17647) 2022-07-29 11:07:28 -04:00
Alan Guo Xiang Tan
c9a3aba5a2
DEV: Use toggle event for sidebar more-section-links component (#17729)
A click event is trigger on a link click as well which is not what we
want. This caused the links to trigger a full reload instead of an Ember
transition for some reason.
2022-07-29 13:09:32 +08:00
Alan Guo Xiang Tan
a6e815f243
UX: Only set user bookmarks loading state when loading (#17728)
Follow-up to 6bb77d3055
2022-07-29 13:11:01 +10:00
Martin Brennan
6bb77d3055
FIX: Show bookmarks loading spinner correctly (#17726)
There was a minor issue where the bookmark loading
spinner would not show correctly because of how
the route was handling the setting of loading,
this fixes the issue.
2022-07-29 12:31:53 +10:00
Jarek Radosz
6849775a2d
Revert "DEV: Minor topic-tracking-state refactor (#17707)" (#17724)
This reverts commit 8d613e0b85.
2022-07-29 09:36:14 +10:00
David Taylor
497d9849d3
FIX: Ensure all public topic-query options can be used via Ember (#17706) 2022-07-29 09:03:53 +10:00
Jarek Radosz
8d613e0b85
DEV: Minor topic-tracking-state refactor (#17707)
* Use `Set` instead of `Array` for `this.newIncoming`
* Remove `isUnseen()`
* Use array spread instead of `Array.from()`
* Don't use `@on()`
* Fix typos
* Make sure `this.incomingCount` is always a Number
2022-07-28 23:46:30 +02:00
Kris
a737195687
UX: sidebar appearance shouldn't shrink fonts (#17714) 2022-07-28 14:18:27 -04:00
Andrei Prigorshnev
2cb97d8de4
FEATURE: show user status on the user profile page (#17712) 2022-07-28 21:12:48 +04:00
Kris
391c687afb
UX: sidebar focus styles, remove hover for touch (#17713) 2022-07-28 13:04:00 -04:00
Andrei Prigorshnev
023835cdad
DEV: a new d-tooltip component (#17513) 2022-07-28 18:33:20 +04:00
Kris
a23e934730
FIX: show button bar overflow on iPad & mobile (#17708) 2022-07-28 09:26:06 -04:00
Alan Guo Xiang Tan
9efeaf2ae3
UX: Reduce number of links displayed in Community by default (#17703)
Additional links are hidden by default and can be accessed via the
"more..." link.
2022-07-28 16:46:46 +08:00
Osama Sayegh
988a175e94
DEV: Add reviewables tab to the new user menu (#17630)
This commit is a subset of the changes proposed in https://github.com/discourse/discourse/pull/17379.
2022-07-28 11:16:33 +03:00
David Taylor
d3751c70c9
FIX: Ensure error handlers render correctly without preload_json (#17696)
Some errors (e.g. InvalidAccess) are rendered with `include_ember: true`. Booting the ember app requires that the 'preload' data is rendered in the HTML.

If a particular route was configured to `skip_before_action :preload_json`, and then went on to raise an InvalidAccess error, then we'd attempt to render the Ember app without the preload json. This led to a blank screen and a client-side error.

This commit ensures that error pages will fallback to the no_ember view if there is no preload data. It also adds a sanity check in `discourse-bootstrap` so that it's easier for us to identify similar errors in future.
2022-07-27 22:29:13 +01:00
Jarek Radosz
7980c41832
DEV: Fix fake-timer issues (#17681)
Occasionally some code (e.g. live-reload) would try to clear a timer that was set up before fake timers were installed. That would lead to issues and warnings. Enabling `shouldClearNativeTimers` option fixes it.
2022-07-27 22:54:22 +02:00
chapoi
47e664e3b1
UX: copy change (#17690) 2022-07-27 18:55:24 +02:00
David Taylor
96abd72387
DEV: Replace message-bus:main with service:message-bus (#17691)
This will allow consumers to inject it using `messageBus: service()` in preparation for the removal of implicit injections in Ember 4.0. `message-bus:main` is still available and will print a deprecation notice.

The MessageBus library is not en ember object, and doesn't need access to any of our injections. Therefore, we can set up a simple class which defines itself as a 'Service Factory', and returns the MessageBus library in the `create` method.
2022-07-27 17:15:58 +01:00
David Taylor
a00b5a6aca
DEV: Convert pm-topic-tracking-state to Ember Service (#17688)
This will allow consumers to inject it using `pmTopicTrackingState: service()` in preparation for the removal of implicit injections in Ember 4.0. `pm-topic-tracking-state:main` is still available and will print a deprecation notice.
2022-07-27 13:00:43 +01:00
David Taylor
51957c07f1
DEV: Convert key-value-store:main to service:key-value-store (#17676)
This will allow consumers to inject it using `keyValueStore: service()` in preparation for the removal of implicit injections in Ember 4.0. `key-value-store:main` is still available and will print a deprecation notice.

To make this conversion possible, we have to bypass the `app.inject` logic which blocks injecting services into services. This is not ideal, but there is no other way for us to do this in a way that is backwards-compatible, and will still print a useful deprecation message when we eventually turn on the implicit-injections deprecation notice.
2022-07-27 11:38:33 +01:00
Joffrey JAFFEUX
9a55c9c433
DEV: fully rely on resize observer for resizing (#17685)
Not only is the current code not needed but it's also creating invalid values on safari if the header goes out of viewport with negative values.

This commit also adds a missing test for `--header-offset` property.
2022-07-27 11:32:42 +02:00
Krzysztof Kotlarek
fd6fabc83c
DEV: remove sidebar outlet (#17683)
That outlet was a temporary solution and is not used anymore
2022-07-27 16:42:34 +08:00
Alan Guo Xiang Tan
c787254427
DEV: Remove code that is no longer used (#17684) 2022-07-27 16:42:16 +08:00
Alan Guo Xiang Tan
3682513475
FIX: Sidebar is always disabled on wizard route (#17682) 2022-07-27 15:17:20 +08:00
Alan Guo Xiang Tan
3bd5f2d411
DEV: Introduce SiteSetting to enable/disable Sidebar. (#17662)
This commit removes the ability to enable/disable the Sidebar on a per
user basis and introduces a site wide setting. For testing purposes, sidebar can be enabled/disabled via the `enable_sidebar=1` or `enable_sidebar=0` query param.
2022-07-27 13:42:26 +08:00
Alan Guo Xiang Tan
41aa7fa4ef
DEV: Fix mini profiler queries bg covering results (#17679) 2022-07-27 11:41:13 +08:00