Problem/Motivation

In #3411099: Create an administration UI for managing Navigation Blocks we allow for the user to manage both the content and footer regions of the navigation bar. Allowing management of the footer region can lead to some strange side effects that we don't want to have to account for.

Proposed resolution

Restrict configuration of the toolbar footer items. Users should only be allowed to manage the content region of the navigation through the UI.

Remaining tasks

Code implementation. Lets leave in logic that allows for management of multiple regions, but effectively only allow for management of the content region in the UI.

User interface changes

Remove the ability to manage the footer region. Hide the region selector and the "Content" title, anything to simplify the UI now that there is only one region to manager from the users perspective.

Issue fork navigation-3412119

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

m4olivei created an issue. See original summary.

Prashant.c made their first commit to this issue’s fork.

prashant.c’s picture

Status: Active » Needs review
prashant.c’s picture

Issue summary: View changes
m4olivei’s picture

Status: Needs review » Needs work
StatusFileSize
new71.18 KB

Thanks @Prashant.c. Couple things.

1. Lets hide the region column on the Navigation section UI, since there is only once choice. Probably change the form element to a '#type' => 'value'.

2. Other note I left as a MR comment wrt the entity form.

prashant.c’s picture

@m4olivei

As soon as Iam changing the form element from "select" to "value" or something else the tabledrag stops working, not able to drop items and JS error The navigation section cannot be placed in this region.

Any ideas?

m4olivei’s picture

Nothing immediately comes to mind, I would have to play with it. May get time for that next week. No rush, would like to see #3411099: Create an administration UI for managing Navigation Blocks land first anyway.

prashant.c’s picture

I'm thinking whether it's okay to use CSS here to hide the label and select list for regions.

m4olivei’s picture

Status: Needs work » Needs review

I'm thinking whether it's okay to use CSS here to hide the label and select list for regions.

I don't think that's a great idea, you still have the form value you need to deal with on the back end.

I've pushed a couple of commits. First to remove the region column from the Navigation Section admin UI. That comes with necessary adjustments to the #tabledrag config and Javascript handling that we no longer need. Second, to change the #type select to #type value on the NavigationSectionForm.

I believe that puts us in a good place here. @Prashant.c, please review.

As we discussed in Slack, we will hold off on merge here until the main issue (#3411099: Create an administration UI for managing Navigation Blocks) is resolved and merged to 1.x.

m4olivei’s picture

I needed to rebase the branch against 1.x of the navigation module. I also needed to open a new MR (linked in the ticket description) b/c Gitlab wouldn't let me det the target fork for the MR that @Prashant.c opened. I've closed that one.

@Prashant.c if you could review, that would be wonderful!

m4olivei changed the visibility of the branch 3412119-restrict-configuration-of to hidden.

m4olivei changed the visibility of the branch 3412119-restrict-configuration-of to active.

ckrina’s picture

Status: Needs review » Fixed

Merged! Thanks for the work!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.