-
Notifications
You must be signed in to change notification settings - Fork 2k
Add editor in reader behind a feature flag #76035
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
Conversation
1d181cc to
83a02cd
Compare
|
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~5153 bytes removed 📉 [gzipped]) DetailsCommon code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Sections (~22778 bytes added 📈 [gzipped]) DetailsSections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Async-loaded Components (~216489 bytes added 📈 [gzipped]) DetailsReact components that are loaded lazily, when a certain part of UI is displayed for the first time. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
|
This PR modifies the release build for editing-toolkit To test your changes on WordPress.com, run To deploy your changes after merging, see the documentation: PCYsg-mMA-p2 |
client/package.json
Outdated
| @@ -40,6 +40,7 @@ | |||
| "@automattic/happychat-connection": "workspace:^", | |||
| "@automattic/help-center": "workspace:^", | |||
| "@automattic/i18n-utils": "workspace:^", | |||
| "@automattic/isolated-block-editor": "2.22.0", | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a need to pin it like that, or could we make it less specific with a ^?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^ doesn't work, since 0.23.0 updates to React 18 and so is incompatible. But I changed it to 0.22.x.
client/reader/post-editor/index.jsx
Outdated
| className="reader-post-editor__publish-button" | ||
| isPrimary="true" | ||
| onClick={ publishPost } | ||
| disabled={ isLoading } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it also be disabled when there are no blocks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had the same idea, but found this surprisingly tricky because select( 'core/block-editor' ).getBlocks() seems to only work if run within the scope of IsolatedBlockEditor, rather than within the parent component.
I didn't see an immediate way to pass a function that the button component runs to determine if it's disabled, rather than passing it a predetermined value.
I'll plan to address this in a follow-up, though!
bc19c8c to
715a36d
Compare
715a36d to
79c2767
Compare
|
I've rebased this branch off of |
f7be757 to
0a0bbb5
Compare
|
I've reviewed and tested the part of the code that owns the @Automattic/caribou team; it works as expected without regression. |
03a2c58 to
911478e
Compare
ec2ea4f to
e77f6d9
Compare
|
I've rebased this branch off of trunk. I wouldn't say the editor works, as there are some UI/style issues, but it builds and you can interact with it without errors. |
worldomonation
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not 100% sure why @Automattic/kitkat was tagged for review, but my concern is that this PR completely breaks Unit Tests.
I think this will get resolved after this can be rebased with #78711 |
|
This PR has been marked as stale. This happened because:
If this PR is still useful, please do a trunk merge or rebase and otherwise make sure it's up to date and has clear testing instructions. You may also want to ping possible reviewers in case they've forgotten about it. Please close this PR if you think it's not valid anymore — if you do, please add a brief explanation. If the PR is not updated (or at least commented on) in another month, it will be automatically closed. |
|
This PR has been automatically closed as it has not been updated in some time. If you want to resume work on the PR, feel free to restore the branch and reopen the PR. |
Proposed Changes
Adds an instance of isolated-block-editor behind a feature flag,
reader/editor.This is meant to be a starting point that we can build on. See pe7F0s-Kk-p2
Testing Instructions
/readon calypso.localhost