Commit Graph

15260 Commits

Author SHA1 Message Date
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
David Taylor a4fc88ce68
FIX: Ensure emoji is inserted in the correct location (#17107)
In the specific case where you start typing an emoji, then open the full emoji picker, the chosen emoji would be inserted in the wrong place. This was an unintentional side effect of the changes in 75d9c16156

This commit updates the `emojiSelected` logic to avoid mutating the 'selected' object, and also adds a test for this specific behaviour.
2022-06-16 12:16:53 +01:00
Alan Guo Xiang Tan c625dc0adc
FEATURE: Add messages section links to experimental sidebar. (#17096) 2022-06-16 13:33:40 +08:00
Gerhard Schlager 888f50543d
DEV: Fix `javascript:update` rake task (#17098)
* The `javascript:update` rake task failed because recent versions of chart.js use a lowercase filename (`chart.min.js` instead of `Chart.min.js`)

* Changed `loadScript()` to use lowercase keys to lookup scripts

* `svg-arrow.css` seems to have changed slightly (linebreak at the end of file)
2022-06-15 19:49:04 +02:00
Isaac Janzen a7034c5a14
DEV: Update create-account test to be more clear (#17102) 2022-06-15 12:47:47 -05:00
Isaac Janzen bc0a37b642
DEV: @bind create-account actions (#17100)
DEV: @bind create-account actions

Context: https://github.com/discourse/discourse/pull/16983#discussion_r894721403
2022-06-15 12:36:04 -05:00
David Taylor 275849771f
DEV: Emit a 'change' event when PresenceChannel info changes (#17088)
e.g.

```
presenceChannel = this.presence.getChannel('/blah');
presenceChannel.subscribe();
presenceChannel.on('change', (channel) => console.log(channel.users));
```

This commit also does some refactoring to remove the use of an unnecessary EmberObject and dynamic `defineProperty` call
2022-06-15 16:13:44 +01:00
Krzysztof Kotlarek 63df2b4550
FIX: whisper available when reply to topic (#17054)
When a user is answering a whisper comment, they cannot change from whisper to regular answer.

However, user can click reply to topic. We keep `postSnapshot` so user can change mind and switch back to reply to post. In that case, a toggle whisper button should appear.

To make it happen, I am ensuring to display a toggle whisper button when user is replying to topic - `postLink` attribute is missing.
2022-06-15 09:59:57 +10:00
Jarek Radosz 39f45c701c
DEV: Mark inline styles as safe (#17093)
Fixes many Ember deprecation warnings like:

```
WARNING: Binding style attributes may introduce cross-site scripting vulnerabilities; please ensure that values being bound are properly escaped. For more information, including how to disable this warning, see https://emberjs.com/deprecations/v1.x/#toc_binding-style-attributes. Style affected: "border-color: #33B0B0; --category-color: #33B0B0;"
```
2022-06-15 01:31:21 +02:00
Jarek Radosz 348b6e848f
FIX: NavItem and Composer prop overriding was broken (#17092) 2022-06-14 21:16:33 +02:00
Alan Guo Xiang Tan 4a240f6c90
DEV: First pass at messages section experimental sidebar (#17084) 2022-06-14 15:56:20 +08:00
Alan Guo Xiang Tan e7e23e8d9c
FIX: Remove tags from experimental sidebar on notification level changed (#17083)
As part of this commit, a bug where updating a tag's notification level on the server side does not update the state of the user's tag notification levels on the client side is fixed too.
2022-06-14 15:39:56 +08:00
Jarek Radosz 77632d2d36
DEV: Explicitly allow NavItem customization (#17061)
Allow overriding NavItem's title and displayName. Fixes multiple instances of `computed-property.override` warnings in plugins.
2022-06-13 12:46:04 +02:00
Jarek Radosz 8d0c2cd4f8
DEV: Allow disabling composer submit (#17062)
…without overriding the computed property. Will fix warnings in discourse-perspective-api plugin.
2022-06-13 12:45:47 +02:00
Alan Guo Xiang Tan e9a77e7f19
FEATURE: Add new/unread counts to tags section links exp sidebar (#17057) 2022-06-13 14:54:01 +08:00
Alan Guo Xiang Tan 95fa4c5d52
DEV: Ensure topic-tracking-state state change callbacks are cleaned up (#17069) 2022-06-13 14:53:02 +08:00
Alan Guo Xiang Tan 94c3bbc2d1
DEV: Centralize user updates to a single MessageBus channel. (#17058)
Introduces an interface to publish user updates on the server side and
helps to reduce the growing number of subscriptions on the client side.
2022-06-13 14:27:43 +08:00
Jarek Radosz e245839c3c
DEV: Remove old deprecations (#14906) 2022-06-12 21:28:20 +02:00
Jeff Wong d7d9c10c1d FIX: display translated fallback as the group name for custom emoji groups 2022-06-10 11:10:05 -10:00
Jeff Wong 9a656e18e9 DEV: add translation fallback option for i18n
Allow for a default translation string to be returned when a translation cannot
be found.

Useful in contexts where there is a known fallback, such as custom emoji group
strings.
2022-06-10 11:10:05 -10:00
Alan Guo Xiang Tan ced9a5ee6d
FEATURE: First pass tags section for experimental sidebar. (#17048)
Counts for the section links will be added in a follow up commit.
2022-06-10 09:49:36 +08:00
David Taylor 75d9c16156
DEV: Remove jquery from textarea-manipulation, improve undo handling (#17050)
This commit removes many uses of `this._$textarea`, and also switches us to use `document.execCommand("insertText")` for the majority of manipulations. This means that the browser undo history will be preserved when doing things like pasting rich html, using bold/italic shortcuts, etc.

These manipulations are already extensively tested. This commit extends a few of the tests to verify the undo behavior.

There are still a few cases (e.g. replacing upload placeholders with true URLs) where we don't necessarily want to bring the composer into focus. In those cases, the old history-breaking behavior remains for now.
2022-06-10 10:42:50 +10:00
David Taylor c054a47d9a
DEV: Add escapeRegExp util (#17051)
This was re-implemented in a number of places - it makes more sense as a utility function.
2022-06-10 10:37:54 +10:00
Isaac Janzen 3ebfde5ea2
DEV: Remove jquery from create-account modal (#16983) 2022-06-09 14:59:33 -05:00
Isaac Janzen 9cd165d6b4
DEV: Add deprecation notice to discourse-common/utils/decorators (#17052) 2022-06-09 13:07:58 -05:00
Penar Musaraj 3f569f1185
A11Y: Add keyboard support for do-not-disturb modal (#17043) 2022-06-09 11:05:01 -04:00
Alan Guo Xiang Tan 946f8a65fd
FEATURE: Display new/unread count for tracked categories in exp sidebar (#17046) 2022-06-09 13:43:17 +08:00
Alan Guo Xiang Tan cd8c97debc
FEATURE: Add section links to categories section to exp sidebar (#17035)
This commit adds a section link to the categories section for each
category that is tracked by the user in the experimental sidebar.
2022-06-09 11:14:01 +08:00
Alan Guo Xiang Tan 03f674070a
DEV: Remove flaky acceptance test (#17045)
The test was un-skipped in 6f25f17360 but
has since been flaky again. Removing the test completely as it has
resulted in more pain for us than the value the test provides.
2022-06-09 09:56:05 +08:00
tshenry 7fc11327b7
COPY: Use main instead of master for theme installation modal (#17044)
GitHub now uses main as the default branch so it makes sense to update the placeholder in the theme installation modal to use main instead of master.
2022-06-08 11:32:54 -07:00
Penar Musaraj fd2dbdccdc
A11Y: Keyboard access for `/u` table headings (#17041) 2022-06-08 13:54:31 -04:00
Isaac Janzen de1153286d
DEV: Remove reply_as_new_topic from PM composer actions (#17023) 2022-06-07 11:06:42 -05:00
Penar Musaraj 86ab82f057
UX: Remove limit for emoji search in composer (#17014) 2022-06-07 12:00:52 -04:00
Alan Guo Xiang Tan 7da074d591
DEV: Implement "My Posts" section link for experimental sidebar (#17008) 2022-06-07 10:52:54 +08:00
Isaac Janzen 49415de3fa
DEV: Remove reply_as_private_message from composer (#16979)
* Remove 'New Message' option from composer dropdown
* Update Acceptance Tests
2022-06-06 15:10:34 -05:00
Jarek Radosz 79f5a7750c
DEV: Remove unused wizard code (#17016)
`theme-preview` component and `colorsId`/`fontId` usage.
2022-06-06 21:01:47 +02:00
Jarek Radosz 54e42b124a
FIX: Restore automatic style preview in wizard (#17015)
Updating the homepage/style preview regressed in #16994.
2022-06-06 21:01:34 +02:00
Joe 5109ea0cf1
UX: don't tether popper to the viewport if reference is out of the viewport (#17012)
followup to 

https://github.com/discourse/discourse/pull/16504

Internal

`/t/64811`

public

`/t/228953`
2022-06-06 22:20:29 +08:00
Penar Musaraj 370df7ccb4
DEV: Dejquerify marking FAQ as read (#17001) 2022-06-06 08:27:10 -04:00
Penar Musaraj 210d9c2b8f
DEV: De-jQuerify is-element-in-viewport (#17000) 2022-06-06 08:26:49 -04:00
Joffrey JAFFEUX 42683d4874
FIX: ensures composer is not pre-filled with none/all tags (#16998) 2022-06-05 16:58:38 +02:00
Jarek Radosz 8a58ce6578
DEV: Use `@action` decorator in wizard (#16996) 2022-06-04 19:19:49 +02:00
Jarek Radosz f4b9d4e285
FIX: Don't throw errors on wizard dropdowns (#16994) 2022-06-04 18:04:00 +02:00
Joffrey JAFFEUX 17227e9e53
DEV: under specific conditions (like tests) presenceState can be null (#16990) 2022-06-03 20:59:30 +02:00
Isaac Janzen f8d2da2fa0
DEV: Remove jquery from invite-panel (#16989) 2022-06-03 11:30:44 -05:00
Alan Guo Xiang Tan 3b3f60218e
DEV: Display new/unread count for tracked link in sidebar (#16957) 2022-06-03 15:48:35 +08:00
Martin Brennan f94682e2c4
FIX: Do not use SVGs for twitter:image metadata (#16973)
Twitter does not allow SVGs to be used for twitter:image
metadata (see https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/markup)
so we should fall back to the site logo if the image option
provided to `crawlable_meta_data` or SiteSetting.site_twitter_summary_large_image_url
is an SVG, and do not add the meta tag for twitter:image at all
if the site logo is an SVG.
2022-06-03 09:02:57 +10:00
Isaac Janzen f5e4df1b0e
DEV: Remove jquery from themes list (#16980) 2022-06-02 16:01:24 -05:00
Isaac Janzen 91f00ecf5a
DEV: Remove jquery from group list (#16981) 2022-06-02 16:01:07 -05:00
Vinoth Kannan 951b3016a4
FIX: keep composer draft when go back and forth between PM and New Topic. (#16978)
Previously, draft get destroyed accidentally when we switch to PM with the below steps
1. Click “New Topic”
2. Type in the body
3. Switch to “New Message”
4. Click “cancel”
2022-06-02 23:36:34 +05:30
Kris 8e75f8c371
DEV: quick-access-panel setting for viewAllLabel (#16977) 2022-06-02 10:13:41 -04:00
Andrei Prigorshnev 0bbbd8371e
DEV: emoji picker - make it possible to choose picker's placement and add a dedicated class for an anchor (#16969) 2022-06-01 22:24:23 +04:00
Kris e579e9e61c
DEV: add class name to nav-bar nav items (#16968) 2022-06-01 14:18:47 -04:00
Vinoth Kannan cd0f912159
FIX: Make f query param sticky when navigating between nav items (#16714)
Also, hides categories navigation link when f query param is present.
2022-06-01 16:13:15 +08:00
Alan Guo Xiang Tan 1e9f132b15
FIX: Topic list nav items count not respecting tracked filter. (#16935)
This commit seeks to only handle the `f=tracked` and `filter=tracked`
query params for a topic list. There are other "hidden" filters for a
topic list which can be activated by passing the right query param to
the request. However, they are hidden because there is no way to
activate those filters via the UI. We are handling the `f=tracked`
filter because we will soon be adding a link that allows a user to
quickly view their tracked topics.
2022-06-01 14:54:42 +08:00
Jean 098bea19de
FIX: change event target on select kit row (#16960) 2022-06-01 14:49:04 +08:00
Jarek Radosz 4f423fa548
PERF: Improve to-markdown speed, update the code (#16939)
## `to-markdown` function performance improvement

### Small example

```html
<span>test</span>
```

Before: 63 `Tag` objects created; 4,090 ops/sec ±2.77%
After: 1 `Tag` object created; 151,707 ops/sec ±2.64%

### Large example

```html
<div>
  <p>lorem <b>ipsum</b></p>
  <p>lorem <b>ipsum</b></p>
  <p>lorem <b>ipsum</b></p>
  <p>lorem <b>ipsum</b></p>
  <p>lorem <b>ipsum</b></p>

  <aside class="quote no-group">
    <blockquote>
      <aside class="quote no-group">
        <blockquote>
          <p dir="ltr">test</p>
        </blockquote>
      </aside>
      <p dir="ltr">test2</p>
    </blockquote>
  </aside>

  <div>
    <p><span>test</span> <span>test</span> <span>test</span></p>
    <p><span>test</span> <span>test</span> <span>test</span></p>
    <p><span>test</span> <span>test</span> <span>test</span></p>
    <p><span>test</span> <span>test</span> <span>test</span></p>
    <p><span>test</span> <span>test</span> <span>test</span></p>
  </div>
</div>
```

Before: 2394 `Tag` objects created; 179 ops/sec ±2.35%
After: 38 `Tag` objects created; 4,346 ops/sec ±2.62%

### Note

discourse-spoiler-alert ~~needs~~ (needed) to be updated as it modifies to-markdown code.

### Included commits

* DEV: Minor code transforms
* PERF: Don't create unnecessary Tag instances
* DEV: Remove a now obsolete constructor argument
* DEV: Rename constant
* DEV: Use built-in functions, string interpolation
* DEV: De-jQuerify
2022-05-31 13:17:08 +02:00
Jarek Radosz 711cd7c85d
DEV: Add to-markdown decorator functions (#16943)
To be used in discourse-spoiler-alert
2022-05-31 11:06:41 +02:00
Alan Guo Xiang Tan 30bd1dcefd
DEV: More efficiently trigger topic tracking state on state change (#16952)
* When loading topics in bulk, only trigger state change callbacks after
all the topics have been loaded and we determine that state has actually
changed.

* State change callbacks are also only triggered when state has changed.

The use of JSON.stringify might raise some performance concerns here as this is a
performance sensitive codepath. However, I measured the time for each
`_setState` function call locally, by wrapping the function call with
`performance.now()`, and did not see any significant overhead.
2022-05-31 10:20:55 +08:00
Andrei Prigorshnev c5c9b2eced
DEV: do not trigger the user-status:changed event twice (#16954) 2022-05-30 19:23:21 +04:00
Andrei Prigorshnev 943cae82da
FEATURE: propagate user status via message bus (#16944) 2022-05-30 13:41:53 +04:00
Andrei Prigorshnev 46302f0d40
DEV: Avoid unnecessary sendWidgetAction function call (#16941) 2022-05-30 13:06:51 +04:00
Martin Brennan 662c713347
FEATURE: Highlight None option by default for bookmarks (#16949)
Since the default for the bookmark modal is to have no
reminder if you create a bookmark by clicking out of
the modal or pressing the Save button, this commit highlights
None by default.

Also changes the bookmark component to not use @on for Ember
lifecycle, we don't use that style
2022-05-30 11:56:06 +10:00
Martin Brennan e8ca927b12
FIX: Add bookmark quick access tests and fix username (#16934)
The commit fcc2e7ebbf to promote
polymorphic bookmarks did not correctly set the username for
the quick access bookmark menu based on the new serializer
values, so the username is not being shown in the bookmark
quick access menu. This commit fixes it, and also adds additional
tests for that menu and updates the user fixtures to reflect
the current state of the bookmarks endpoint.
2022-05-30 10:00:05 +10:00
Jarek Radosz d065ec0f7b
FIX: Correctly handle nested quotes in to-markdown (#16938)
Given this html:

```
<aside class="quote no-group">
  <blockquote>
    <aside class="quote no-group">
      <blockquote>
        <p dir="ltr">test</p>
      </blockquote>
    </aside>
    <p dir="ltr">test2</p>
  </blockquote>
</aside>
```

The result was an invalid markdown:

```
[quote]
[quote]
> test
> [/quote]
>
>
>
> test2
[/quote]
```

Now the result is:

```
[quote]
[quote]
test
[/quote]

test2
[/quote]
```
2022-05-27 22:05:43 +02:00
Joffrey JAFFEUX 0c590963c3
FIX: changing date should recompute input (#16937)
This also fixes the time part being lost when changing the date.
2022-05-27 11:57:09 +02:00
David Taylor 80bd971420
UX: Show message if rebake fails (#16925)
Previously, errors would only be displayed in the developer console.
2022-05-27 10:39:29 +01:00
Andrei Prigorshnev 5c596273a0
FEATURE: user status (#16875) 2022-05-27 13:15:14 +04:00
Martin Brennan ac59168dde
FIX: Incorrect URL for bookmark quick action menu (#16932)
The bookmarkable_type instead of the bookmarkable_url
was being used for the link to the bookmark for the quick
access menu, leading to links like /ChatMessage. This
fixes the issue, follow up PR with tests for the quick
access menu to follow.
2022-05-27 14:33:24 +10:00
David Taylor b850c12793
PERF: Lazily lookup emoji-picker selected-diversity (#16917)
Looking up values from the `emojiStore` calls out to the browser's localStorage API and then decodes a JSON blob. This makes it relatively slow.

Previously we were doing this lookup in the emoji-picker's `init()` function, even if `isActive` was false. If many inactive emoji pickers are rendered simultaneously (e.g. for discourse-chat reactions), this performance hit quickly adds up.

This commit updates the service to notify about changes, and uses a computed property to provide a cached value in the emoji-picker.
2022-05-26 12:37:09 +01:00
Alan Guo Xiang Tan 037436047d
DEV: Allow a simplier way to register a link under sidebar topics section (#16916) 2022-05-26 09:01:37 +08:00
Alan Guo Xiang Tan f589d05cf9
DEV: Plugin API for plugins to add links to sidebar topics section (#16732) 2022-05-25 15:54:32 +08:00
Alan Guo Xiang Tan 072faa08bb DEV: Reenable wizard test after fixing auto start for wizard qunit tests
`run-qunit.js` does not expect QUnit tests to start automatically but
our wizard QUnit setup did not respect the `qunit_disable_auto_start`
URL param. Hence, tests would start running automatically and when a
subsequent `QUnit.start()` function call is made, we ended up getting a
`QUnit.start cannot be called inside a test context.` error.

This error can be consistently reproduced in the `discourse:discourse_test` container but not in
the local development environment. I do not know why and did not feel
like it is important at this point in time to know why.
2022-05-25 15:12:27 +08:00
Alan Guo Xiang Tan 0b8177de54
DEV: Remove unnecessary logic in TopicTrackingState on the client side (#16900)
There is no need for the extra protection on the client side if there is
a bug on the server side. In fact, we want the bug to be surfaced so
that it can be fixed on the server side.
2022-05-25 11:28:57 +08:00
Martin Brennan 0d16d77401
DEV: Allow for null bookmark in bookmark-icon (#16909)
Sometimes we need to render the icon as a call to action
to create a bookmark at which point the bookmark does
not yet exist, so we need to just show the normal bookmark
icon and a create title.

Also adds a CSS class for the bookmark existing and not existing
for styling.
2022-05-25 13:22:59 +10:00
Martin Brennan 583704f603
FIX: Improve bookmark-icon title (#16908)
This improves the bookmark-icon title to be more like the
post bookmark icons, to include the special formatted date
as well as the name of the bookmark.
2022-05-25 11:32:42 +10:00
Martin Brennan a5779a7d0b
DEV: Bookmark cleanup (#16899)
Gets rid of old bookmark app event and deletes anything
leftover from polymorphic bookmark changeover.
2022-05-24 13:52:42 +10:00
Martin Brennan a03ae9b323
DEV: Add bookmark-icon component (#16893)
This component will be useful for chat, and also moves
the definition of the icon for with and without reminders
to the bookmark model as consts, so they can easily be
referenced in other places.
2022-05-23 15:01:44 +10:00
Martin Brennan fcc2e7ebbf
FEATURE: Promote polymorphic bookmarks to default and migrate (#16729)
This commit migrates all bookmarks to be polymorphic (using the
bookmarkable_id and bookmarkable_type) columns. It also deletes
all the old code guarded behind the use_polymorphic_bookmarks setting
and changes that setting to true for all sites and by default for
the sake of plugins.

No data is deleted in the migrations, the old post_id and for_topic
columns for bookmarks will be dropped later on.
2022-05-23 10:07:15 +10:00
Johannes Faigle bf987af3ca
FEATURE Add reset bump dates bulk action (#16885) 2022-05-22 12:32:55 -04:00
Jordan Vidrine 20d1f90edf
FIX: Refactor placement of plugin outlet & index use (#16874) 2022-05-20 11:03:47 -05:00
David Taylor 166fe3bb34
FIX: Apply 'allowed_href_schemes' to all src/srcset attributes (#16860)
Previously we were only applying the restriction to `a[href]` and `img[src]`. This commit ensures we apply the same logic to all allowlisted media src attributes.
2022-05-19 11:18:30 +01:00
Bianca Nenciu 4d1c6396c9
FIX: Allow users to select "regular" categories (#16857)
Categories that had a CategoryUser record and the notification level
set to "Normal" were not selectable in any of the "Watched", "Tracked",
"Watching First Post" or "Muted" inputs. This happened because the
category seemed to be already selected in the "Normal" input, but that
does not exist (it is the default value if category is not present in
any of the other inputs).
2022-05-18 17:57:57 +03:00
Bianca Nenciu 9ea8a4a9af
FIX: Use CSS transition to make room for composer (#16750)
The composer is displayed over the bottom part of the page. To make sure
that no content is covered by the composer, a bottom padding is added
equal to the height of the composer. When the composer is opened or
closed that padding is added after around 300ms because of a debounce.

This commit makes sure that the padding is added as soon as the composer
state changes by using a CSS custom property (variable) and transition
property for a smooth user interface.
2022-05-17 22:44:25 +03:00
Daniel Waterworth 6e53f4d913
DEV: New readonly mode. Only applies to non-staff (#16243) 2022-05-17 13:06:08 -05:00
Bianca Nenciu 985afe1092
FEATURE: Add page title to 404 pages (#16846)
The title had to be added both on the 404 page generated by the server
side, displayed when the user reaches a bad page directly and the 404
page rendered by Ember when a user reaches a missing topic while
navigating the forum.
2022-05-17 18:37:43 +03:00
Rafael dos Santos Silva 5f1c3b4c9f
FIX: `acted` state in post action like could desync with multiple likes (#16847)
If userA has multiple tab/devices on the same topic, and:

1. userA likes a post in tab1
2. userB likes the same post
3. userA post like `acted` attr would desync in tab2

This fix handles this case and also the reverse one when removing likes
interleaved with other users acting on the same post.

Reported in Meta at https://meta.discourse.org/t/-/227239/3
2022-05-17 10:21:17 -03:00
Loïc Guitaut 73de203843 FIX: Apply 'hide email account' for invites 2022-05-17 09:56:06 +02:00
Chapoi b65ecf6987
UX: Add back link on taggroup page (#16700)
* Add back button to taggroup page

* Lint update + enclosing tags

* Linting

Co-authored-by: Penar Musaraj <pmusaraj@gmail.com>

Co-authored-by: Penar Musaraj <pmusaraj@gmail.com>
2022-05-16 10:34:09 +02:00
Isaac Janzen 4e622c9fd8
DEV: Remove 'htmlSafe' string prototype extensions (#16828)
Context: https://deprecations.emberjs.com/v3.x/#toc_ember-string-prototype_extensions
2022-05-13 16:24:05 -05:00
Isaac Janzen 85ceafb4dc
DEV: Remove 'htmlSafe' string prototype extensions (#16766)
Context: https://deprecations.emberjs.com/v3.x/#toc_ember-string-prototype_extensions
2022-05-13 14:58:26 -05:00
Isaac Janzen ce8dd8810e
DEV: Remove 'underscore' string prototype extensions (#16748)
Context: https://deprecations.emberjs.com/v3.x/#toc_ember-string-prototype_extensions
2022-05-13 11:32:38 -05:00
Isaac Janzen 839ae52c20
DEV: Remove 'decamelize' string prototype extensions (#16747) 2022-05-13 11:32:19 -05:00