- Issue created by @mglaman
- 🇺🇸United States mglaman WI, USA
Okay, I think this jumps the shark a bit as we have no way to stage configuration changes.
Approach 1: base field on xb_page
- There is a new "hidden"/internal boolean flag on pages called homepage
- Mark as homepage actually toggles a base field, which goes to auto save
- On preSave we see if homepage === TRUE, change system.site and remove the value of homepageproblem: how to prevent marking multiple as homepage in autosave data?
Approach 2: make ApiPublishAllController aware of frontpage concept
- the concept of what would be the new homepage cannot live in the entity data
- needs to be part of staged config changescreate a one-off snowflake concept in AutoSaveManager to track changes for the homepage (system.site.path.front) only
- 🇺🇸United States effulgentsia
I think approach 1 is fine until we add Workspaces integration.
problem: how to prevent marking multiple as homepage in autosave data?
Do we need to? Why not just let the last save win?
- 🇺🇸United States mglaman WI, USA
Why not just let the last save win?
Perfectly acceptable to me!
- 🇺🇸United States mglaman WI, USA
CI is failing, but I'd rather get reviews on the approach before fixing.
- 🇺🇸United States mglaman WI, USA
I need to update the issue summary with changes on the approach from the MR
- 🇺🇸United States mglaman WI, USA
I pushed to the MR with changes to use AutoSaveManager for handling simple config changes. It's not 100% done but enough to review and validate as an approach.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
See review on MR; AFAICT this is blocked on ✨ Auto-save code components Active . Notified @tedbow over at #3500042-37: Auto-save code components → an hour ago.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
✨ Auto-save code components Active is in, and responded on the MR 👍
- 🇫🇮Finland lauriii Finland
But also now that I am thinking about. What happens if you delete the page you set as the home page?
We should not allow deleting the home page. User would have to assign another page as a home page before they could delete it. I'll let you decide if we should implement that here or in another issue.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
#16 seems reasonable to consider part of this issue from a UX POV, but I don't think it makes practical sense.
Because it would need to work generically, not just for the
Page
content entity type. Plus, it'd require no longer hardcoding the link in the UI. Wrote up a detailed plan at 📌 Disallow deleting an XB-enabled content entity if it's currently the homepage Active .The UI doesn't currently convey:
- that the currently viewed page is the current homepage
- that the currently viewed page is about to become the current homepage (thanks to auto-saving)
- which page in the list is the current homepage
I also think that the UI strings are quite confusing, which @tedbow also pointed out in the MR.
This is what it all currently looks like:
@mglaman has indicated these aspects are missing from the design.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Also, can we link the designs in the issue summary? 🙏
- 🇫🇮Finland lauriii Finland
We don't have full designs for this flow but attaching a design that shows how the homepage would look like in the navigator / top bar which addresses most of the concerns. The home icon should appear in the review changes panel too. We could open a follow-up to explore if we need to clarify this action in the review changes panel.
Let's focus on the deletion aspect in 📌 Disallow deleting an XB-enabled content entity if it's currently the homepage Active .
- 🇫🇮Finland lauriii Finland
I don't really understand the confirmation panel. What are we trying to warn the user about? I don't remember seeing designs with a confirmation panel. I understand that we have a confirmation panel for deleting a page since it takes place immediately. But since changing home page goes through the review changes I don't see why we need the warning.
Setting a draft page as home page would be fine since it would be published once we have 📌 Create an endpoint to publish all auto-saved entities Active . We need to think about archived content in relation to setting a home page once we implement support for that.
- Status changed to Needs work
7 days ago 4:56pm 10 April 2025 - 🇺🇸United States mglaman WI, USA
This ended up in my sprint and need to upload. But I think one of the remaining blockers was the missing 🏠 icon if a page/entity/whatever in the navigation has a path which matches system.site.path.front?
- 🇺🇸United States mglaman WI, USA
I've recreated the MR https://git.drupalcode.org/project/experience_builder/-/merge_requests/882
- First commit to issue fork.
- 🇺🇸United States mglaman WI, USA
I consider the MR is 90%. It needs review on the approach.