Skip to content
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: Offer resolution strategies when conflicts arise during rebase #3762

Merged
merged 29 commits into from May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
4cbf010
TASK: Use WorkspaceStatus type for workspace status state, let it def…
grebaldi Apr 3, 2024
10b44ee
TASK: Use Neos.Neos high-level Workspace API for WorkspaceInfo
grebaldi Apr 4, 2024
84eafcf
TASK: Create backend mechanism to collect information about rebase co…
grebaldi Apr 1, 2024
2439f5a
TASK: Create `Syncing` partition in redux store
grebaldi Apr 3, 2024
3cb3871
TASK: Create `Sync` saga
grebaldi Apr 3, 2024
74ba34b
TASK: Convert WorkspaceSync container to typescript
grebaldi Mar 28, 2024
46f1bfb
TASK: Convert SyncWorkspaceDialog container to typescript
grebaldi Mar 28, 2024
f834747
TASK: Split out `ConfirmationDialog` component from `SyncWorkspaceDia…
grebaldi Mar 28, 2024
49719ea
TASK: Create `ResolutionStrategySelectionDialog` component
grebaldi Mar 29, 2024
3ccdba6
TASK: Add confirmation dialog for `DISCARD_ALL` resolution strategy
grebaldi Mar 29, 2024
8db3bf8
TASK: Add confirmation dialog for `FORCE` resolution strategy
grebaldi Mar 29, 2024
acb76ba
TASK: Create `ResultDialog` component for Syncing workflow
grebaldi Apr 2, 2024
af8f830
TASK: Create `ProcessIndicator` component for Syncing workflow
grebaldi Apr 3, 2024
d93f8c3
TASK: Wire-up `SyncWorkspaceDialog` with `Syncing` redux state partition
grebaldi Apr 3, 2024
81d01be
TASK: Remove legacy `syncWorkspace` action from Workspaces state part…
grebaldi Apr 3, 2024
c24e9ac
TASK: Implement DiscardAllChanges command
grebaldi Apr 8, 2024
0e0aef0
TASK: Integrate DiscardAll command with publishing workflow on the cl…
grebaldi Apr 8, 2024
c2c0a41
TASK: Implement DISCARD_ALL strategy for conflict resolution during r…
grebaldi Apr 8, 2024
8d7f0bd
TASK: Add `beforeunload` handler during rebase
grebaldi Apr 11, 2024
3f2bb45
TASK: Allow the SelectBox component to carry an ID
grebaldi Apr 11, 2024
2b1cd02
TASK: Create second user during E2E setup
grebaldi Apr 11, 2024
018671f
TASK: Create E2E test scenario for conflict resolution with "Discard …
grebaldi Apr 11, 2024
6627a53
TASK: Create E2E test scenario for conflict resolution with "Drop con…
grebaldi Apr 11, 2024
6bc82a5
TASK: Stabilize E2E tests
grebaldi Apr 12, 2024
5b383c1
TASK: Remove legacy `WorkspaceStatus.OUTDATED_CONFLICT` from ts-inter…
grebaldi Apr 12, 2024
18c7da9
TASK: Remove legacy `state.ui.remote.isSyncing`
grebaldi Apr 12, 2024
f3ac501
TASK: Remove obsolete i18n labels
grebaldi Apr 12, 2024
b8d7d03
TASK: Remove remaining ad-hoc typings for backend endpoints
grebaldi Apr 26, 2024
8d2d1cb
TASK: Retrieve NodeType from NodeTypeManager in ConflictsBuilder
grebaldi Apr 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion .circleci/config.yml
Expand Up @@ -100,7 +100,8 @@ jobs:
./flow flow:cache:flush
./flow flow:cache:warmup
./flow doctrine:migrate
./flow user:create --username=admin --password=admin --first-name=John --last-name=Doe --roles=Administrator
./flow user:create --username=admin --password=admin --first-name=Admin --last-name=Admington --roles=Administrator
./flow user:create --username=editor --password=editor --first-name=Editor --last-name=McEditworth --roles=Editor
- run:
name: Start flow server
command: /home/circleci/app/flow server:run --port 8081
Expand Down
45 changes: 45 additions & 0 deletions Classes/Application/DiscardAllChanges.php
@@ -0,0 +1,45 @@
<?php

/*
* This file is part of the Neos.Neos package.
*
* (c) Contributors of the Neos Project - www.neos.io
*
* This package is Open Source Software. For the full copyright and license
* information, please view the LICENSE file which was distributed with this
* source code.
*/

declare(strict_types=1);

namespace Neos\Neos\Ui\Application;

use Neos\ContentRepository\Core\SharedModel\ContentRepository\ContentRepositoryId;
use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName;
use Neos\Flow\Annotations as Flow;

/**
* The application layer level command DTO to communicate discarding of all changes recorded for a workspace
*
* @internal for communication within the Neos UI only
*/
#[Flow\Proxy(false)]
final readonly class DiscardAllChanges
{
public function __construct(
public ContentRepositoryId $contentRepositoryId,
public WorkspaceName $workspaceName,
) {
}

/**
* @param array<string,string> $values
*/
public static function fromArray(array $values): self
{
return new self(
ContentRepositoryId::fromString($values['contentRepositoryId']),
WorkspaceName::fromString($values['workspaceName']),
);
}
}
40 changes: 40 additions & 0 deletions Classes/Application/SyncWorkspace/Conflict.php
@@ -0,0 +1,40 @@
<?php

/*
* This file is part of the Neos.Neos.Ui package.
*
* (c) Contributors of the Neos Project - www.neos.io
*
* This package is Open Source Software. For the full copyright and license
* information, please view the LICENSE file which was distributed with this
* source code.
*/

declare(strict_types=1);

namespace Neos\Neos\Ui\Application\SyncWorkspace;

use Neos\Flow\Annotations as Flow;

/**
* A DTO representing a rebase conflict
*
* @internal for communication within the Neos UI only
*/
#[Flow\Proxy(false)]
final readonly class Conflict implements \JsonSerializable
{
public function __construct(
public ?IconLabel $affectedSite,
public ?IconLabel $affectedDocument,
public ?IconLabel $affectedNode,
public ?TypeOfChange $typeOfChange,
public ?ReasonForConflict $reasonForConflict
) {
}

public function jsonSerialize(): mixed
{
return get_object_vars($this);
}
}
57 changes: 57 additions & 0 deletions Classes/Application/SyncWorkspace/Conflicts.php
@@ -0,0 +1,57 @@
<?php

/*
* This file is part of the Neos.Neos.Ui package.
*
* (c) Contributors of the Neos Project - www.neos.io
*
* This package is Open Source Software. For the full copyright and license
* information, please view the LICENSE file which was distributed with this
* source code.
*/

declare(strict_types=1);

namespace Neos\Neos\Ui\Application\SyncWorkspace;

use Neos\ContentRepository\Core\ContentRepository;
use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint;
use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName;
use Neos\Flow\Annotations as Flow;

/**
* @internal for communication within the Neos UI only
*/
#[Flow\Proxy(false)]
final readonly class Conflicts implements \JsonSerializable, \Countable
{
/** @var Conflict[] */
private array $items;

public function __construct(Conflict ...$items)
{
$this->items = $items;
}

public static function builder(
ContentRepository $contentRepository,
WorkspaceName $workspaceName,
?DimensionSpacePoint $preferredDimensionSpacePoint,
): ConflictsBuilder {
return new ConflictsBuilder(
contentRepository: $contentRepository,
workspaceName: $workspaceName,
preferredDimensionSpacePoint: $preferredDimensionSpacePoint
);
}

public function jsonSerialize(): mixed
{
return $this->items;
}

public function count(): int
{
return count($this->items);
}
}