Review submission side panel #5630
Open
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.
Summary
This PR implements a "Review submission" side panel in the administration dashboard for administrators to either approve submissions to the Community Library or flag them for review.
review_submission_side_panel_demo.webm
I have manually tested the changes by creating a Community Library submission for the channel, reviewing the submission in the Review submission panel, and then verifying that the correct data appears when the panel is reopened. I repeated these steps both for approving and flagging a submission. Finally, I have checked that if the "Cancel" button is clicked while submitting the review, it is not submitted.
Detailed Changes
ReviewSubmissionSidePanelcomponentChannelItemcomponentStatusChipcomponent toCommunityLibraryStatusChipand moved it under the "shared" directoryCommunityLibraryStatusChipstyling so that it works correctly in the new contextCommunityLibraryResolutionReasonconstants objectAdminChannelViewSetto includepublished_data(this has already been included for the user viewset, just not for the admin one)fetchCollectionAsAdminandresolveAsAdminmethods to theCommunityLibrarySubmissionresourceuseFetchanduseLatestCommunityLibrarySubmissioncomposables under the "shared" directoryuseFetchuseLatestCommunityLibrarySubmissionto include an admin argument, which determines whether the user endpoint or the admin endpoint should be usedusePublishedDatacomposable touseVersionDetail; this fixes a discrepancy from fdd5a84 where the implementation was changed to use version detail, but the naming was kept the same. This is not directly related to this PR, but I am including this change because it caused me some confusion in understanding that the handling of published data has been changed.References
Resolves #5301
Reviewer guidance
The changes should be fully testable withing the UI: create a channel, publish it, submit it to the community library, and then interact with this submission via the Review submission side panel.
Notes / Unresolved Things
UI/UX
Technical Details