backdrop-contrib / diff

Show differences between content revisions.
GNU General Public License v2.0
0 stars 5 forks source link

Selected diff mode is not properly styled/denoted. #20

Open klonos opened 3 years ago

klonos commented 3 years ago

I'm splitting this from #16

There's a @todo item in https://github.com/backdrop-contrib/diff/blob/1.x-1.x/diff.pages.inc#L250

  $links = array();
  foreach (diff_available_states('node') as $alternative_state => $label) {
    if ($alternative_state == $state) {
      // @todo: Should we show both or just alternatives?
    }
    $links[$alternative_state] = array(
      'title' => $label,
      'href' => ...,
    );
  }

That @todo item seems to have been placed there in order to skip adding the currently selected diff mode as a link, but I think that we should still show it, but denote the active vs available diff modes differently. I propose that we make them look like secondary buttons instead.

Rough mockup:

...or with smaller buttons:

klonos commented 3 years ago

I've filed a PR with some initial work, but we should wait until #17 gets fixed before working further on this. Then also make sure that this looks nice in both Seven and Basis.