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

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

Conversation

alexandrevryghem
Copy link
Member

@alexandrevryghem alexandrevryghem commented Apr 4, 2024

References

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 there too can be handy to be able to quickly check that you selected the correct collection. Currently the URLs like /submit?collection={uuid} still don't have breadcrumbs because they are almost instantly redirected to /workspaceitems/{id}/edit, but this might still be handy to have this for slower servers

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

  • 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.
  • My PR passes ESLint validation using yarn lint
  • My PR doesn't introduce circular dependencies (verified via yarn check-circ-deps)
  • My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
  • My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
  • 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.
  • If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

@alexandrevryghem alexandrevryghem self-assigned this Apr 4, 2024
@alexandrevryghem alexandrevryghem added bug component: Item (Archived) Item display or editing component: Community Community display or editing component: Collection Collection display or editing claimed: Atmire Atmire team is working on this issue & will contribute back labels Apr 4, 2024
Copy link

github-actions bot commented Apr 4, 2024

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

…ssing-breadcrumbs_contribute-main

# Conflicts:
#	src/app/collection-page/collection-page-routes.ts
#	src/app/community-page/community-page-routes.ts
#	src/app/core/breadcrumbs/community-breadcrumb.resolver.ts
#	src/app/core/breadcrumbs/dso-breadcrumb.resolver.spec.ts
#	src/app/core/breadcrumbs/dso-breadcrumb.resolver.ts
#	src/app/core/submission/resolver/submission-object.resolver.ts
#	src/app/workflowitems-edit-page/item-from-workflow.resolver.spec.ts
#	src/app/workflowitems-edit-page/item-from-workflow.resolver.ts
#	src/app/workflowitems-edit-page/workflowitems-edit-page-routes.ts
#	src/app/workspaceitems-edit-page/item-from-workspace.resolver.spec.ts
#	src/app/workspaceitems-edit-page/item-from-workspace.resolver.ts
#	src/app/workspaceitems-edit-page/workspaceitems-edit-page-routes.ts
…to w2p-112970_added-missing-breadcrumbs_contribute-main

# Conflicts:
#	src/app/collection-page/collection-page-routing.module.ts
#	src/app/community-page/community-page-routing.module.ts
@kanasznagyzoltan
Copy link

kanasznagyzoltan commented Apr 18, 2024

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 ✅
image

Clicked on New → Collection
Breadcrumbs visible when creating new Collection ✅
image

Clicked on New → Item
Breadcrumbs visible when creating new Item ✅
image

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

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

@tdonohue tdonohue added this to the 8.0 milestone Apr 19, 2024
@tdonohue tdonohue added the port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release label Apr 19, 2024
Copy link
Member

@tdonohue tdonohue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thanks @alexandrevryghem ! Verified this provides a much better experience. Breadcrumbs now shown in submission/workflow, and on all create forms. Everywhere else they work as normal. I've added the port to dspace-7_x label to this PR as this would likely be good to port to 7.x as well, if possible to do so.

@tdonohue tdonohue merged commit 489d8fd into DSpace:main Apr 19, 2024
13 checks passed
@dspace-bot
Copy link
Contributor

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

@tdonohue
Copy link
Member

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.

@alexandrevryghem alexandrevryghem deleted the w2p-112970_added-missing-breadcrumbs_contribute-main branch April 19, 2024 22:16
@alexandrevryghem alexandrevryghem removed the port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release label Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug claimed: Atmire Atmire team is working on this issue & will contribute back component: Collection Collection display or editing component: Community Community display or editing component: Item (Archived) Item display or editing
Projects
No open projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Missing breadcrumbs on comcol create pages
4 participants