Use the Action link button style for Views setting modal buttons

Created on 31 March 2022, about 2 years ago
Updated 16 May 2024, about 1 month ago

Problem/Motivation

Modal windows on edit pages for a View currently employ three action buttons with an over dominant red delete button.

Steps to reproduce

- go to admin/structure/views/view/content
- click in the format section the settings link
- click in the fields section the content: node operations bulk form

Proposed resolution

The styling is based on the recommendation in #2 โœจ Use the Action link button style for Views setting modal buttons Needs work . According to @ckrina it should be tried to reuse the existing component of Action links like employed for node forms. In the following screenshots for the different states:

regular styling:

styling in focus:

styling on hover:

styling on hover and active:

โœจ Feature request
Status

Needs work

Version

11.0 ๐Ÿ”ฅ

Component
Claroย  โ†’

Last updated 3 days ago

Created by

๐Ÿ‡ฉ๐Ÿ‡ชGermany rkoller Nรผrnberg, Germany

Live updates comments and jobs are added and updated live.
  • Needs screenshots

    The change alters the user interface, so before and after screenshots should be added to document the UI change. Make sure to capture the relevant region only. Use a tool such as Aviary on Windows or Skitch on Mac OS X.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • The Needs Review Queue Bot โ†’ tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

    Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

    Consult the Drupal Contributor Guide โ†’ to find step-by-step guides for working with issues.

  • Status changed to Needs review over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Gauravvv Delhi, India

    Restoring status, seems unrelated failure.

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance nod_ Lille

    +1, retest is green

  • Status changed to Needs work over 1 year ago
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany rkoller Nรผrnberg, Germany

    thanks @gauravvv. i've successfully applied the patch provided in #17 โœจ Use the Action link button style for Views setting modal buttons Needs work to a drupal 10.1.x-dev installation. i can confirm that the point brought up in #16 โœจ Use the Action link button style for Views setting modal buttons Needs work got fixed. but i've just noticed one detail, an consistency in regards of the background color on focus i haven't noticed before. the remove button for the views modal has a grey background:

    while on a content type the button has no grey background on focus:

    i havent found a states section in the drupal design system: https://www.figma.com/file/OqWgzAluHtsOd5uwm1lubFeH/๐Ÿ’ง-Drupal-Design-system?node-id=553%3A0&t=2Zn0WS4heBBIxoTI-0 but i suppose the styling on the delete action link on a content type could be taken as the source of truth so the styling is consistent?

  • Status changed to Needs review over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Gauravvv Delhi, India

    1. I have removed the grey background on focus state.

    2. Also, I have updated the color of button on focus from #000 to #c11f1f, same as action-link--danger.

    I have added a patch and interdiff with #17. Please review

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Nayana Ramakrishnan

    Verified the patch #24 and tested it on Drupal version 10.1.x. The patch works fine and the issue mentioned in #23 โœจ Use the Action link button style for Views setting modal buttons Needs work is also fixed now. Have added the before and after screenshots for reference. RTBC+1

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany rkoller Nรผrnberg, Germany

    thanks @gauravvv. i've applied the latest patch in #24 โœจ Use the Action link button style for Views setting modal buttons Needs work and compared it with the action link on a content type another time.

    on focus the button text on the view turns black and turns back to red on hover again (see views.mp4). plus on hover (also if the button is in focus on hover) the background color remains the same. on the content type edit page the background color changes to a light red background. so basically there is currently no visually feedback for hover and or click events for the button. style changes for the active state aren't applied the changes for the hover state are not applied or use a different styling in part.

    i am not a developer and not familiar in depth with the code conventions but i wonder if it would make sense to use and apply the color variables for the active and hover states used on action links on the button as well?

    active:
    color: var(--color-maximumred-active) color
    background-color: var(--color-bgred-active)

    hover:
    color: var(--color-maximumred-hover)
    background-color: var(--color-bgred-hover)

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Gauravvv Delhi, India

    I have updated the patch per #26.
    1. Updated the trash icon on, normal, hover & active state.
    2. Updated the color and background color on hover and active state.
    3. Improved nesting of button selectors.

    Please review.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Gauravvv Delhi, India

    Restoring status, unrelated failure.

  • Status changed to Needs work over 1 year ago
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany rkoller Nรผrnberg, Germany

    thanks for updating the patch @gauravvv! i can confirm when hovered and clicked the button the styling for the hover and active state are applied correctly now. only for the combination of focus and hover there are two details left to note:

    1. when the button gets into focus the remove text gets black instead of remaining at var(--color-maximumred)
    2. on hover and still in focus the text gets red but doesnt have var(--color-bgred-hover) as background color but the background color gets overridden with var(--color-white)

  • Status changed to Needs review about 2 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Gauravvv Delhi, India

    Addressed feedbacks from #30. please review

  • Pipeline finished with Success
    about 2 months ago
    Total: 543s
    #160324
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia divya.sejekan

    Verified using MR-7840! - 3272614-use-the-action
    The changes are implemented in both D10.2 , D11

    Steps :
    1. Navigate to /admin/structure/views/view/content
    2. Click on any field

    RTBC ++

    Keeping for further reviews

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Kanchan Bhogade

    Hi
    I've tested MR !7840 on Drupal 11
    The MR is applied cleanly and changes are implemented and look good to me
    Adding Screenshots

    Steps :
    1. Navigate to /admin/structure/views/view/content
    2. Click on any field

    RTBC ++

    Keeping for further reviews

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany rkoller Nรผrnberg, Germany

    thanks @Gauravvvv that looks real good. i went in a last time and compared it against the action link on the edit page of a content type. the only minor nitpick i've just noticed cuz it is barely noticeable. per default the button has background: transparent; on focus the background gets changed to white background-color: var(--color-white);. the content type page has a white background but in the context of a dialog modal we have a greyish background here and focus should technically only adding an outline. so i wonder if it would make sense to change it to background-color: transparent;? cuz just striking background-color: var(--color-white); leads to a the regular grey button background color.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Gauravvv Delhi, India

    Yes make sense @rkoller. I have made the necessary changes in the MR.

  • Pipeline finished with Success
    about 2 months ago
    Total: 507s
    #160830
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany rkoller Nรผrnberg, Germany

    Thanks @gauravvvv! Looks good. I've updated the issue summary. Moved most of the parts from the problems section into the newly create proposed resolution section which was missing and reworded that part a bit and added examples for the different states for easier review. and i've also removed the needs design tag. aside that i dont see any other concern raised in the comments. looks good to go overall. i am just not sure if someone has to take another look at the code and if i am eligible setting it to rtbc since i've opened the issue?

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany rkoller Nรผrnberg, Germany

    accidently used the hover.jpg also for he stlying on hover and active example, replaced it with the correct hover_active.jpg

  • Status changed to RTBC about 2 months ago
  • ๐Ÿ‡ฆ๐Ÿ‡บAustralia sime Canberra

    I've checked all the "danger" buttons and they conform to the guidance in the issue summary and appear consistent and not broken.

    • FieldConfigEditForm (Field config edit form)
    • ProfileForm.php (Cancel account)
    • WorkflowTransitionEditForm.php
    • WorkflowStateEditForm.php

    I'm RTBC'ing this as it appears to be consensus in #2,#3 etc that this is a sound UX change, there are multiple people saying RTBC++, and the scope of the css chanage is only "danger" buttons which appear to be easily identified and checked.

  • Status changed to Needs work about 1 month ago
  • ๐Ÿ‡ซ๐Ÿ‡ทFrance nod_ Lille

    we can see in the screenshot from #23 that the padding is different in the dialog. Is there no way to avoid adding specificity to the .button--danger selector? BEM is supposed to prevent having to do that.

  • Status changed to Needs review about 1 month ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Gauravvv Delhi, India

    Addressed #41, I have removed the button danger specificity. UI is looking same as before. Please review

  • Pipeline finished with Failed
    about 1 month ago
    Total: 531s
    #166461
  • Status changed to Needs work about 1 month ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States smustgrave

    @Gauravvv you tagged for screenshots so moving to NW for those.

    May need a rebase also.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Mithun S Bangalore

    Mithun S โ†’ made their first commit to this issueโ€™s fork.

  • Pipeline finished with Failed
    about 1 month ago
    Total: 186s
    #174270
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Mithun S Bangalore

    Added a rebase for the PR which was raised.

Production build 0.69.0 2024