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

upkeep/scripts: Reorganize JS #804

Merged
merged 29 commits into from
Sep 26, 2024
Merged

upkeep/scripts: Reorganize JS #804

merged 29 commits into from
Sep 26, 2024

Conversation

Sidsector9
Copy link
Member

@Sidsector9 Sidsector9 commented Sep 19, 2024

Description of the Change

Currently the asset files don't have a structure that makes it easy to search or develop functionality.
This PR moves the assets under src/js/features directory.

src/js/features
├── classification
│   ├── classic
│   ├── classification-button.js
│   ├── classification-toggle.js
│   ├── ibm-watson.js
│   ├── index.js
│   ├── pre-publish-classify-post.js
│   ├── previewer.js
│   ├── previewer.scss
│   └── taxonomy-controls.js
├── commands.js
├── content-resizing
│   ├── index.js
│   └── index.scss
├── excerpt-generation
│   ├── classic
│   │   ├── index.js
│   │   └── index.scss
│   ├── index.js
│   ├── maybe-excerpt-panel.js
│   └── panel.js
├── image-generation
│   ├── extend-image-block-generate-image.js
│   ├── inserter-media-category.js
│   └── media-modal
│       ├── collections
│       │   └── images.js
│       ├── index.js
│       ├── index.scss
│       ├── models
│       │   └── image.js
│       └── views
│           ├── error-message.js
│           ├── generate-image-media-upload.js
│           ├── generated-image.js
│           ├── generated-images-container.js
│           └── prompt.js
├── media-processing
│   ├── editor-ocr.js
│   └── media-upload.js
├── slot-fill
│   └── index.js
├── text-to-speech
│   ├── frontend
│   │   ├── index.js
│   │   └── index.scss
│   ├── index.js
│   └── store.js
└── title-generation
    ├── classic
    │   ├── index.js
    │   └── index.scss
    └── index.js

Previously, we have Classification and TTS features inside the same file, and it was done because the settings for both had to be rendered inside the Document Panel.

This PR exposes the <ClassifaiEditorSettingPanel /> component on the global window object which can be used b y both internal and 3rd-party developers to extend the Panel area to add more components.

How to test the Change

Ensure the E2E tests pass.

Changelog Entry

Developer - Re-organize the asset directory

Credits

Props @Sidsector9

Checklist:

@Sidsector9 Sidsector9 self-assigned this Sep 19, 2024
@github-actions github-actions bot added this to the 3.2.0 milestone Sep 19, 2024
@Sidsector9 Sidsector9 marked this pull request as ready for review September 22, 2024 12:23
@Sidsector9 Sidsector9 requested review from jeffpaul and a team as code owners September 22, 2024 12:23
@github-actions github-actions bot added the needs:code-review This requires code review. label Sep 22, 2024
@jeffpaul jeffpaul requested review from iamdharmesh and removed request for a team and jeffpaul September 22, 2024 22:23
Copy link
Member

@iamdharmesh iamdharmesh left a comment

Choose a reason for hiding this comment

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

Thanks for working on this @Sidsector9, This is great. The code looks good. However, I noticed 2 minor CSS things and added notes for the same could you please help look into it? Once it is resolved we would be good to merge this.

Thank you.

Comment on lines -259 to -265

wp_enqueue_style(
'classifai-language-processing-style',
CLASSIFAI_PLUGIN_URL . 'dist/language-processing.css',
[],
get_asset_info( 'language-processing', 'version' ),
);
Copy link
Member

Choose a reason for hiding this comment

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

It seems the language processing CSS file contains some CSS of the time generation model. Removing this minor break style of the title generation model. Need to move those CSS to classifai-plugin-classic-title-generation.css.

image

Comment on lines -254 to -260

wp_enqueue_style(
'classifai-language-processing-style',
CLASSIFAI_PLUGIN_URL . 'dist/language-processing.css',
[],
get_asset_info( 'language-processing', 'version' ),
);
Copy link
Member

Choose a reason for hiding this comment

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

It seems the language processing CSS file contains some CSS of the excerpt generation model. Removing this minor break spacing above the button.

image

@Sidsector9
Copy link
Member Author

Thanks for the review @iamdharmesh, I've resolved the CSS issues in 00376be

@Sidsector9 Sidsector9 merged commit 57dac03 into develop Sep 26, 2024
14 checks passed
@Sidsector9 Sidsector9 deleted the upkeep/scripts branch September 26, 2024 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs:code-review This requires code review.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants