Automattic / Automattic/wp-calypso
Editor: Move any editor code in client/post-editor that is needed elsewhere
- Dominant language
- TypeScript
- Stars
- 12.6k
- Forks
- 2k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 552
Description
## Requirements
Now that the [WordPress.com editor is deprecated](https://github.com/Automattic/wp-calypso/issues/41086), we're removing all unneeded code related to the Calypso editor and the editor preference. Some of the code in client/post-editor is still needed elsewhere in the app, so we'd like to move it out of that folder.
### To move:
*Used by Gutenberg (client/gutenberg/editor/calypsoify-iframe.tsx)*
- [ ] **EditorDocumentHead**
- [ ] **EditorRevisionsDialog** (which needs **EditorRevisionsList** and **EditorDiffViewer**)
*Used by My Sites > Media (client/my-sites/media/main.jsx)*
- [ ] **EditorMediaModalDialog** in main.jsx
- [ ] **EditorMediaModalDetail** in main.jsx
- [ ] **DetailPreviewVideo** in client/blocks/video-editor/index.jsx (only used in my-sites/media)
*Used by My Sites > Site Settings*
- [ ] **EditorMediaModalDialog** is used in
- client/my-sites/site-settings/podcast-cover-image-setting/index.jsx
- client/my-sites/site-settings/site-icon-setting/index.jsx
- [ ] **TermSelectorAddTerm** is used in client/blocks/term-tree-selector/add-term.jsx, client/blocks/term-tree-selector/index.jsx (could be replaced with `TermFormDialog`) -- used by Site Settings > Writing > Podcasting
*Used by My Sites > Posts*
- [x] **PublicizeMessage** is used in client/blocks/post-share/index.jsx (post sharing from /posts) and needs **EditorDrawerLabel** and **EditorFieldset** (PR: #47095)
*Parent Component Not In Use*
- **EditorFeaturedImagePreviewContainer** is used in client/components/tinymce/plugins/simple-payments/dialog/product-image-picker.jsx and needs **EditorMediaModal / MediaModal**
- **EditorHtmlToolbar** is used in client/components/tinymce/index.jsx and needs **Markup / MediaMarkup** and **EditorMediaModal / MediaModal**
- **EditorMediaModal / MediaModal** is used in
- client/components/tinymce/plugins/media/plugin.jsx
- **Markup / MediaMarkup** is used in
- client/components/tinymce/plugins/media/drop-zone.jsx
- client/components/tinymce/plugins/media/plugin.jsx
- **EditorMediaModal / MediaModal** is used in
- client/blocks/image-selector/index.jsx (may not be used anywhere)
- **EditorMediaModalGalleryHelp** is used in client/my-sites/media-library/list-item.tsx (used in tests and post-editor)
- **MediaModalSecondaryActions** is used in client/my-sites/media-library/header.jsx (used in tests)
Contributor guide
Research direction
Start by tracing the remaining checklist components from client/post-editor to the listed consumers, including client/gutenberg/editor/calypsoify-iframe.tsx, client/my-sites/media/main.jsx, site-settings entries, and the TinyMCE plugins. Check the existing PR #47095 as the completed PublicizeMessage precedent. Done means the needed components are moved out of client/post-editor and the listed consumers and related tests still work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react, typescript
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100