- Issue created by @ckrina
- ๐ฎ๐ณIndia prashant.c Dharamshala
Prashant.c โ made their first commit to this issueโs fork.
- Status changed to Needs review
about 1 year ago 6:34am 13 December 2023 - ๐ฎ๐ณIndia prashant.c Dharamshala
Attempted to explore a solution using the "/admin/structure/menu/manage/account" menu to display user menu links. By default, it only presents two menu links: "My account" and "Logout" (or "Login" for anonymous users).
The menu links supplied by the toolbar are also hardcoded in thecore/modules/user/src/ToolbarLinkBuilder.php
file:- View profile
- Edit profile
- Log out
I would appreciate hearing your thoughts on this approach.
Thanks!
- Status changed to Needs work
about 1 year ago 10:54am 13 December 2023 - ๐ช๐ธSpain ckrina Barcelona
Ah, good point @Prashant.c! I didn't know the Toolbar was using hard-coded links now. We need the 3 links we have right now in the Toolbar:
- A way to view the profile
- A way to edit the profile, which right now is going into the form
- A way to log out
So I would say then using those hard-coded links in the new navigation makes sense. Would it be a way to integrate this existing core code into this navigation and print those 3 links? If that was possible it would be logic that we would get rid of in this module and move it into core. We could change the naming of
ToolbarLinkBuilder.php
if needed, but we're actually working on a toolbar and naming it Toolbar too so it might not even be needed.What I would try to do then also is using the existing user name (like "admin" for example) as the value of the parent item, that right now has the "User".
Thank you!
- ๐ฎ๐ณIndia prashant.c Dharamshala
An alternative method involves retrieving menu links directly from the
user
module by utilizing theuser.toolbar_link_builder
service.
We can explore these strategies, or if you have alternative plans for implementation, we can discuss those as well.Thanks
- Status changed to Needs review
about 1 year ago 12:02pm 13 December 2023 - ๐ฎ๐ณIndia prashant.c Dharamshala
What I would try to do then also is using the existing user name (like "admin" for example) as the value of the parent item, that right now has the "User".
I have done it, you might want to review the modifications in the most recent commit.
Thanks - ๐ช๐ธSpain ckrina Barcelona
I think this I was looking for exactly! Thank you! I'll RTBC it but it would be great to get a back-end dev to review the code :)
- Status changed to RTBC
about 1 year ago 3:02pm 13 December 2023 - Status changed to Needs work
about 1 year ago 2:45pm 15 December 2023 - ๐ช๐ธSpain ckrina Barcelona
Changed the status to NW per @larowlan's feedback. Please change it back to NR if the changes have been made.
- Status changed to Needs review
about 1 year ago 3:04pm 15 December 2023 - ๐ฎ๐ณIndia prashant.c Dharamshala
@ckrina
Changes have already been made yesterday https://www.drupal.org/project/navigation/issues/3408260#mr149-note242559 ๐ Print the real User account menu in the footer Needs review
Thanks
- Status changed to Needs work
about 1 year ago 4:36pm 15 December 2023 - ๐จ๐ฆCanada m4olivei Grimsby, ON
I've added some feedback in the PR.
It looks like @larowlan's feedback was all addressed. I made some additional comments, mostly with respect to keeping the existing nameing and strucutre of the theme hook (
menu_region__footer
) as close to what it already is as possible. - Status changed to Needs review
about 1 year ago 5:06am 16 December 2023 - ๐ฎ๐ณIndia prashant.c Dharamshala
@m4olivei, appreciate your review. I've taken care of all the comments you provided. Updating the issue status to NR once more. Thanks.
- Status changed to RTBC
about 1 year ago 3:26pm 18 December 2023 - ๐จ๐ฆCanada m4olivei Grimsby, ON
Looks great! Thanks for that changes @Prashant.c. Also noting that all of @larowlan's requested changes seem to have been incorporated as well.
This is RTBC for me.
- Status changed to Fixed
about 1 year ago 11:29am 19 December 2023 - ๐ฆ๐บAustralia larowlan ๐ฆ๐บ๐.au GMT+10
ckrina โ credited larowlan โ .
- ๐ช๐ธSpain ckrina Barcelona
Thank all, fixed!
Just a small suggestion if I may ask: it would make my life way easier that when a thread is resolved it is marked as so on a MR, so then I'm sure it's done (since it's not as easy for me to review back-end code) :)
- ๐ฎ๐ณIndia prashant.c Dharamshala
@ckrina Sure, we will do that.
Thank you.
- Status changed to Fixed
12 months ago 1:59pm 2 January 2024 Automatically closed - issue fixed for 2 weeks with no activity.