-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add publish flow in site editor #61136
Conversation
Size Change: -481 B (0%) Total Size: 1.74 MB
ℹ️ View Unchanged
|
aabdee0
to
5a25cb7
Compare
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
good step
|
|
||
// Local state for save panel. | ||
// Note 'truthy' callback implies an open panel. | ||
const [ entitiesSavedStatesCallback, setEntitiesSavedStatesCallback ] = | ||
useState( false ); | ||
|
||
const closeEntitiesSavedStates = useCallback( | ||
( arg ) => { | ||
if ( typeof entitiesSavedStatesCallback === 'function' ) { | ||
entitiesSavedStatesCallback( arg ); | ||
} | ||
setEntitiesSavedStatesCallback( false ); | ||
}, | ||
[ entitiesSavedStatesCallback ] | ||
); |
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 think the edit-site
package has selectors/actions for this. See #45200. We should probably put this into the editor
store and reuse it in both editors.
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.
Do you think we can do it in a follow up to minimize the risk of introducing any regressions? I'd love to minimize the changes per PR, as there are more needed for every step that gets us closer. 😄
Thanks for testing @jasmussen!
If you choose from the status dialog Regarding the other design suggestions, I think they can be discussed separately and be handled in separate PRs.
This is exactly the same in both editors, if we explicitly select the
@Marc-pi this should also be handled separately and would probably require a new issue (if none similar exists). Could you create an issue? |
packages/editor/src/components/post-layout-actions-panel/index.js
Outdated
Show resolved
Hide resolved
@ntsekouras , here you are #47446 |
5a25cb7
to
283d870
Compare
I agree with that and it's happening when we save multiple entities. This is also the case for post editor and we might want to look into that separately. |
This is still an issue for me, would appreciate if others could check it 🤔 |
Can you make sure that you have enabled the panel in the preferences? |
It wasn't there before but I see it now and toggling it on works :) Not a big deal, but I wonder if this preference should be synced across post/site editors. I had it enabled in the post editor, but it wasn't enabled in the site editor. This seems a little unexpected. |
} | ||
/> | ||
) } | ||
{ _isPreviewingTheme && <SaveButton size="compact" /> } |
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.
Would love a review from @scruffian or @draganescu to test the theme activation flows
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.
For me it tested all right!
Edit: I did find the activate button disappears when browsing a previewing theme. Testing more.
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 found the regression above on trunk as well so not this PR.
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.
this is testing well for me. It's hard to test everything but it looks good. I'd appreciate more validation (testing)
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.
This is testing well for me too.
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.
This tests well for me - there is no bug in it which does not also exist in trunk
.
What?
Part of: #59878
Related: #59878
This PR continues the work on unifying the publishing flow between post and site editors and adds to the site editor the
publish/save
button that is used in post editor. This means we have the same publishing flow between the two editors. Additionally the updatedPost Status
component is reused too.Because of some extra use cases in site editor and trying to keep smaller change sets, this first iteration conditionally renders the reused
save/publish
button and panel and the existing one in site editor.The extra use cases in site editor include:
Eventually all these should be consolidated by probably passing some extra props down to the reusable components or having an internal API to render something differently and will be explored separately. Also after unifying the flow we should update the designs based on: #59878 (comment)
Testing Instructions
Screenshots or screencast
Screen.Recording.2024-04-26.at.11.19.20.AM.mov