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

1173-Split-editor-in-card-dependant-files #1173

Merged

Conversation

MrBearPresident
Copy link
Collaborator

@MrBearPresident MrBearPresident commented Jan 22, 2025

Breaking change

Proposed change

  • Significant restructuring of the bubble-card-editor.js file to use separate files for each card type.
  • Introduction of new card-specific editor files to improve code organization and maintainability.
  • Addition of new styles in styles.css for the editor.
  • Reducing the main-editor code from +/- 2400 lines to +/-940 lines.
    image
    image
    image
    image
    image

Type of change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests screenshots/gifs have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

  • Documentation added/updated for readme.
    • No need

@MrBearPresident MrBearPresident changed the title Add editor files per card 1173-Split-editor-in-card-dependant-files Jan 22, 2025
@Clooos
Copy link
Owner

Clooos commented Jan 25, 2025

Thank you so much for being brave enough to refactor this 😅 I'm truly sorry for this mess!

@MrBearPresident
Copy link
Collaborator Author

MrBearPresident commented Jan 27, 2025

As some of you regular visitors know I've been helping @Clooos somewhat lately with some features/bugs/questions. As I know, loads of you get exited when new features are announced. But sometimes we have to do some maintenance. This time I need some help.

What I've done.

  • Significant restructuring of the bubble-card-editor.js file to use separate files for each card type.
  • Introduction of new card-specific editor files to improve code organization and maintainability.
  • Addition of new styles in styles.css for the editor.
  • Reducing the main-editor code from +/- 2400 lines to +/-940 lines.

Why have I done this?
Reducing the size, improving the code, makes it easier to contribute in the way that there will be less conflicted pushes. There are loads of extra optimizations possible on the editor. In this is a step in that direction.

How do I need your help.
I've made an alpha build that contains this new code. I've tested most of the things myself but there is a chance I overlooked some things. So I'm looking for people willing to test this new alfa build.
If you are willing to contribute and test you can download this file: bubble-card.zip
To use, unzip file above and follow the "without HACS"-method.
This should give you following version in the editor:
image

This is based on the newer v2.4.0-beta.1 If you encouter issues could you dubble check if these issues are not present over there as well. Issues not present in v2.4.0-beta.1 but are present in this alfa should be reported here on this PR.

What needs testing

  • All editors, writing configs, reading configs, adapting values.
  • Check if default values are the same.
  • If you are testing a editor please leave a emoji-reaction on this comment. Then I know what and how many times it is tested.
    • 👍For button editor
    • 👎For cover editor
    • 😁For climate editor
    • 🎉For empty column/separator editor
    • 🫤For horizontal buttons stack editor
    • 💓For media player editor
    • 🚀For pop-up editor
    • 👀For separator editor

@MrBearPresident MrBearPresident marked this pull request as ready for review January 27, 2025 11:47
@Clooos Clooos merged commit 89df8b3 into Clooos:main Feb 7, 2025
2 checks passed
@Clooos
Copy link
Owner

Clooos commented Feb 7, 2025

Just tried it and this seems perfect! Thank you so much again!

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