Follow up to f294f984cf
All that was needed was a little fix to our markdown engine to use the
"image src" as the "video src" when the "data video src" was not
defined.
That way we can use the regular image markdown with the "|video" option
(?).
This replaces the video container / thumbnail with a proper "<video>" element when quoting a video.
It's not the best UX, especially when "morphing" is disabled.
Needs more work.
Internal ref - t/143321
Currently only system flags are translated. When we send message to the user that their post was deleted because of custom flag, we should default to custom flag name.
Previously when attempting to edit a globally shadowed setting, the
error message was not very helpful, it said "You are not allowed to
change hidden settings". This commit changes the error message to
reflect the actual problem, which is that the setting is shadowed by
a global setting via ENV var.
* DEV: unsilence deprecation warnings for old Font Awesome icon names
* update fa-user to user font awesome icon name
* update pencil-alt to pencil font awesome 6 icon name
Adds setupEditor to ComposerEditor so it can setup/destroy events when the underlying editorComponent is switched.
Moves putCursorAtEnd uses (which implementation is textarea-specific) to TextareaTextManipulation.
Moves insertCurrentTime and a corresponding test, which is discourse-local-dates specific, to the plugin.
Moves applyList and formatCode from DEditor to the TextareaTextManipulation.
Moves DEditor._applySurround to TextareaTextManipulation.applySurroundSelection
Avoids resetting the textarea value on applyList and formatCode, keeping the undo history.
before this commit, when moving posts with freeze option, the rate limit was being applied leading to errors. This commit fixes that.
and also adds tests for the scenarios of moving posts with freeze option.
BEFORE: if you click the "reply" button on a post and then decided that you want to "edit" the same post, clicking the "edit" button would do nothing. Clicking "edit" on another post works, but editing the same post would appear broken.
AFTER: if you click the "edit" button, it will properly load the content of the post you're trying to edit. No matter which one it is.
This was somewhat tricky to track down as the system specs seemed to contradict the qunit tests until I realized that the qunit tests were only testing the edit on the 1st post and the system specs were testing on replies.
I improved the qunit tests to test both editing OP and a reply and (hopefully) made the system specs a little bit clearer.
This is a follow up to bbe62d88d2.
Uses the `htmlClass` to automagically set the `modal-open` class to
`<html>` so that we can do `overflow: hidden` and prevent the
"background" behind the modal from scrolling while the modal is open.
Internal ref - t/142760
- Use `requestAnimationFrame` when transitioning from `ready` -> `loading`. The previous `next()` implementation was unreliable, particularly in Safari, and would cause the loading slider to jump backwards instead of forwards
- Double the minimum transition time to 200ms. This avoids the rolling average being skewed too much by routes which load quickly without network access.
This commit ensures that tracked properties added to the post model are correctly synced when using `post.updateFromPost`.
It also introduces a plugin API to allow plugins to register new tracked properties in the post model without needing to modify the class.
Animating the background-color property like this is not compositable for the browser, which means the animation is not smooth, and can contribute to the Cumulative Layout Shift web vital.
For now, we're removing this, and may consider re-introducing an alternative version in future based on user feedback.