department-of-veterans-affairs / va.gov-cms

Editor-centered management for Veteran-centered content.
https://prod.cms.va.gov
GNU General Public License v2.0
99 stars 69 forks source link

Reduce "Parent Link" dropdown on VAMC Detail Pages based on Section #11790

Open davidmpickett opened 1 year ago

davidmpickett commented 1 year ago

Describe the defect

As a CMS editor assigned to multiple sections, I need to properly place VAMC Detail Pages into the appropriate spot in the menu hierarchy.

However, the drop-down menu for Parent Link under Menu Settings loads every single menu item from every VAMC system in sections I'm assigned to, so I can not tell at a glance if I am assigning a page to the correct menu. I may accidentally place it under the correct parent (e.g. Programs) but the wrong grandparent (e.g. VA Minneapolis).

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://staging.cms.va.gov/
  2. Log in as Jackie.Stevenson@va.gov
  3. Click VA St Cloud health care under section
  4. Set Content Type to VAMC Detail Page
  5. Click Apply
  6. Edit any VAMC Detail Page (e.g. Yellow Pages edition 2)
  7. In the right hand column go down to the Menu Settings and use the Parent link drop-down
  8. See "menu of doom"

Screenshot 2022-12-02 145600

menu_of_doom


Additional example

Drupal Admins (like the help deskers) have to confront an even larger menu of doom when assigning new VAMC facilities to the appropriate place in the system menu. Ideally fixing this for VAMC Detail Pages would fix it for VAMC Facilities.

menu_of_extra_doom

AC / Expected behavior

davidmpickett commented 1 year ago

May or may not be similar to #11069

JayDarnell commented 1 year ago

11069 does have some similarities. In that instance we didn't remove the option to select a bad choice up front, we merely throw an error if an invalid combination was selected. For this issue I believe our goal is to narrow down the available parent link options based on the section selected before the editor can make a bad selection. We would need a javascript solution for this to work on the fly. It would need to be smart enough to allow the user to change their mind.

It may need to start by grabbing the contents of the select list on page load and storing it, then removing anything from the list not under the matched item, then updating if the user changes their mind and chooses another section.

JayDarnell commented 1 year ago

@swirtSJW I'd like to discuss this with you at some point.

davidmpickett commented 1 year ago

Originally raised here: https://github.com/department-of-veterans-affairs/va.gov-cms/issues/5471

davidmpickett commented 1 year ago

Not sure if any part of the solution for Lovell can be reused here https://github.com/department-of-veterans-affairs/va.gov-cms/issues/12303

kmariepat-cityfriends commented 1 year ago

You can't see which system you are under when you are looking at this list, example user is in description. Updates for admins who are viewing as well

jilladams commented 1 year ago

From refinement:

kmariepat-cityfriends commented 1 year ago

this should be completed alongside, based on the solution: #12884

Agile6MSkinner commented 4 months ago

@davidmpickett Do you think an engineer would be able to action this or is this more of an exploratory ticket?

davidmpickett commented 4 months ago

@Agile6MSkinner I just refined this to be clearer and actionable. Would still need a review from Drupal engineer before picking up.