Commit Graph

18855 Commits

Author SHA1 Message Date
Andrei Prigorshnev
7f112ffd4e
FIX: When a user status update received other users statuses were getting cleared (#17520) 2022-07-19 21:18:51 +04:00
Jarek Radosz
326643d08a
FIX: isExistingIconId() regressed in #17553 (#17570)
I missed a single `?` character 😔
2022-07-19 15:32:26 +02:00
Jarek Radosz
06135f3069
DEV: De-jQ click-track (#17539) 2022-07-19 13:45:20 +02:00
Jarek Radosz
0948a59c3f
DEV: Update all uppy deps (#17542) 2022-07-19 13:05:07 +02:00
Jarek Radosz
59a07e3007
FIX: Correctly invoke dynamic components by name (#17568) 2022-07-19 11:52:32 +02:00
David Taylor
897de60330 DEV: Set owner for raw views
Plugins/themes use injections in their raw view class. On recent versions of Ember these were failing with 'Attempting to lookup an injected property on an object without a container, ensure that the object was instantiated via a container.'
2022-07-19 10:00:59 +01:00
David Taylor
20fd81c2dc DEV: Silence 3.x deprecations
This prevents a storm of deprecation messages in the developer console. We'll be working through and enabling these one-by-one over the coming weeks/months.

A dummy `discourse-ensure-deprecation-order` package is introduced to ensure that deprecation-workflow is loaded before `@ember/jquery`. This ensures that the `@ember/jquery`-triggered deprecation warnings can be silenced correctly

This also introduces a system for silencing CLI warnings.
2022-07-19 10:00:59 +01:00
Peter Wagenet
0ac90abcfa DEV: Remove rfc176-shims
Ember has now migrated to the new module layout, so these shims are no longer required
2022-07-19 10:00:59 +01:00
David Taylor
13bc2f1f39 DEV: Upgrade to Ember 3.28 2022-07-19 10:00:59 +01:00
Alan Guo Xiang Tan
086fb6d6cf
DEV: Refactor sidebar components to prepare for integration into hamburger dropdown (#17566) 2022-07-19 14:37:07 +08:00
Martin Brennan
a1a960caba
DEV: Add empty array to ignored_users for currentUser fixture (#17564) 2022-07-19 15:27:07 +10:00
Osama Sayegh
fac04f3e73
DEV: Introduce a basic version of the new notifications menu behind a feature flag (#17492) 2022-07-19 10:35:02 +08:00
Jarek Radosz
9028df0fda
DEV: Use includes() instead of indexOf() >= 0 (#17553)
Missed those cases in #17541
2022-07-19 10:27:40 +08:00
Jarek Radosz
0db6ae1e1f
DEV: Fix typos and other spell-checker warnings (#17554) 2022-07-19 10:27:10 +08:00
Kris
d8714facb6
FIX: can't hide overflow of d-editor-button-bar on mobile (#17563) 2022-07-18 20:43:05 -04:00
Andrei Prigorshnev
48e2caf7b7
DEV: emoji helper: add the ability to set custom title (#17517) 2022-07-18 21:51:19 +04:00
Kris
80bda4a9db
FIX: use padding, not margin (#17559) 2022-07-18 13:30:44 -04:00
Kris
e57485370f
UX: plus icon for sidebar messages section header (#17558) 2022-07-18 12:54:23 -04:00
Bianca Nenciu
9e603e9374
COPY: Change "old" to "unsupported" browser (#17555)
The word choice was inaccurate because new browsers may still not work
well with Discourse because not all required browser features are
present.
2022-07-18 19:32:04 +03:00
Kris
719efc46a9
UX: prevent sidebar count from wrapping (#17557) 2022-07-18 12:11:40 -04:00
Joffrey JAFFEUX
c94a011d9f
FIX: prevents multi-select to use noneItem for its list (#17523) 2022-07-18 11:26:12 +02:00
David Taylor
fab1c00c8f
DEV: Drop the deprecated themeSettings.blah syntax (#17394)
This syntax has been printing deprecation messages since 880311dd4d
2022-07-18 10:10:23 +01:00
Joffrey JAFFEUX
ab05d931a0
DEV: updates popper to 2.11.5 (#17522)
This commit also removes a modifier used in select-kit which was causing issues with this update and doesn’t appear to be needed anymore.
2022-07-18 11:06:19 +02:00
Alan Guo Xiang Tan
cd82e10d87
FIX: Restrict sidebar specific select kit CSS to sidebar (#17552)
Follow-up to 0d72a8c458
2022-07-18 16:17:03 +08:00
Krzysztof Kotlarek
7230b0d436
FIX: pass custom section willDestroy (#17551)
Custom sections `willDestroy` function has to be passed to SidebarSection component  to call when component is removed.
2022-07-18 15:46:49 +10:00
Alan Guo Xiang Tan
fe6ec28228
DEV: Custom section in Sidebar should implement own willDestory hook (#17550)
No need for us to specify our custom teardown hook when Sidebar
component is destroyed when each custom section link is expected to be
its own component and can implement its own `willDestory` hook.
2022-07-18 12:57:14 +08:00
Alan Guo Xiang Tan
0d72a8c458
FEATURE: API for sidebar (#17296)
This plugin API can be used to add to sections and links to sidebar
2022-07-18 14:03:37 +10:00
Alan Guo Xiang Tan
54e63b3d31
Revert "UX: Remove experimental sidebar notification text (#17290)" (#17548)
This reverts commit 4df683f88d.

We've decided to bring back the words for counts in the experimental sidebar.
2022-07-18 10:34:22 +08:00
Jarek Radosz
a0a0f6f37c
DEV: Run screen-track run in a runloop, drop jQ (#17545) 2022-07-18 00:27:29 +02:00
Jarek Radosz
070b1cbed6
DEV: Don't double inject in screen-track (#17543)
1. Injecting `appEvents` service into `screen-track` was unnecessary as it's already injected into all services (and was causing an assertion error)
2. Return a promise from `sendNextConsolidatedTiming()` (no need for `await settled()` then)
2022-07-17 23:44:20 +02:00
Jarek Radosz
1ccabe62d6
DEV: Move emoji-store test to the correct dir (#17544) 2022-07-17 23:44:10 +02:00
Jarek Radosz
057d6b406d
DEV: Extensively use includes() (#17541)
Also, the change in insert-hyperlink (from `this.linkUrl.indexOf("http") === -1` to `!this.linkUrl.startsWith("http")`) was intentional fix: we don't want to prevent users from looking up topics with http in their titles.
2022-07-17 20:48:36 +02:00
Jarek Radosz
5f7163b5bb
DEV: Extensively use startsWith() (#17540) 2022-07-17 20:16:39 +02:00
Jarek Radosz
6a4a7b1d88
UX: Prevent long toolbars from resizing the column (#17538) 2022-07-17 20:16:11 +02:00
Jarek Radosz
1c8d461ecc
DEV: Remove unnecessary visit() calls (#17536) 2022-07-17 20:15:44 +02:00
Jarek Radosz
c3f7a45821
DEV: Use key names in triggerKeyEvent (#17535) 2022-07-17 20:15:28 +02:00
Jarek Radosz
5538b8442e
DEV: Introduce discourseLater (#17532)
A wrapper for `later()` from `@ember/runloop`, similar to `discourseDebounce`. It automatically reduces the delay in testing environment.
2022-07-17 00:50:49 +02:00
Jarek Radosz
5707431981
DEV: Don't await for updateCurrentUser (#17534)
It doesn't return Promises.
2022-07-17 00:21:12 +02:00
Jarek Radosz
39c35ee47d
DEV: Clear tagsHtmlCallbacks after each test (#17530)
Fixes leakage between tests
2022-07-16 23:24:13 +02:00
Jarek Radosz
343b8dd7aa
DEV: One more de-jQueryfied test (#17528)
Forgot to save this file when doing #17474 😅
2022-07-16 22:57:43 +02:00
Jarek Radosz
facca3f46c
DEV: We already restore sinon after each test (#17529) 2022-07-16 22:57:33 +02:00
Jarek Radosz
751a5e1430
DEV: Clear clearToolbarCallbacks after each test (#17531)
Fixes leakage between tests. Have a composer toolbar with a 100 "Add emoji" buttons? I gotchu.
2022-07-16 22:57:08 +02:00
Jarek Radosz
1b4dea75ee
DEV: Also reset horizontal scroll after each test (#17527)
🤞 maybe this will cover the remaining out-of-viewport flakes
2022-07-16 22:56:19 +02:00
Joffrey JAFFEUX
0760b249ff
DEV: introduces {{concat-class}} helper (#17526)
Usage:

```
<button class={{concat-class "foo" this.bar (if true "baz")}} />
```
2022-07-16 14:09:54 +02:00
Jarek Radosz
be6736c940
UX: Make space for scrollbar in mini-profiler (#17524) 2022-07-16 10:12:44 +02:00
Kris
9909d001c5
UX: increase text size for mobile exp sidebar (#17521) 2022-07-15 17:44:44 -04:00
chapoi
ddd9d9b620
UX: remove .btn-default from admin btn (#17515) 2022-07-15 22:09:48 +02:00
Kris
e293afad4c
UX: Prevent pre tag from making posts too wide (#17518) 2022-07-15 15:51:22 -04:00
Jarek Radosz
7cf95e6339
DEV: Check if screen-track was destroyed (#17509)
This error is swallowed by `.catch()` but it's an error nonetheless.
2022-07-15 13:35:31 +02:00
Alan Guo Xiang Tan
8ddca5998c
DEV: Fix state leak in QUnit acceptance tests (#17507)
Follow-up to 0525455ef6
2022-07-15 16:51:15 +10:00
Alan Guo Xiang Tan
0525455ef6
FIX: Unread count badge shown for topics that user is not tracking (#17506)
When navigating to a topic and directly back to a topic list,
an unread count may be shown for the topic even if the user is
not tracking it.
2022-07-15 12:48:51 +08:00
Martin Brennan
098ab29d41
FEATURE: Add plugin API to register About stat group (#17442)
This commit introduces a new plugin API to register
a group of stats that will be included in about.json
and also conditionally in the site about UI at /about.

The usage is like this:

```ruby
register_about_stat_group("chat_messages", show_in_ui: true) do
  {
    last_day: 1,
    "7_days" => 10,
    "30_days" => 100,
    count: 1000,
    previous_30_days: 120
  }
end
```

In reality the stats will be generated any way the implementer
chooses within the plugin. The `last_day`, `7_days`, `30_days,` and `count`
keys must be present but apart from that additional stats may be added.
Only those core 4 stat keys will be shown in the UI, but everything will be shown
in about.json.

The stat group name is used to prefix the stats in about.json like so:

```json
"chat_messages_last_day": 2322,
"chat_messages_7_days": 2322,
"chat_messages_30_days": 2322,
"chat_messages_count": 2322,
```

The `show_in_ui` option (default false) is used to determine whether the
group of stats is shown on the site About page in the Site Statistics
table. Some stats may be needed purely for reporting purposes and thus
do not need to be shown in the UI to admins/users. An extension to the Site
serializer, `displayed_about_plugin_stat_groups`, has been added so this
can be inspected on the client-side.
2022-07-15 13:16:00 +10:00
Osama Sayegh
3690953a3f
DEV: Assign Mini Profiler badge a z-index below the notifications menu (#17496)
Follow-up to https://github.com/discourse/discourse/pull/17468.

The notifications menu has a z-index at the header level, so the badge should be below that.

72889573e6/app/assets/stylesheets/common/base/menu-panel.scss (L26)
2022-07-14 20:14:38 +03:00
Meghna
72889573e6
UX: better account-created page (#17452)
UX: minor styling updates to accept invite pages
2022-07-14 20:43:00 +05:30
David Taylor
d52d479bd4
DEV: Remove 'legacy ember' logic from discourse-root component (#17494)
This logic should no longer be triggered. The EMBER_GLIMMER_SET_COMPONENT_TEMPLATE gets removed in recent versions of Ember, which can cause it to accidently trigger and cause layout issues with some plugins/themes.
2022-07-14 12:17:01 +01:00
Jarek Radosz
4b935b61eb
FIX: CSS tweak and production position fix for miniprofiler (#17493)
* DEV: Format miniprofiler html
* FIX: Move miniprofiler to the right in production
* UX: Fix and merge miniprofiler css
2022-07-14 13:03:43 +02:00
Alan Guo Xiang Tan
737c0a7b9f
DEV: Allow sidebar section caret title to be translated (#17491) 2022-07-14 15:27:01 +08:00
Alan Guo Xiang Tan
92e1e43104
FIX: Improve reliability of topic tracking state (#17387)
The `unread_not_too_old` attribute is a little odd because there should never be a case where
the user's first_unread_at column is less than the `Topic#updated_at`
column of an unread topic. The `unread_not_too_old` attribute is causing
a bug where topic states synced into `TopicTrackingState` do not appear
as unread because the attribute does not exsist on a normal `Topic`
object and hence never set.
2022-07-14 13:44:58 +08:00
Jarek Radosz
ad2c0aaee3
DEV: Fix submit-on-enter and de-jQ two components (#17484) 2022-07-14 08:59:33 +08:00
Jarek Radosz
3ada82f713
DEV: Use native element.closest() (#17482) 2022-07-14 08:57:24 +08:00
Jarek Radosz
abe9b41ddf
DEV: Fix various typos (#17485) 2022-07-14 08:56:25 +08:00
Jarek Radosz
7b6cd44c32
DEV: Remove most of jQuery usage from tests (#17474) 2022-07-13 19:29:19 +02:00
Kris
806e0f2885
FIX: adjust topic avatar height to fix stickiness (#17476) 2022-07-13 10:00:59 -04:00
Andrei Prigorshnev
43c0bbb6a4
FEATURE: show status in the tooltip on the status bubble on the user menu (#17451) 2022-07-13 16:02:59 +04:00
Jarek Radosz
e4f042f9de
DEV: Drop the server var in setup-tests (#17458) 2022-07-13 14:00:19 +02:00
Jarek Radosz
605aafec30
DEV: Speed up composer autocomplete tests (#17461)
It was pausing for 1s after each keyup event.
2022-07-13 13:47:45 +02:00
Andrei Prigorshnev
075d6b83f4
DEV: add emoji handlebars helper (#17449) 2022-07-13 14:54:47 +04:00
Jarek Radosz
f48a1ec648
DEV: De-jQuerify safari-hacks (#17456) 2022-07-13 12:33:39 +02:00
Jarek Radosz
32c4603dd5
DEV: Remove 6-yrs old deprecated loadScript opt (#17463) 2022-07-13 12:32:35 +02:00
Jarek Radosz
b530781d71
DEV: Remove no-op autocomplete disabler (#17460)
It was done before the autocomplete initializer, so had no effect.
2022-07-13 11:03:15 +02:00
Jarek Radosz
4751ddedfb
DEV: Don't flush twice (#17462)
#save-water

`flushMap` is already called in `QUnit.testDone()`
2022-07-13 11:01:41 +02:00
Jarek Radosz
22b6d1b668
DEV: Remove old pretender paths (#17464) 2022-07-13 11:01:20 +02:00
Joffrey JAFFEUX
83b91e9992
DEV: discourse-root should be targetable (#17459)
We can't remove it for now as themes rely on it, so we should at least be able to target it in the DOM
2022-07-13 08:31:52 +02:00
Alan Guo Xiang Tan
b4b87454f2
DEV: Move mini profiler badge to the right (#17468)
In the era where we have left aligned sidebar, the mini profiler badge
gets in the way
2022-07-13 13:40:12 +08:00
Joe
3a3628e9b0
UX: Fixes navigation 1px jitter (#17467)
Context: https://meta.discourse.org/t/pixel-jump-whenever-page-refreshes-mobile-desktop/231053

We currently add 1 extra pixel when we try to restore the last scroll position on a few routes. 

This is causing a bit of jumpiness, as described in the linked topic above. 

<img height="300" src="ae9e69f7fd.gif">

Notice how the content shifts by 1px while stuff loads.

I believe this 1px that we add is an artifact from the days when we used to set the header to `fixed` but I'm not sure. Either way, the header now uses `position: sticky;` so we shouldn't need that 1px adjustment.

This PR introduced no visual changes except that it fixes the jitter mentioned above.
2022-07-13 13:39:30 +08:00
Joe
8a3c02c985
FIX: Mobile usability issues in crawler view (#17465)
Google is complaining about some mobile crawler layout issues. If a post has tables, they extend outside the viewport.

<img height="300" src="https://user-images.githubusercontent.com/33972521/178642976-3d1761ad-d8cb-4c69-92b5-7be799873d5c.png">

This PR fixes that. We constrain the post to the viewport width (already determined from a parent element) and make it possible to scroll instead. 

There is no visual change here, it should act the same as it does today, but it makes Google happy.

This PR also adds a bit of margin to tags in the `/tags` page in the crawler view because Google was complaining about `Clickable elements too close together`

<img height="300" src="https://user-images.githubusercontent.com/33972521/178644327-cc3ff795-24f1-4fef-95c9-e4358a5b37bc.png">
2022-07-13 11:59:16 +08:00
Joffrey JAFFEUX
638bbf8f7e
DEV: prevents prop override and simplifies test (#17457) 2022-07-13 00:20:48 +02:00
Joffrey JAFFEUX
a939609d32
FIX: fixes few regressions in select-kit (#17453)
- following c3fd91670e `paste` has been typoed into `pase`
- adds two tests for pasting in `multi-select` and `email-group-user-chooser`
- selectKitOptions would not be following the right overriding order
- `category-selector` was using `selectKitOptions` directly which shouldn't be the case as it's not using computed values
- apparently since a recent ember upgrade, paste event is not providing `originalEvent` anymore and `clipboardData` should be retrieved directly on the event
2022-07-12 21:38:17 +02:00
tshenry
2e7e48d982
UX: Add classes to create-account modal for easier customization (#17435)
Adds BEM-style classes to the input-group elements, and a dynamic class to the create-account-form element that reflects which auth provider is being used (if any).
2022-07-12 10:29:02 -07:00
David Taylor
be29197f62
DEV: Stop overriding an injected property in topic controller test (#17450)
Similar to e15c6302, overriding an auto-injected value like this triggers errors in more recent versions of Ember. Instead, we can use the registry to inject the value we need.

Co-authored-by: Peter Wagenet <peter.wagenet@gmail.com>
2022-07-12 17:29:11 +01:00
Jarek Radosz
0e61f332ee
DEV: Make sure testing-container fits in the viewport (#17446)
This prevents tests failures when the browser viewport is too small.
2022-07-12 15:32:43 +02:00
Jarek Radosz
0f3109cc53
Revert "DEV: Update @popperjs/core (#17437)" (#17448)
This reverts commit 76bb8f8926.

There is a dropdown positioning regression that needs to be investigated.
2022-07-12 15:27:52 +02:00
Jarek Radosz
76bb8f8926
DEV: Update @popperjs/core (#17437) 2022-07-12 13:16:00 +02:00
Jarek Radosz
8a0bddd98d
DEV: Remove an unused js helpers file (#17439) 2022-07-12 12:23:21 +02:00
Jarek Radosz
8bc0ec3fac
DEV: Simplify test setup (#17441) 2022-07-12 12:16:17 +02:00
David Taylor
8a68f49adb
FIX: Detect firefox < 89 as an unsupported browser (#17443)
Prior to v89, Firefox has bugs with document.execCommand("insertText"): https://bugzil.la/1220696

This commit introduces some variables to browser-detect, and therefore wraps the entire logic in an IIFE to avoid state leaking. (`let`/`const` are not supported on older browsers)
2022-07-12 10:50:06 +01:00
Jarek Radosz
6c3e262a7c
FIX: Set resolver options on the legacy resolver (#17440) 2022-07-12 11:42:19 +02:00
David Taylor
e15c63027f
DEV: Use auto-injected keyValueStore for screenTrack (#17434)
This manual assignment was added before the keyValueStore was refactored into a service. Now that it's a service, it gets all our standard auto-injections, including the keyValueStore.

Overwriting an automatic injection like this raises an error in future Ember versions.
2022-07-11 22:12:25 +01:00
Jarek Radosz
365f558bda
DEV: Update ember-resolver (#17432) 2022-07-11 22:52:01 +02:00
David Taylor
9e9e843136
DEV: Allow use of qunit notrycatch mode (#17433)
This is useful when debugging exceptions - when the box is checked, exceptions will be thrown and handled by the browser rather than being absorbed by qunit. This allows developers to intercept the exception and inspect the stack.
2022-07-11 21:40:38 +01:00
Jarek Radosz
006de01943
DEV: Update ember-cli-handlebars (#17429) 2022-07-11 22:25:40 +02:00
Chapoi
d90cdba70f
Revert "UX: missing specificity (#17324)" (#17426)
This reverts commit 4730858598.
2022-07-11 20:20:40 +02:00
Kris
6b57d792bb
UX: Fix exp sidebar toggle alignment, add hovers (#17414) 2022-07-11 12:58:48 -04:00
David Taylor
dd62b88f78
DEV: Switch from htmlbars-inline-precompile to ember-cli-htmlbars (#17424)
See https://github.com/ember-cli/ember-cli-htmlbars#tagged-template-usage--migrating-from-htmlbars-inline-precompile
2022-07-11 15:25:40 +01:00
Joffrey JAFFEUX
f00cf7a119
DEV: uses resize observer to compute header-offset (#17399) 2022-07-11 14:50:52 +02:00
Jarek Radosz
6487179dec
DEV: Don't forward test-i18n.js requests (#17422)
This fixes i18n related tests in dev env
2022-07-11 13:14:44 +02:00
Jarek Radosz
2414a175cf
DEV: Update message-bus-client (#17421)
This update covers commits:

* e309b6d [BREAKING Make JS client throw if lastId not number](e309b6d533)
* f0bae69 [DEV: removes dead code](f0bae695b0)
* a72b930 [FIX: force a poll more consistently when visibility changes](a72b9308b4)
* 5c01715 [Permit CORS preflight caching](5c01715432)
* 1789784 [DEV: lint files](17897843b4)
* b9cfb90 [FIX: do not leak visibility event subscriptions on stop/start](b9cfb90dd6)
2022-07-11 13:09:30 +02:00
Jarek Radosz
4437579a8c
DEV: Update ember-qunit (#17251) 2022-07-11 12:40:48 +02:00
Jarek Radosz
189bebb2e4
DEV: Modernize component tests (#17368)
* Use QUnit `module` instead of `discourseModule`
* Use QUnit `test` instead of `componentTest`
* Use angle-bracket syntax
* Remove jQuery usage
* Improve assertions (and actually fix some of them)
2022-07-11 12:29:44 +02:00
Jarek Radosz
5b70b67e78
FIX: Just inline the QUnit CSS in theme-test html (#17415)
Side-steps sassc compilation issues.
2022-07-11 12:01:47 +02:00
David Taylor
0ffa93ccaf
FIX: Ensure category-tag filter routes are functioning (#17420)
This regressed as part of the changes in fc36ac6c.

This commit also introduces a test which would have caught the issue.
2022-07-11 10:54:51 +01:00
Jarek Radosz
3b4ed134ba
DEV: Remove old hbs-in-script warning (#17418)
7 years, I think that's long enough for people to notice? 😉
2022-07-11 11:42:40 +02:00
David Taylor
e62730a4c8
FIX: Ensure splash screen <noscript> is loaded for legacy browsers (#17413)
Previously we would only expand the main `<noscript>` element for older browsers. This commit ensures that we expand all noscript elements on the page, including the one used by the splashscreen to hide itself on the no-js view.
2022-07-11 09:07:10 +01:00
Jarek Radosz
a94dee31c4
DEV: Fix emoji-uploader tests (#17395) 2022-07-11 02:06:58 +02:00
Jarek Radosz
25dacc08ce
DEV: Update @ember/test-helpers (#17247) 2022-07-11 01:54:25 +02:00
Jarek Radosz
e5346ed84a
Revert "DEV: Don't vendor old qunit css (#17410)" (#17417)
This reverts commit cf85ccca7d.
2022-07-11 09:16:00 +10:00
Jarek Radosz
cf85ccca7d
DEV: Don't vendor old qunit css (#17410) 2022-07-10 14:57:22 +02:00
Jarek Radosz
0d6929d935
DEV: Avoid triggering 404 errors in tests (#17404) 2022-07-10 11:09:13 +02:00
Jarek Radosz
f19f804525
DEV: Don't try to vibrate in test mode (#17405)
It ends up just triggering an error:

```
[Intervention] Blocked call to navigator.vibrate because user hasn't tapped on the frame or any embedded frame yet: https://www.chromestatus.com/feature/5644273861001216.
```
2022-07-10 10:53:00 +02:00
Jarek Radosz
9365d4e86a
DEV: Fix test leakage/flakes (#17407)
Fixes failures like:

```
Unhandled request in test environment: /forum/topics/timings (POST)
```
2022-07-10 10:52:42 +02:00
Jarek Radosz
d5dc2496d4
DEV: Update qunit (#17411) 2022-07-10 10:52:14 +02:00
Jarek Radosz
0f01cc7df2
DEV: Reduce jQuery usage in acceptance tests (#17406) 2022-07-10 10:52:02 +02:00
Joe
06ae9229e8
UX: Skip length check on reply drafts (#17408)
We don't count quote characters as part of the reply length.

We don't save drafts if the reply length is less than the min_post_length site setting.

If you start a reply that only contains a bunch of quotes with the intent to continue later, you get no draft.

This PR fixes that.

Note that we still don't save drafts if the composer is completely empty or if you're composing a new topic. This only affects replies.

This PR only changes the behavior if the reply composer contains something regardless of whether that something is a quote or not and ignores the min_post_length site setting.
2022-07-10 13:54:40 +08:00
Daniel Waterworth
e91cc340e6
FIX: Add ember redirect for tags/:tag_id -> tag/:tag_id (#17397)
/tags/:tag_id is deprecated, but links may exist in posts.
2022-07-08 14:39:43 -05:00
Kris
5a26c87fa6
UX: less janky animation for experimental sidebar (#17396) 2022-07-08 14:06:01 -04:00
Kris
4c1b8e736d
UX: add border-box to stop padding from overflow (#17391) 2022-07-08 10:31:28 -04:00
Joffrey JAFFEUX
9408ea4461
Revert "DEV: glimmerify discourse-root (#17390)" (#17392)
This reverts commit 27408c7e14.
2022-07-08 15:28:40 +02:00
Joffrey JAFFEUX
27408c7e14
DEV: glimmerify discourse-root (#17390)
As a result discourse-root will be tag-less
2022-07-08 13:55:34 +02:00
Jarek Radosz
20851f7240
FIX: Inputs using focusout regressed in #17345 (#17389) 2022-07-08 13:00:33 +02:00
David Taylor
a084680f1d
DEV: Pass static scripts through Ember CLI (#17373)
All files under `app/assets/javascripts/scripts` will be run through babel, given sourcemaps, and output under `/assets/{name}.js`. This is another step towards removing our sprockets dependence.
2022-07-08 10:13:46 +01:00
Chapoi
9dab97de70
UX: a save should always have a cancel action (#17385) 2022-07-08 10:02:16 +02:00
Alan Guo Xiang Tan
b622302351
Revert "UX: Hide user menu bookmark link when experimental sidebar is enabled (#17336)" (#17386)
This reverts commit 526e6e7a3b.

Link in dropdown user menu is kept in favor of link in experimental sidebar
2022-07-08 15:44:49 +08:00
Jarek Radosz
94c70a0909
DEV: Silence one more test (#17375)
…and improve silencing added in #17362
2022-07-08 09:15:09 +08:00
Jarek Radosz
215926f295
DEV: Don't use the deprecated route (#17376) 2022-07-08 09:13:43 +08:00
David Taylor
201228162c
DEV: Remove temporary GlimmerComponent hack (#17370)
fc36ac6c updated us to a more modern resolver, so this hack is no longer required
2022-07-07 15:08:46 +01:00
Andrei Prigorshnev
ef923f1bb1
FEATURE: Publish everyone's status to everyone (#17343) 2022-07-07 17:37:05 +04:00
Kris
7d3b22135c
UX: don't animate experimental sidebar on reload (#17372) 2022-07-07 09:33:17 -04:00
David Taylor
d037796ff4
FIX: Allow connector template names to be camelCase (#17371)
The default Ember resolver implementation allows this for components. We need the same for connectors (which are essentially components behind-the-scenes)
2022-07-07 12:42:23 +01:00
David Taylor
5b0a8bfbcb
DEV: Make sass deprecations quieter during test build (#17369) 2022-07-07 11:03:16 +01:00
Jarek Radosz
39c28cec87
DEV: Allow hooks.beforeEach usage w/ component tests (#17360) 2022-07-07 09:57:38 +02:00
Krzysztof Kotlarek
95c257e2ea
FEATURE: plugin outlet for sidebar (#17367) 2022-07-07 15:05:20 +08:00
Jarek Radosz
c32ac45b29
DEV: Reduce test noise (#17362) 2022-07-07 13:28:40 +08:00
Kris
fbc89dd41a
UX: improve experimental sidebar transitions (#17358) 2022-07-06 13:31:06 -04:00
Chapoi
63562e8b14
UX: switch highlight/select colours in select-kit (#17356) 2022-07-06 16:49:36 +02:00
David Taylor
fc36ac6cde
DEV: Modernize Ember Resolver (#17353)
This switches us to use the modern ember resolver package, and re-implements a number of our custom resolution rules within it. The legacy resolver remains for now, and is used as a fallback if the modern resolver is unable to resolve a package. When this happens, a warning will be printed to the console.

Co-authored-by: Peter Wagenet <peter.wagenet@gmail.com>
2022-07-06 14:20:00 +01:00
Isaac Janzen
5c4c8d26c7
DEV: Update expand-table table query (#17347)
Instead of selecting the first table in the parent, we now select the first table after the selected <kbd>expand table</kbd> button
2022-07-06 08:01:46 -05:00
David Taylor
fb31ae04a7
FIX: Ensure there is no limit on tag list settings (#17355)
`maximum=null` is not a supported configuration option. Instead, we need to pass the `@unlimitedTagCount` attribute
2022-07-06 12:23:23 +01:00
Jarek Radosz
c3fd91670e
DEV: Update linting setup and fix issues (#17345)
Re-lands #16119 and #17298

* Update eslint-config-discourse
* Update linting workflow
* Prettier-ignore stuff
* Update template-lint config
* Auto-fix template issues
* Fix various template issues
  Mostly incorrect attributes and unused templates
* Prettier js files
* Fix template auto-fix regressions
* Small css tweak

Co-authored-by: Peter Wagenet <peter.wagenet@gmail.com>
2022-07-06 10:37:54 +02:00
Jarek Radosz
f7c133ac74
DEV: Update sass (#17349) 2022-07-06 10:35:55 +02:00
David Taylor
6c49ec39ea
DEV: Disable RAISE_ON_DEPRECATION (#17351)
Some plugins/themes are still awaiting updates for some deprecations, and they started raising errors in development. It's not clear that the errors are development-only, so it can be quite confusing for developers.

Disabling this flag for now until we can make the messages clearer and fix up existing deprecation issues in themes/plugins.
2022-07-06 11:56:16 +08:00
Kris
59c8774957
UX: Prevent experimental sidebar scroll jumps (#17352) 2022-07-06 10:36:44 +08:00
Kris
7711d140da
UX: staff notice should utilize full post width (#17346) 2022-07-05 15:49:47 -04:00
Peter Wagenet
371bbadb92
No implicit this codemod (#17235)
* Run no-implicit-this codemod for app templates
* Run tagless-ember-components-codemod for plugins
* Turn on no-implicit-this lint
2022-07-05 19:41:31 +02:00
Rafael dos Santos Silva
9833b59b70
FEATURE: Allow iframe allow attribute in posts (#17291)
This is used so iframes can use mic, camera, EME, etc.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Feature-Policy#directives
lists current possible values

Feature request https://meta.discourse.org/t/iframe-attributes-not-working/127383?u=falco
2022-07-05 12:25:27 -03:00
Andrei Prigorshnev
c59f1729a6
FEATURE: auto remove user status after predefined period (#17236) 2022-07-05 19:12:22 +04:00
David Taylor
2a7fb4bf3a
FIX: Correct error in ip-lookup component definition (#17339)
7caaee2 introduced a duplicate definition of the component JS. This likely happened because we had the template defined under `javascripts/discourse`, and the component JS defined under `javascript/admin`. This commit removes the duplicate definition, and moves the template to the admin addon
2022-07-05 15:13:50 +01:00
Alan Guo Xiang Tan
526e6e7a3b
UX: Hide user menu bookmark link when experimental sidebar is enabled (#17336)
Sidebar has a link to bookmarks by default
2022-07-05 15:50:25 +08:00
Alan Guo Xiang Tan
843907d1ac
UX: Update categories/tags in sidebar only after saving. (#17333)
Adding the category/tag into sidebar before the user has saved was
giving the impression that the user's record has already been updated.
2022-07-05 13:32:12 +08:00
Alan Guo Xiang Tan
4d51f9cad6
UX: Enforce bullet category style in sidebar (#17334)
The other category styles do not fit into how we want the sidebar to
look.
2022-07-05 13:28:51 +08:00
Kris
56c0d8cf92
UX: mobile experimental sidebar improvement (#17302)
First pass at the mobile experimental sidebar improvement.

Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
2022-07-05 11:45:02 +08:00