Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Spinner with web component #2574

Merged
merged 3 commits into from
Aug 31, 2023

Conversation

sascha-karnatz
Copy link
Contributor

@sascha-karnatz sascha-karnatz commented Aug 30, 2023

What is this pull request for?

  • split the Spinner into a class to append the spinner and a spinner web component
  • add a base web component - class which allow reactive props and a very easy way to write web components
  • update the usage in ImageLoader and Tinymce to use the internal Spinner function instead recreating the same functions again

Checklist

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have added tests to cover this change

@sascha-karnatz sascha-karnatz marked this pull request as draft August 30, 2023 14:25
@sascha-karnatz sascha-karnatz force-pushed the update_javascript/spinner branch 5 times, most recently from 5227498 to d516b25 Compare August 31, 2023 09:11
@sascha-karnatz sascha-karnatz marked this pull request as ready for review August 31, 2023 09:12
@tvdeyen tvdeyen added this to the 7.1 milestone Aug 31, 2023
Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, nice!

Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get an error if I try to expand a folded element

Alchemy CMS - All 2023-08-31 11-59-11

try to add a default custom component class for all Alchemy web components. This is inspired from LitElements, but it contains the functions that we are using. The API of the Spinner class is still the same. It is now adding the web component instead of the Handlebars template.
The option is only used in the image gallery, but is now possible to use every color inside the spinner.
@sascha-karnatz sascha-karnatz force-pushed the update_javascript/spinner branch from aa901ce to 9aad4b3 Compare August 31, 2023 12:11
it is pretty basic for the moment. An update of Jest was necessary to have the latest support for jsdom.
Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing work!

@tvdeyen tvdeyen merged commit d526d2e into AlchemyCMS:main Aug 31, 2023
@sascha-karnatz sascha-karnatz deleted the update_javascript/spinner branch September 1, 2023 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants