Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BE: Hide the Description field in VA footer menu UIs #14793

Closed
3 tasks done
randimays opened this issue Aug 15, 2023 · 8 comments
Closed
3 tasks done

BE: Hide the Description field in VA footer menu UIs #14793

randimays opened this issue Aug 15, 2023 · 8 comments
Assignees
Labels
backend Drupal engineering CMS team practice area non-quarter-prio (PW) not related to quarterly priorities Public Websites Scrum team in the Sitewide crew sitewide VA.gov Footer CMS managed product owned by Public Websites team

Comments

@randimays
Copy link
Contributor

randimays commented Aug 15, 2023

Description

In the CMS for the VA footer (both columns and bottom rail), the Description field is used with help text above that reads Shown when hovering over the menu link. This is inaccurate; DSVA does not support using tooltips (link hover behavior) for accessibility reasons.

We should remove or update this text to more accurately reflect what this description field can be used for.

In the case of the VA footer, we will not be relying on this field at all (even though it is filled out for most, if not all of the current footer links). We are updating the footer code to pull the Title field instead, which is more accurate.

User story

AS A CMS editor
I WANT the Description field to be hidden since it's not used
SO THAT I don't mistakenly use it.

Engineering notes / background

Leverage scaffolding for this approach that we already used on menus driving homepage Hub list.: docroot/modules/custom/va_gov_home/src/EventSubscriber/FormEventSubscriber.php

Analytics considerations

Quality / testing notes

Acceptance criteria

  • Description field is hidden from Drupal footer links menus
    • VA.gov Footer bottom rail menu
    • VA.gov Footer menu
@randimays randimays added Drupal engineering CMS team practice area Needs refining Issue status Public Websites Scrum team in the Sitewide crew labels Aug 15, 2023
@wesrowe
Copy link
Contributor

wesrowe commented Aug 15, 2023

This needs "design" on new help text – @thejordanwood or I can probably come up with something once we understand what the Description field is really used for.

@thejordanwood
Copy link

Since the description field is currently not needed, the team has decided that it's best to hide the field to avoid any confusion.

Slack thread where the decision was made.

@wesrowe wesrowe added the VA.gov Footer CMS managed product owned by Public Websites team label Aug 18, 2023
@wesrowe
Copy link
Contributor

wesrowe commented Aug 18, 2023

Ticket body is updated consistent with decision above. @dsasser @chri5tia, assigned to you for async refinement.

This was referenced Aug 23, 2023
@wesrowe wesrowe removed the Needs refining Issue status label Aug 24, 2023
@wesrowe wesrowe changed the title BE: Remove or edit the Description field help text used by VA footer BE: Hide the Description field in VA footer menu UIs Aug 29, 2023
@chri5tia
Copy link
Contributor

chri5tia commented Sep 1, 2023

Strategy

I plan to create an array of menu link forms by ID and populate it with the footer and bottom rail form IDs.
This array can be used in the future for other menu forms easily.
I will create a function called removeMenuLinkDescription(), not specific to footers so that it can be used by other menus.
The function will use hook_form_alter() to remove the Description field before rendering.

It'll have to be added to the formAlter() function that already exists for the va_gov_home event subscriber.

I will leave the field exposed to admins because there is content in the field, in case it needs to be removed.
I will change the help text of that field to reflect that it should not be used/that it is deprecated.

@dsasser
Copy link
Contributor

dsasser commented Sep 1, 2023

Strategy

I plan to create an array of menu link forms by ID and populate it with the footer and bottom rail form IDs. This array can be used in the future for other menu forms easily. I will create a function called removeMenuLinkDescription(), not specific to footers so that it can be used by other menus. The function will use hook_form_alter() to remove the Description field before rendering.

It'll have to be added to the formAlter() function that already exists for the va_gov_home event subscriber.

I will leave the field exposed to admins because there is content in the field, in case it needs to be removed. I will change the help text of that field to reflect that it should not be used/that it is deprecated.

Overall this should work fine. I do have some thoughts/suggestions:

  • Create a new module, va_gov_menu (or something similar)
  • In that module, create a trait (or service) that any module can use, and add the new removeMenuLinkDescription() method there.
  • Move the hubMenuHideAddtributes(), hubMenuHideExpanded(), hubMenuHideViewMode(), and hubMenuHideParentLink() methods from Drupal\va_gov_home\EventSubscriber into the new service/trait.
  • In va_gov_menu, add an event subscriber that will respond to the menu IDs (using the array as you suggested)
  • Leverage the trait to make the changes to the menus.

@chri5tia
Copy link
Contributor

chri5tia commented Sep 9, 2023

ACs are met. I decided to table the work to make this extendable to other menus for now until it's needed and focus on other work.
main...chri5tia:va.gov-cms:VACMS-14793-Hide-Footer-Description-Field-B-Service

@chri5tia
Copy link
Contributor

Not sure what happened but the PR doesn't seem to be attached anymore. This still needs a review: #15069

@wesrowe
Copy link
Contributor

wesrowe commented Sep 23, 2023

just noticed this one might be languishing – thought I'd call it out so there's not a rush to close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Drupal engineering CMS team practice area non-quarter-prio (PW) not related to quarterly priorities Public Websites Scrum team in the Sitewide crew sitewide VA.gov Footer CMS managed product owned by Public Websites team
Projects
None yet
Development

No branches or pull requests

6 participants