-
-
Notifications
You must be signed in to change notification settings - Fork 223
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: Highlevel Workspace API #4943
Conversation
… in workspacePublisher
…rojection´ in WorkspacePublisher
…eligible for publish/discard
This commit MUST be removed before merging PR #3752
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.
Really good idea to coordinate these tasks in a central place!
Just did a first pass and added some nitpicky comments. Apart from those I have a couple of questions/suggestions:
- I struggle a bit with the naming of the commands, e.g.
DiscardDocument
does not really discard any document. Should we suffix those with "*Changes", e.g.DiscardDocumentChanges
? - Out of scope but looking at the code I was thinking: Shouldn't most projections work with workspace names instead of cs ids eventually? E.g.
$changeFinder->findByContentStreamId($contentStreamId);
should become$changeFinder->findByWorkspaceName($workspaceName);
at some point. This would mean some more workspace<->csid tables but the logic is pretty simple and we would not have to rely on theWorkspaceFinder
everywhere (i.e. the workspace projection would be used only to manage workspaces really)
WorkspacePublisher shouldn't be an extension point. Co-authored-by: Bastian Waidelich <[email protected]>
EDIT: Regarding the naming of the commands (as raised by @bwaidelich), I'd opt for:
...to clarify that it's not only about changes to the respective node itself. |
@grebaldi shouldn't the check in |
You are correct, of course. My assessment was wrong. I could swear I've seen this behavior during the UI implementation, so I was a bit too quick on deducing this to be the cause 😅. I just tested this again, and it works correctly. Don't mind my observation from above. |
... and make exposing `WorkspaceName` more explicit
Task/publishing bonanza review
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.
get* implies a no-op, which potential creation is not. Either we switch to getOrCreate or something neutral like provide*
True that. Was inspired by the ContentRepositoryRegistry where its |
Mmh, not sure, retrieve sounds like it is already there and just has to be brought. |
I think provideFor* makes the most sense, especially later for provideForCurrentUser. Also, that's what providers do, just like Finders find* stuff and Factories build* stuff. |
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.
+1 by reading, loving it!
EDIT: Most parts of the api have been overhauled again with #5146
This provices a high level workspace model to be used e.g. by the Neos UI.
(see neos/neos-ui#3752)
Its purpose is to explicitly cover Neos' intentions of publishing, being publishing / discarding whole documents or sites. This is implemented as explicitly named methods that can be used by the UI. Internally it relies on the change finder projection, which is properly filled with above UI change.