Skip to content

Ensure edit button can appear anywhere

Justin Reese requested to merge tweak-edit-button into main

As noted by @frankduncan in the review for !12 (merged) edit button is effectively invisible when it appears outside of the one prescribed location (the <dt> of a datapair). That’s because when inline it has no internal content to create layout. It was only appearing within the <dt> because its parent was a flex element, making the button a flex child.

This MR makes sure it always acts as a flex element so it can have dimensionality wherever it appears.

It also slips in a signal on how to style the parent of an edit button, by making it a mixin that is called for each specific context.

Testing:

  • Make sure edit button appears where we expect it to on the current proposal templates
  • Add an edit button to a random place (outside if the <dt> where they currently appear) and make sure it still appears. (On main, it won't.)

Merge request reports

Loading