Skip to content

Componentize the settings page - #2258

Merged
WorldLanguages merged 9 commits into
ScratchAddons:masterfrom
TheColaber:component-time!
Apr 23, 2021
Merged

Componentize the settings page#2258
WorldLanguages merged 9 commits into
ScratchAddons:masterfrom
TheColaber:component-time!

Conversation

@TheColaber

Copy link
Copy Markdown
Member

Changes

As of writing this, this PR converts the addon body and the addon settings into components.

Reason for changes

For organizations so functions for just settings or just addons stay in one place rather than with everything else. Also, so we don't have to pass in addon or setting into functions.

Tests

Probably needs more testing just in case.

Discuss
What else might need to be componentized?

@GrahamSH-LLK

Copy link
Copy Markdown
Member

This is awesome! One thing I want to consider is figuring out how to have separate files for components.

@GrahamSH-LLK

Copy link
Copy Markdown
Member

What else might need to be componentized?

Categories and icons

@WorldLanguages

WorldLanguages commented Apr 22, 2021

Copy link
Copy Markdown
Member

One thing I want to consider is figuring out how to have separate files for components.

Keep in mind that a file with an inline <script></script> tag won't work because of the extension CSP. We'll need separate .html and .js files if we want to have components as separate files (and if we want to have separated Vue.extend()s as well)

for (let child of this.$children) {
if (child.isOpen && child.canCloseOutside && e.isTrusted && child.color && child !== leaveOpen) {
child.toggle(child.addon, child.setting, false);
for (let addon of this.$children) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe this.$children.filter(c => c.$options.name === "addon-body")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is ok for now :P

@WorldLanguages
WorldLanguages merged commit 755dec9 into ScratchAddons:master Apr 23, 2021
apple502j added a commit to apple502j/ScratchAddons that referenced this pull request Apr 24, 2021
WorldLanguages pushed a commit that referenced this pull request Apr 24, 2021
* Fix lint

* Fix typos in editor-devtools

* Remove unused code for feedback

* editor-devtools: change message for help

* Remove unused strings

* Remove dead code

* Remove references to griffpatch

* style: format code

* editor-devtools: change some messages

* Bump GH Actions deps

* Fix typo

* Fix lint error

* Fix error caused by #2258

* style: format code

Co-authored-by: apple502j <apple502j@users.noreply.github.com>
@TheColaber
TheColaber deleted the component-time! branch June 25, 2024 13:51
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.

3 participants