dspace-angular icon indicating copy to clipboard operation
dspace-angular copied to clipboard

Added missing/incomplete breadcrumbs on create community/collection/item pages

Open alexandrevryghem opened this issue 1 year ago • 1 comments

References

  • Fixes #2868

Description

Currently the create community & collection pages don't have any breadcrumbs this PR fixes this. The workspace item/workflow item forms also don't contain the whole parent comcol structure. Having this structure thee too can be handy to be able to quickly check that you selected the correct collection.

Instructions for Reviewers

List of changes in this PR:

  • Updated the CommunityBreadcrumbResolver to use the parameter name provided through the route data in the breadcrumbQueryParam property, to find the community/sub-community structure to which the sub-community/collection belongs.
  • Added a new I18nBreadcrumbResolver on the create community/collection route to display the text Create community/Create collection
  • Created a new SubmissionParentBreadcrumbResolver containing the logic of the new ItemFromWorkspaceBreadcrumbResolver & ItemFromWorkflowBreadcrumbResolver. These are the resolvers that will create the whole comcol parent structure based on the collection of the WorkspaceItem/WorkflowItem. This resolver also listens to ChangeSubmissionCollectionAction store dispatches in order to recreate the breadcrumbs when you change the collection of the workspace item.

Include guidance for how to test or review your PR.

  • Test that the create community/sub-community/collection pages have their correct breadcrumbs
  • Test that the new comcol structure is present on all the workspace/workflow item pages
  • Test that switching the collection of a workspaceitem automatically updates the breadcrumbs

Checklist

  • [x] My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
  • [x] My PR passes ESLint validation using yarn lint
  • [x] My PR doesn't introduce circular dependencies (verified via yarn check-circ-deps)
  • [x] My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
  • [x] My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
  • [x] If my PR includes new libraries/dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • [x] If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
  • [x] If my PR fixes an issue ticket, I've linked them together.

alexandrevryghem avatar Apr 04 '24 14:04 alexandrevryghem

Hi @alexandrevryghem, Conflicts have been detected against the base branch. Please resolve these conflicts as soon as you can. Thanks!

github-actions[bot] avatar Apr 04 '24 15:04 github-actions[bot]

My colleague (Miklós Sutya (QULTO) tested this PR. Checked out PR 2888. Logged in with admin user

Clicked on New → Community Breadcrumbs visible when creating new Community :white_check_mark: image

Clicked on New → Collection Breadcrumbs visible when creating new Collection :white_check_mark: image

Clicked on New → Item Breadcrumbs visible when creating new Item :white_check_mark: image

Clicked on Edit → Item Breadcrumbs visible when opening an item in Edit :white_check_mark: image

Moved an Item from one collection to another Breadcrumbs updated when item is moved :white_check_mark: image

kanasznagyzoltan avatar Apr 18 '24 11:04 kanasznagyzoltan

Backport failed for dspace-7_x, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin dspace-7_x
git worktree add -d .worktree/backport-2888-to-dspace-7_x origin/dspace-7_x
cd .worktree/backport-2888-to-dspace-7_x
git switch --create backport-2888-to-dspace-7_x
git cherry-pick -x 692bb991a051c9491769ba10db1425f1f9573849 60d93e653fac08dbaac87c0a5efa19581d259386 4251630ab86d1430f1cb45116097fa7d30d7d8d2

dspace-bot avatar Apr 19 '24 15:04 dspace-bot

As I expected, this wasn't able to port automatically to 7.x. So, this would need a manual port PR, if we chose to port it. If it's not easily possible, please let me know and we can simply leave this in 8.0 only.

tdonohue avatar Apr 19 '24 15:04 tdonohue