discourse/app/assets/javascripts/admin/addon
Alan Guo Xiang Tan 7d8dd0d8e3
UX: Show loading spinner while loading dependencies for ace-editor (#26099)
Why this change?

On a slow network, using the `AceEditor` component will result in a blob
of text being shown first before being swapped out with the `ace.js`
editor after it has completed loading.

There is also a problem when setting the theme for the editor which
would result in a "flash" as reported in
https://github.com/ajaxorg/ace/issues/3286. To avoid this, we need to
load the theme js file before displaying the editor.

What does this change do?

1. Adds a loading spinner and set the `div.ace` with a `.hidden` class.
2. Once all the relevant scripts and initialization is done, we will
   then remove the loading spinner and remove `div.ace`.
2024-03-11 06:56:17 +08:00
..
adapters DEV: Migrate remaining admin classes to native syntax (#20717) 2023-03-17 12:25:05 +00:00
components UX: Show loading spinner while loading dependencies for ace-editor (#26099) 2024-03-11 06:56:17 +08:00
controllers DEV: Use the "new" service import (#26059) 2024-03-06 18:05:11 +01:00
helpers DEV: replace registerUnbound usage with default exports (#23802) 2023-10-19 14:28:25 +01:00
lib DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00
mixins DEV: Use the "new" service import (#26059) 2024-03-06 18:05:11 +01:00
models DEV: Fix random typos (#25957) 2024-02-29 12:24:37 +01:00
routes DEV: Use the "new" service import (#26059) 2024-03-06 18:05:11 +01:00
services DEV: Use the "new" service import (#26059) 2024-03-06 18:05:11 +01:00
templates DEV: Use fn+mut instead of action+mut (#26057) 2024-03-06 18:05:03 +01:00