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

Packages: Move story-editor to new structure #6050

Closed
8 tasks
swissspidy opened this issue Jan 25, 2021 · 3 comments
Closed
8 tasks

Packages: Move story-editor to new structure #6050

swissspidy opened this issue Jan 25, 2021 · 3 comments
Assignees
Labels
P2 Should do soon Package: Story Editor /packages/story-editor Type: Infrastructure Changes impacting testing infrastructure or build tooling

Comments

@swissspidy
Copy link
Collaborator

swissspidy commented Jan 25, 2021

Feature Description

💡 The goal here is to create two packages ⚠️

Package 1: story-editor

Proof-of-concept: https://github.com/google/web-stories-wp/tree/try/next-level-packages/packages/story-editor/src

This package will basically just export a ton of stuff.

-> Dashboard will import any dependencies from here for now (there will be way fewer once #8373 lands)
-> Web Stories block will import any dependencies from this package (until #8327 lands)

  • Move code from /assets/src/edit-story to /packages/story-editor/src/
  • Make packages/story-editor/index.js just export all components needed by others
  • Update imports where necessary.
    Use @web-stories-wp/... imports for anything that is already a package, relative imports for everything else.
  • Create /packages/story-editor/package.json referencing its dependencies
  • Create /packages/story-editor/README.md with short documentation.

Package 2: wp-story-editor

Proof-of-concept: https://github.com/google/web-stories-wp/blob/f02da9e83a879b316e31b7d13bd62bd1dc8c9014/packages/wp-story-editor/src/index.js

  • Move /assets/src/edit-story/index.js to /packages/wp-story-editor/src/index.js, updating all references to import from @web-stories-wp/story-editor
  • Create /packages/wp-story-editor/package.json referencing its dependencies
  • Create /packages/wp-story-editor/README.md with short documentation.

Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance Criteria

Implementation Brief

For the remaining dependencies:

  • packages/story-editor/karma/fixture can continue to import FixtureEvents from assets/src/karma-fixture for now
  • The formattedTemplatesArray array used in story editor karma tests should be copied to packagers/story-editor/karma/fixture/db/templates.js and imported from there

Also:

  • Ensure .storybook/stories/playground/index.js still imports & renders editor correctly.
@swissspidy swissspidy added Type: Infrastructure Changes impacting testing infrastructure or build tooling Pod: WP & Infra labels Jan 25, 2021
@swissspidy swissspidy added the P2 Should do soon label Jan 26, 2021
@swissspidy swissspidy added P3 Nice to have and removed P2 Should do soon labels May 27, 2021
@swissspidy swissspidy changed the title Packages: Move editor to new structure Packages: Move story-editor to new structure Jun 4, 2021
@swissspidy swissspidy added the Package: Story Editor /packages/story-editor label Jun 4, 2021
@swissspidy swissspidy added P2 Should do soon and removed P3 Nice to have labels Jul 21, 2021
@swissspidy
Copy link
Collaborator Author

@spacedmonkey With #8388 in mind, I think we can proceed with moving the editor to its own package. Moving to "Ready for Sprint" for now

@mohdsayed
Copy link
Contributor

With #8561 merged, shall we close this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Should do soon Package: Story Editor /packages/story-editor Type: Infrastructure Changes impacting testing infrastructure or build tooling
Projects
None yet
Development

No branches or pull requests

3 participants