-
-
Notifications
You must be signed in to change notification settings - Fork 224
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: Workspace UI - Add second confirmation window for rebasing #5454
base: 9.0
Are you sure you want to change the base?
Changes from all commits
bb36a28
f5e42ee
4560939
1187d3c
cfb8524
e44125d
5099433
165416d
e687b49
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,10 +1,20 @@ | ||||||
Neos.Workspace.Ui.WorkspaceController.rebase = Neos.Fusion:Component { | ||||||
/// string | ||||||
workspaceName = ${workspaceName} | ||||||
/// string | ||||||
workspaceTitle = ${workspaceTitle} | ||||||
/// string | ||||||
baseWorkspaceTitle = ${baseWorkspaceTitle} | ||||||
/// array | ||||||
conflictInformation = ${conflictInformation} | ||||||
|
||||||
|
||||||
renderer = afx` | ||||||
<Neos.Workspace.Ui:Component.Modal.Rebase | ||||||
workspaceName={props.workspaceName} | ||||||
workspaceTitle={props.workspaceTitle} | ||||||
baseWorkspaceTitle={props.baseWorkspaceTitle} | ||||||
conflictInformation={conflictInformation} | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
/> | ||||||
` | ||||||
} |
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,16 @@ | ||||||||||||||
Neos.Workspace.Ui.WorkspaceController.rebaseConfirm = Neos.Fusion:Component { | ||||||||||||||
/// string | ||||||||||||||
workspaceName = ${workspaceName} | ||||||||||||||
/// string | ||||||||||||||
workspaceTitle = ${workspaceTitle} | ||||||||||||||
/// int | ||||||||||||||
conflictCount = ${conflictCount} | ||||||||||||||
|
||||||||||||||
renderer = afx` | ||||||||||||||
<Neos.Workspace.Ui:Component.Modal.RebaseConfirm | ||||||||||||||
workspaceName={props.workspaceName} | ||||||||||||||
workspaceTitle={workspaceTitle} | ||||||||||||||
conflictCount={conflictCount} | ||||||||||||||
/> | ||||||||||||||
Comment on lines
+12
to
+14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
` | ||||||||||||||
} |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,23 +1,29 @@ | ||||||
prototype(Neos.Workspace.Ui:Component.Modal.Rebase) < prototype(Neos.Fusion:Component) { | ||||||
/// string | ||||||
workspaceName = null | ||||||
workspaceName = '' | ||||||
/// string | ||||||
workspaceTitle = '' | ||||||
/// string | ||||||
baseWorkspaceTitle = '' | ||||||
/// array | ||||||
conflictInformation = null | ||||||
|
||||||
@private { | ||||||
i18n = ${I18n.id('').source('Main').package('Neos.Workspace.Ui')} | ||||||
popoverId = 'workspace-rebase-modal' | ||||||
|
||||||
forceRebaseWorkspaceUri = Neos.Fusion:ActionUri { | ||||||
action = 'rebase' | ||||||
popoverConfirmId = 'workspace-rebase-confirm-modal' | ||||||
confirmRebaseUri = Neos.Fusion:ActionUri { | ||||||
action = 'rebaseConfirm' | ||||||
format = 'htmx' | ||||||
arguments { | ||||||
workspaceName = ${workspaceName} | ||||||
force = true | ||||||
conflictCount = ${Array.length(conflictInformation)} | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
} | ||||||
} | ||||||
} | ||||||
|
||||||
renderer = afx` | ||||||
<div popover id={private.popoverId}> | ||||||
<div popover class="error" id={private.popoverId}> | ||||||
<header> | ||||||
<button | ||||||
type="button" | ||||||
|
@@ -28,11 +34,45 @@ prototype(Neos.Workspace.Ui:Component.Modal.Rebase) < prototype(Neos.Fusion:Comp | |||||
<Neos.Workspace.Ui:Component.Icon icon="times"/> | ||||||
</button> | ||||||
<div class="neos-header"> | ||||||
{private.i18n.id('workspaces.dialog.forceSyncWorkspace')} | ||||||
<i class="fas fa-bolt"></i> {private.i18n.id('workspaces.dialog.forceSyncWorkspace').arguments([props.workspaceTitle, props.baseWorkspaceTitle])} | ||||||
</div> | ||||||
</header> | ||||||
<section> | ||||||
<p>{private.i18n.id('workspaces.dialog.thisCanLeadToLostChanges')}</p> | ||||||
<p>{private.i18n.id('workspaces.dialog.thisCanLeadToLostChanges').arguments([props.baseWorkspaceTitle, props.workspaceTitle])}</p> | ||||||
<details> | ||||||
<summary> | ||||||
{private.i18n.id('workspaces.dialog.ShowInformationAboutConflict').arguments([Array.length(props.conflictInformation)])} | ||||||
</summary> | ||||||
<br/> | ||||||
<Neos.Fusion:Loop items={props.conflictInformation} itemName="conflict"> | ||||||
<table class="neos-table"> | ||||||
<tbody> | ||||||
<tr> | ||||||
<td>{private.i18n.id('workspaces.dialog.rebase.error')}:</td> | ||||||
<td><b>{conflict.error}</b></td> | ||||||
</tr> | ||||||
<tr> | ||||||
<td>{private.i18n.id('workspaces.dialog.rebase.node')}:</td> | ||||||
<td> | ||||||
{conflict.affectedNode} | ||||||
</td> | ||||||
</tr> | ||||||
<tr> | ||||||
<td>{private.i18n.id('workspaces.dialog.rebase.event')}:</td> | ||||||
<td> | ||||||
<details> | ||||||
<summary>{private.i18n.id('workspaces.dialog.rebase.eventDetails')}: {conflict.event}</summary> | ||||||
<pre style="line-height: 1.5"> | ||||||
{conflict.eventPayload} | ||||||
</pre> | ||||||
</details> | ||||||
</td> | ||||||
</tr> | ||||||
</tbody> | ||||||
</table> | ||||||
</Neos.Fusion:Loop> | ||||||
</details> | ||||||
<p>{private.i18n.id('workspaces.dialog.thisCanLeadToLostChangesConfirmation').arguments([Array.length(props.conflictInformation)])}</p> | ||||||
</section> | ||||||
<footer> | ||||||
<button | ||||||
|
@@ -46,12 +86,13 @@ prototype(Neos.Workspace.Ui:Component.Modal.Rebase) < prototype(Neos.Fusion:Comp | |||||
<Neos.Workspace.Ui:Component.Button | ||||||
isDanger | ||||||
label={private.i18n.id('workspaces.modal.yesRebaseWorkspace')} | ||||||
attributes.hx-get={private.forceRebaseWorkspaceUri} | ||||||
attributes.hx-target="#workspace-module-content" | ||||||
attributes.hx-get={private.confirmRebaseUri} | ||||||
attributes.hx-target={'#' + private.popoverConfirmId} | ||||||
attributes.hx-swap="outerHTML" | ||||||
attributes.hx-on--after-request={'document.getElementById("' + private.popoverId + '").hidePopover()'} | ||||||
attributes.hx-on--after-request={'document.getElementById("' + private.popoverConfirmId + '").showPopover()'} | ||||||
/> | ||||||
</footer> | ||||||
<div popover id={private.popoverConfirmId}></div> | ||||||
</div> | ||||||
` | ||||||
} |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,63 @@ | ||||||
prototype(Neos.Workspace.Ui:Component.Modal.RebaseConfirm) < prototype(Neos.Fusion:Component) { | ||||||
/// string | ||||||
workspaceName = '' | ||||||
/// string | ||||||
workspaceTitle = '' | ||||||
/// int | ||||||
conflictCount = 0 | ||||||
|
||||||
@private { | ||||||
i18n = ${I18n.id('').source('Main').package('Neos.Workspace.Ui')} | ||||||
popoverId = 'workspace-rebase-confirm-modal' | ||||||
popoverRebaseId = 'workspace-rebase-modal' | ||||||
|
||||||
forceRebaseWorkspaceUri = Neos.Fusion:ActionUri { | ||||||
action = 'rebase' | ||||||
format = 'htmx' | ||||||
arguments { | ||||||
workspaceName = ${workspaceName} | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
force = true | ||||||
} | ||||||
} | ||||||
} | ||||||
|
||||||
renderer = afx` | ||||||
<div popover class="error" id={private.popoverId}> | ||||||
<header> | ||||||
<button | ||||||
type="button" | ||||||
class="neos-close neos-button" | ||||||
popovertarget={private.popoverId} | ||||||
popovertargetaction="close" | ||||||
> | ||||||
<Neos.Workspace.Ui:Component.Icon icon="times"/> | ||||||
</button> | ||||||
<div class="neos-header"> | ||||||
<i class="fas fa-exclamation-triangle"></i> {private.i18n.id('workspaces.dialog.ConfirmationDropConflictingChanges').arguments([props.workspaceTitle])} | ||||||
</div> | ||||||
</header> | ||||||
<section> | ||||||
<p>{private.i18n.id('workspaces.dialog.ConfirmationDropConflictingChangesCount').arguments([props.conflictCount])}</p> | ||||||
<p>{private.i18n.id('workspaces.dialog.ConfirmationDropConflictingChangesText')}</p> | ||||||
</section> | ||||||
<footer> | ||||||
<button | ||||||
type="button" | ||||||
class="neos-button" | ||||||
popovertarget={private.popoverRebaseId} | ||||||
popovertargetaction="close" | ||||||
> | ||||||
{private.i18n.id('cancel')} | ||||||
</button> | ||||||
<Neos.Workspace.Ui:Component.Button | ||||||
isDanger | ||||||
label={private.i18n.id('workspaces.modal.yesRebaseWorkspace')} | ||||||
attributes.hx-get={private.forceRebaseWorkspaceUri} | ||||||
attributes.hx-target="#workspace-module-content" | ||||||
attributes.hx-swap="outerHTML" | ||||||
attributes.hx-on--after-request={'document.getElementById("' + private.popoverRebaseId + '").hidePopover()'} | ||||||
/> | ||||||
</footer> | ||||||
</div> | ||||||
` | ||||||
} |
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.