Use modernized classes for Djblets config forms list items and actions.

Review Request #11009 — Created May 6, 2020 and submitted

Information

Djblets
release-2.0.x

Reviewers

We've introduced component classes for the Djblets config forms, but
this wasn't used everywhere. The lists, list items, and actions were
still using old-style classes, which wasn't very future-proof and made
it a bit hard to mix in with more modern codebases. There was an idea
before to keep supporting legacy classes here for another release, but
in the end it just wasn't worth it, and we've moved beyond that
elsewhere.

This change updates the list items to use the newer classes, and to
formalize classes for list item actions (removing the reliance on
overloading .btn and stuff). There's a few tiny style tweaks coming
along for the ride as well, to help reduce unwanted whitespace around
lists of actions.

The new definition for item actions also includes a new -is-primary
modifier, and switches the existing danger and disabled to
-is-danger and -is-disabled. These are not specially styled, as we
don't want to conflict with a consuming application's own styling. It's
up to them to offer their own button styling.

Tested with some of our existing config forms pages, and with the
upcoming extensions rework.

Summary ID
Use modernized classes for Djblets config forms list items and actions.
We've introduced component classes for the Djblets config forms, but this wasn't used everywhere. The lists, list items, and actions were still using old-style classes, which wasn't very future-proof and made it a bit hard to mix in with more modern codebases. There was an idea before to keep supporting legacy classes here for another release, but in the end it just wasn't worth it, and we've moved beyond that elsewhere. This change updates the list items to use the newer classes, and to formalize classes for list item actions (removing the reliance on overloading `.btn` and stuff). There's a few tiny style tweaks coming along for the ride as well, to help reduce unwanted whitespace around lists of actions. The new definition for item actions also includes a new `-is-primary` modifier, and switches the existing `danger` and `disabled` to `-is-danger` and `-is-disabled`. These are not specially styled, as we don't want to conflict with a consuming application's own styling. It's up to them to offer their own button styling.
53199dac29e374f81de6bab454b913103a1e68d0
Description From Last Updated

Maybe just to be explicit about this, how about this[actionHandlerName].call(this); ?

daviddavid
david
  1. Ship It!
  2. 
      
chipx86
david
  1. 
      
  2. Maybe just to be explicit about this, how about

    this[actionHandlerName].call(this);
    

    ?

  3. 
      
chipx86
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.0.x (9d660a5)
Loading...