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
98 stars 69 forks source link

"Why can't i edit this content" contextual help text for centralized content #4017

Closed swirtSJW closed 3 years ago

swirtSJW commented 3 years ago

As an editor of local Policies content, i have contextual help explaining the purpose of national content, and why i can't edit it, on the form page and the view page

2020_Policies_top_task_forms___2020_VA_gov___CivicActions___Balsamiq_Cloud.png

2020_Policies_top_task_forms___2020_VA_gov___CivicActions___Balsamiq_Cloud.png

ACs

Implementation

kaise-lafrai commented 3 years ago

@kevwalsh @rachel-kauff Question: Do we want the tooltip to display the help text on hover or when either the icon or the "Why Can't I Edit This?" is clicked? USWDS tooltip component uses hover and that's what I have "working" right now.

kaise-lafrai commented 3 years ago

@rachel-kauff Is the "Why Can't I Edit This?" text required? Should we just display the icon and put the "Why Can't I Edit This?" text within the help text on hover?

rachel-kauff commented 3 years ago

@kaise-lafrai cc: @kevwalsh Your question prompted me to reconsider whether we needed the 'Why can't I edit this' label,' so I experimented with removing it. I think we don't need it after all. I revised the OG wireframe, and included a screenshot below.

WRT the behavior of the icon: I think it should display on mouse and keyboard hover.

Screen Shot 2021-01-26 at 8 25 06 AM
kaise-lafrai commented 3 years ago

@kevwalsh I am having some difficulty getting things to look right with the "policy" fieldset title. Placing an <h2> tag around the{{ legend.title }} causes some bad overlapping to occur with content below it.

Do we want all fieldset titles to be an h2 everywhere or only the Policy title?

kevwalsh commented 3 years ago

@kaise-lafrai it's just the Policies string.

last week when we talked about this, we also discussed the option of moving the string into a markup field in the content type, displayed as the first field int that fieldset, on the form.

kaise-lafrai commented 3 years ago

Let me try that. Thanks

kaise-lafrai commented 3 years ago

@kevwalsh @rachel-kauff Hello - This is ready for design review here: https://pr4124-lzaiknstma0lmzpmyw4qkjeuptguskhi.ci.cms.va.gov/node/add/vamc_system_policies_page

I still have a little more code cleanup to do before sending it over for code review.

kaise-lafrai commented 3 years ago

@kevwalsh H1 is not an allowable option for the markup wysiwyg!

rachel-kauff commented 3 years ago

Looking at USWDS guidance on tooltips and am wondering if what we have currently is violating this guidance:

Don’t block content. Use the data-position attribute to prevent the tooltip from covering other page elements.

I recommend having the balloon display on the right side (currently it's on the left, and covers the content).

rachel-kauff commented 3 years ago

Like this: Screen Shot 2021-01-28 at 4.25.22 PM.png

swirtSJW commented 3 years ago

@rachel-kauff That is an interesting detail, but I don't think we can completely win with that guideline. If we move it to the right, it will still block stuff in the right rail. image

I'm going to move this forward with what we have and we can iterate if it is important.