-
-
Notifications
You must be signed in to change notification settings - Fork 135
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
!!!FEATURE: Lock the UI and present a modal during publish/discard #3759
!!!FEATURE: Lock the UI and present a modal during publish/discard #3759
Conversation
6f73c45
to
c25910d
Compare
Wooooooooow 🥳 the dialog looks super cool ;) |
ec95f47
to
7f50bb0
Compare
7f50bb0
to
25e88e0
Compare
5a8a92c
to
6645c4d
Compare
This removes the following labels: Neos.Neos:Main:content.components.discardAllDialog.discardXChangesSubheader Neos.Neos:Main:content.components.discardAllDialog.discardAllChangesHeader Neos.Neos:Main:content.components.discardAllDialog.discardAllChangesSubheader Neos.Neos:Main:content.components.publishAllDialog.header Neos.Neos:Main:content.components.publishAllDialog.subheader The publishing workflow in the UI has changes significantly and requires an entirely new set of labels. Those labels are now located in the UI repository.
Unit test failures are unrelated. They are due to a broken jest snapshot that has been fixed with #3757 for |
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.
Love it!
I added a few nitpicks and am otherwise ready to approve
As suggested by @nezaniel (see: #3759 (comment))
...to retrieve the base workspace during publish opertaions. As suggested by @nezaniel (see: #3759 (comment))
This package provides utilities to analyze errors of various types. It provides the `<ErrorView/>` component that can be embedded in other components to display those errors. In `FLOW_CONTEXT=Development` the `<ErrorView/>` component will also display meta information (e.g. exception class name, stack trace, etc.).
The PublishDiscardDialog is a modal that is supposed to pop up whenever an editor starts publishing or discarding their workspace. Editors need to confirm their intent, after which they are presented with a process indicator that blocks the screen as long as the remote operation is not finished yet. Finally, Editors see a success message or an error message - depending on the outcome. In both cases, they need to acknowledge the info. If they see an error message, they are also given an opportunity to retry the action. This commit creates the visual implementation of the dialog but does not wire it to the application state yet.
This commit MUST be reverted before merging!
As suggested by @nezaniel (see: #3759 (comment))
...to retrieve the base workspace during publish opertaions. As suggested by @nezaniel (see: #3759 (comment))
bec21c1
to
455ff67
Compare
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.
Wow nice work so much work thanks. We are lucky to have you on the team as this is some crazy state handling ;)
After reading through im not sure i understand even half of it but it looks legit ^^
I will experiment locally and - if you find the time - would like to chat with you what changed but in human language ;)
$nodeMapBuilder->addNode($siteNode); | ||
|
||
$gatherNodesRecursively = function ( | ||
&$nodeMapBuilder, |
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.
&$nodeMapBuilder, | |
$nodeMapBuilder, |
$ancestors, | ||
$subgraph | ||
) { | ||
if ($level < $this->loadingDepth || // load all nodes within loadingDepth |
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.
ah i see this logic is not new but moved from NeosUiDefaultNodesOperation
...
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.
... but we dont seem to remove the NeosUiDefaultNodesOperation yet?
@@ -0,0 +1,41 @@ | |||
# @neos-project/neos-ui-error |
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.
nice idea to add some structure to our codebase :D
Should this package also contain the default error boundary? neos-ui/src/Containers/ErrorBoundary
... but on the other hand i guess there is little code to share and the boundary can stay were it wants
@@ -73,12 +47,52 @@ export interface State { | |||
// | |||
// Export the actionTypes | |||
// | |||
export const actionTypes = typedKeys(all).reduce((acc, cur) => ({...acc, [cur]: all[cur].actionTypes}), {}); | |||
export const actionTypes = { |
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.
nice cleanup that is some next level stuff otherwise 😅
packages/neos-ui/src/Containers/Modals/PublishingDialog/ConfirmationDialog.tsx
Show resolved
Hide resolved
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.
Thanks for walking through this one with me and explaining everything ^^
Co-authored-by: Marc Henry Schultz <[email protected]>
…hub.com:neos/neos-ui into feature/conflict-resolution-01/publishing-modal
} | ||
}; | ||
|
||
const reloadAfterPublishing = makeReloadAfterDiscard({routes}); |
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.
nitpick: the factory should also be renamed ;)
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.
Of course :D Thanks for the pointer!
Okay perfect ❤️ again many thanks. Please feel free to hit the merge button. (The failures are unrelated and will be fixed by a rebase) |
…te-i18n-labels TASK: Remove i18n labels that are obsolete after neos/neos-ui#3759
This removes the following labels: Neos.Neos:Main:content.components.discardAllDialog.discardXChangesSubheader Neos.Neos:Main:content.components.discardAllDialog.discardAllChangesHeader Neos.Neos:Main:content.components.discardAllDialog.discardAllChangesSubheader Neos.Neos:Main:content.components.publishAllDialog.header Neos.Neos:Main:content.components.publishAllDialog.subheader The publishing workflow in the UI has changes significantly and requires an entirely new set of labels. Those labels are now located in the UI repository.
…te-i18n-labels TASK: Remove i18n labels that are obsolete after neos/neos-ui#3759
solves: #3743
builds on: #3752
The PublishDiscardDialog is a modal that is supposed to pop up whenever an editor starts publishing or discarding their workspace.
Editors need to confirm their intent, after which they are presented with a process indicator that blocks the screen as long as the remote operation is not finished yet.
Finally, Editors see a success message or an error message - depending on the outcome. In both cases, they need to acknowledge the info. If they see an error message, they are also given an opportunity to retry the action.
Publish Workflow
Show Video
Peek.2024-03-22.16-25.Publish.workflow.mp4
For publishing, users are now first presented with a confirmation dialog. Formerly, publishing didn't show this dialog. This PR makes both
Publish
andDiscard
consistent in this regard (as you wouldn't want to accidentally publish anything either).If the user confirms the action, they see an uncancellable modal that illustrates the ongoing operation. Formerly, the operation was only indicated by a spinning icon alongside the
PublishingDropdown
head. The UI remained usable during the operation, which could potentially lead to invalid actions. Now, the UI is locked, including abeforeunload
handler that warns the user if they're about to reload or leave the page.The progress indicator remains open for as long as any async operation is still running. This includes the publishing operation itself, but also the adjacent reload of nodes and the reload of the guest frame. Only after the UI has reached a stable and consistent state, the lock is released.
Finally, the user is presented with a dialog that lets them acknowledge the operation. Formerly, a successful publishing process would have been indicated by a fleeting flash message. The acknowledgement dialog remains open until the user has taken notice. This way users can safely leave the tab, do something else, and return without losing the context of what their last action has been.
Discard Workflow
Show Video
Peek.2024-03-22.16-24.Discard.Workflow.mp4
The
Discard
workflow behaves exactly like thePublish
workflow. The only difference is in the coloring and the progress indicator illustration.Error Handling
Show Video
Peek.2024-03-22.16-27.Error.Workflow.mp4
Formerly, errors during
Publish
orDiscard
would have been displayed using a persistent flash message. This PR introduces a new component that can be embedded inside a dialog and that shows more detailed error information inFLOW_CONTEXT=Development
.Also new: Users are offered a "Try Again" button, when
Publish
orDiscard
fails.Remaining TODOs
<PublishDiscardDialog/>
CR.Publishing
state fromCR.Workspaces
abortPublish
,confirmPublish
,finishPublish
,acknowledgePublish
,abortDiscard
,confirmDiscard
,finishDiscard
,acknowledgeDiscard
->cancel
,confirm
,finish
,acknowledge
NODE_HAS_BEEN_CREATED
constant and makeTypeOfChange
an enum[Try again]
[Okay]
->[Cancel]
[Try again]
<DiscardDialog/>
actions.UI.Remote
actionsstartPublishing()
finishPublishing()
startDiscarding()
finishDiscarding()
beforeunload
handler during publish/discardFollow-Ups