Skip to content

Fix non menu-item button styles in dropdowns

Simon Knox requested to merge psi-drop-butts into master

What does this MR do and why?

At first there was a dark mode bug. The hover style of the Apply suggestion button had black text.

There are some inherited styles for dropdown buttons, which we don't want for other buttons. Have instead only style direct children of lis. There could still be some false positives, but this should avoid a lot of unwanted button styles

Screenshots or screen recordings

before after light mode (same)
Screenshot_2022-11-23_at_12.23.36_pm Screenshot_2022-11-23_at_2.46.56_pm Screenshot_2022-11-23_at_12.27.55_pm

How to set up and validate locally

  1. Apply a suggestion to a diff
  2. Hover the button
  3. Check for regressions with every other dropdown with links or buttons in it 😅

Risks

The main risk is losing styles on buttons that aren't direct descendants of an li inside a dropdown. The > doesn't increase specificity, so we aren't adding any new styles, but only reducing the number of elements we apply this rule to.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Simon Knox

Merge request reports

Loading