Conversation
|
I know this is still a Draft, but just wanted to note that I just merged #578 , so this can be rebased to make it a bit smaller / easier to start reviewing. |
15f5379 to
f67387e
Compare
tdonohue
left a comment
There was a problem hiding this comment.
Just a quick note. I gave this an early code review today, and mostly it looks good (one tiny comment inline). I did notice that almost all new classes/methods are either missing TypeDocs or have somewhat incorrect TypeDocs (but, I didn't call those out specifically, as you said you were working on them).
I haven't had a chance to test this yet, but will do so tomorrow. Thanks!
|
|
||
| export function getItemEditPath(id: string) { | ||
| return new URLCombiner(getItemModulePath(),ITEM_EDIT_PATH.replace(/:id/, id)).toString() | ||
| return new URLCombiner(getItemModulePath(), ITEM_EDIT_PATH.replace(/:id/, id)).toString() |
There was a problem hiding this comment.
Tiny comment here...it looks like you've removed the :id from ITEM_EDIT_PATH below, so it seems like the .replace() on this line likely isn't needed.
tdonohue
left a comment
There was a problem hiding this comment.
@LotteHofstede : Gave this a code review today, and overall it looks good. Just a few inline comments requesting missing TypeDocs in a few files.
I also tested this, and overall, it works as described. However, there were some unexpected behaviors that I ran into:
- For pages that don't really have defined breadcrumbs, the default seems to be for a (disabled) grayed out "Home" to appear. For example, this is what I see when starting a new Submission (
/submit). Also visible on Registry pages (/admin/registries/metadata), etc. This empty breadcrumbs isn't really useful. I expect either the breadcrumb bar shouldn't exist on those pages, or it should have something likeHome / New Submissionfor a new Submission, etc.- This need not necessarily be fully fixed in this PR. We could simply hide this breadcrumb bar by default if no defined breadcrumbs exist. A future PR could add breadcrumbs to more pages.
- Breadcrumbs for Communities/Collections work on the default Community homepage or Collection Homepage. But, they disappear if I click a Browse by link (e.g. "By Title" or "By Issue Date") . This is likely because the Browse by links change the URL to
/browse/[type]?scope=[uuid]from the default of/communities/[uuid]. - Occasionally, I see a weird delay where the breadcrumbs don't load immediately. I haven't been able to reliably reproduce this though (and it could be my dev environment acting up). But, sometimes I'll go to an Item page and the breadcrumb just says "Home"...then a few seconds later, it fills out the Community/Collection hierarchy. This is just a note...not sure if it's reproducible though.
- Just my opinion, but I think the breadcrumb bar is slightly too tall. The text could be made smaller so that it's not as tall. This is a very minor thing though that could be cleaned up in CSS later (not required for this PR)
atarix83
left a comment
There was a problem hiding this comment.
Thanks @artlowel for this PR
I had a look to the code and it seems good to me.
I tested over DSpace/DSpace#2673 and I only have a doubt on how shoul be the right behavior on the page not related on a DSO.
For example if i'm on the the mydspace page in the breadcrumbs there is only the home label that is not active and clickable.
What should be the right behavior on these pages?
|
Thanks @tdonohue for your feedback! I'll address your issues in a similar list:
|
tdonohue
left a comment
There was a problem hiding this comment.
👍 Thanks @LotteHofstede for your improvements to this PR. I've retested (and re-reviewed) and in my opinion this looks good enough to merge (as soon as the REST implementation DSpace/DSpace#2673 is also ready).
As you noted there are some further improvements we could make in future PRs, but this works as-is. I no longer see the empty breadcrumbs (the grayed out "Home") anywhere (resolving my point 1 in previous feedback). The Breadcrumbs for Community/Collections now work properly when a "browse by" link is clicked on (resolving my point 2 in previous feedback).
I agree with you that it's better to load breadcrumbs asynchronously (which resolves my point 3 in previous feedback). Finally, we can clean up styling in a later PR. This looks good for now!
This PR adds breadcrumbs to DSpace. It depends on #578 and DSpace/DSpace#2673
There are two types of breadcrumbs at the moment:
breadcrumb.'and resolved to a messageresolve: {breadcrumb: I18nBreadcrumbResolver}, data: {breadcrumbKey: 'i18n.string.to.use.as.key'}resolve: {breadcrumb: ItemBreadcrumbResolver}TODOs