Closed (fixed)
Project:
Experience Builder
Version:
0.x-dev
Component:
Page builder
Priority:
Minor
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
6 Mar 2025 at 13:44 UTC
Updated:
24 Mar 2025 at 15:39 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #2
lauriiiThis has a soft dependency on #3511412: Add a local task to edit XB Page content entities
Comment #3
gábor hojtsy1. So the icon seems to be hardwired to the database icon in core? The Home node on xb-demo also has a db icon:
The code is in
Drupal\navigation\Plugin\TopBarItem\PageContext:2. For the edit button, the
Drupal\navigation\Plugin\TopBarItem\PageActionsplugin has this code:I was not sure why this does not end up being featured, because the route IS
entity.xb_page.edit_formwhich matches the core pattern and the pattern expected here. Theentity.xb_page.canonicalis the canonical view route, so it should get to the pattern match. Then I found that the local action name is not the same as the route name, so that is it. Once again a one line fix :D Will submit a MR to XB here for that.The icon is harder I think since core just hardcoded the db icon.
Comment #5
gábor hojtsyThis one line fix MR makes the edit button show as expected :)
Comment #6
gábor hojtsyFor the DB icon, I'm trying to figure out how to alter the SDC component specified in the top bar context plugin code. Cited in #3 above. I did not find generic alter/preprocess hooks for plugins like this, neither components. Eg. https://www.drupal.org/docs/develop/theming-drupal/using-single-director... documents this use of SDCs but provides no guidance on altering.
I tried some tips from chatgpt which turned out to be hallucinations :) Also searched the API docs and general google but did not turn up much. That said, I expect this is something simple but I can't see it :D
Comment #7
wim leersI don't understand why #5's one-line fix was not done as part of #3511412: Add a local task to edit XB Page content entities. Or at minimum, if that had been tagged as a blocker for this, this would've been caught before that landed. 😅
🤪 — this seems like a straight up bug in
PageActions::getFeaturedPageActions(), then. Local task (plugin) IDs have to be unique, but have no other naming requirements. That's why\Drupal\Core\Menu\LocalTaskManager::getLocalTasksForRoute()only look at the route name, not the (local task plugin) ID.🐛 IOW: this is a bug in
::getFeaturedPageActions. It doesn't exist in11.1.xwhich we're developing XB against; it only exists in the11.xbranch. It was added in #3484575: Move the Edit button outside the more actions drop down.XB could fix it here, but … then the same problem will occur for other contrib/custom (content) entity types!
Tagging , not to block this MR on it being fixed, but to ensure a follow-up in the
navigation.moduleissue queue component is created before this lands. 🙏Comment #8
wim leersComment #9
lauriiiWhere should we fix the bug that the button is rendered with black text? It seems to be caused by Gin.
Comment #10
gábor hojtsy1. Re black edit button @lauriii:
It is perfectly fine if we don't install the gin toolbar module, which is a sensible choice if we use the core top bar :)
Gin toolbar enabled (but not used):
Gin toolbar not even enabled (note not only button white text but button placement is nicer):
Opened https://github.com/phenaproxima/xb-demo/issues/24 to fix that in the demo.
2. Re navigation followup issue @wimleers:
Opened #3511612: Local task name expectation in getFeaturedPageActions is fragile for determining Top Bar featured actions.
3. Re the icon:
After various Slack discussions, navigation module does not have a way to customize that and SDC's don't have altering or preprocess functionality to change it. I'm not sure we should hold up the Edit button fix (which is pretty fundamental, it exposes the first visible way to enter XB ever). So should we rescope this issue or open yet another one under this? :)
Comment #11
wim leersThat's hardcoded somewhere in core's experimental
navigation.module, then? If so, AFAICT that's another thing that can only happen upstream? 😅That'd mean two follow-ups:
Comment #12
gábor hojtsyI think the one line MR here can happen without waiting on upstream and its a quite crucial piece of UI to expose ASAP :) Should I open a separate issue and postpone this on that or should we repurpose this issue?
The icon problem is indeed larger and will take more time.
Comment #13
wim leers+1!
Neither: two new issues, as described in XB, and as soon as those exist, I'll land this MR. I'm insisting on those issues to be created first, just to make sure we don't forget to follow through 😊
Comment #14
gábor hojtsyOpened #3511948: Icon in navigation top bar cannot be customized for lack of icon API.
Comment #15
gábor hojtsyOpened #3511951: [upstream] [PP-1] Document icon should show when viewing Experience Builder pages in 11.2's experimental Navigation Top Bar for lack of customization of the icon in XB.
Retitled and updated IS for the narrower scope here, so this can be merged then.
Comment #16
wim leersThanks!
I want the commit message to stress that this is XB supporting an experimental core feature.
Comment #18
wim leersComment #19
wim leers