-
Notifications
You must be signed in to change notification settings - Fork 481
Content Drive: Add Lock and Unlock quick actions #36921
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
Open
rjvelazco
wants to merge
7
commits into
main
Choose a base branch
from
issue-36844-content-drive-action-center-add-bulk-lock-and-unlock-quick-actions
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
5a355ea
Add failing tests for bulk Lock and Unlock quick actions
rjvelazco 5aad4e9
Implement bulk Lock and Unlock quick actions
rjvelazco fca6722
Route quick actions through the preview screen too
rjvelazco 3443e8e
feat(content-drive): keep a workflow action running when the dialog c…
rjvelazco 4571b12
refactor(content-drive): replace static folder notice with p-message …
rjvelazco 0c48f73
Merge branch 'main' into issue-36844-content-drive-action-center-add-…
rjvelazco 1f374ad
Address review findings: suite registration, unlock copy, missing sum…
rjvelazco File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Medium — the preview cannot show the thing it was added for.
The PR body's justification for routing quick actions through the preview is that on Unlock "unchecking those rows is the only way to act on the warning". But the preview renders no per-row lock-owner information: this
@ifis gated on!$pendingQuickAction(), anddot-content-drive-action-preview.component.htmlhas no lock marker at all — every row gets the samedot-contentlet-status-badge.So the user sees "Unlock (10) ⚠3", drills in, and has no way to tell which 3 rows to uncheck. The capability the preview exists to provide is not reachable.
Suggestion: use Content Drive's own table instead of a second hand-rolled one.
DotFolderListViewComponent(@dotcms/portlets/content-drive/ui, exported fromui/src/index.ts) already renders the lock state per row:…alongside the checkbox column,
dot-content-thumbnail,dot-contentlet-status-badge, type and language. The preview component's own header comment says "Column markup follows the main grid (dot-folder-list-view) so a row reads the same in both places" — it is deliberately reproducing that component, and the one column it dropped is the column this finding needs. Reusing it gets the marker for free and removes the drift risk between the two tables.Two honest caveats, both small and both in the
uilib:[(selection)]="selectedItems"against an untyped internal field (selectedItems = [],:189), with an effect at:308that clears it whenever$items()changes. The preview needs the parent to own the included set, so this wants aselectioninput (and adisabledinput for the in-flight state) added toDotFolderListViewComponent. That effect would also need to not stomp a caller-provided selection.item.lockedalone is not the right signal. It says "locked", not "locked by someone else", so the marker has to key off whateverwarnWhensettles on in the sibling comment above — otherwise the icon flags all 10 rows instead of the 3 that matter.If that is more than you want in this PR, the smaller version is to add the marker to the existing preview table and keep the two in sync; but given the preview is already a copy of
dot-folder-list-view, reusing it looks like the cheaper end state.