Problem/Motivation

From #2801749: Unclear what is compared with the visual plugin that provides an indication of which revisions are currently compared (for the Visual inline filter) and after a discussion with @miro_dietiker, the "underline-link" for the author a-Element is taking its whole space and it is centered, which is not a usual Drupal output.

Proposed resolution

The author a-Element should be wrapped by a container/div, and it should not be centered.

Remaining tasks

User interface changes

Change how the revision author link is rendered in revision comparison indications for the Visual inline filter.

Now:
how_it_is

How it should look like:
how_it_should_be

API changes

Data model changes

Comments

tduong created an issue. See original summary.

drobnjak’s picture

Assigned: Unassigned » drobnjak
drobnjak’s picture

Author link wrapped in the div element and "text-align: center" removed.

drobnjak’s picture

Status: Active » Needs review
johnchque’s picture

Status: Needs review » Needs work
StatusFileSize
new75.14 KB

Looks good but is it me or the users link are sightly disaligned?

drobnjak’s picture

StatusFileSize
new36.15 KB

For me works completely fine. Tested with different resolutions.

johnchque’s picture

No, it will not if the values of the revision date has an hour like 11:11, can you check again?

drobnjak’s picture

Status: Needs work » Needs review
StatusFileSize
new22.9 KB
new1.67 KB
new926 bytes

Date is now wrapped in the div. Screenshot provided with the latest change.

tduong’s picture

Status: Needs review » Needs work

Strange hour (first revision's date) but I guess you've just deleted some chars by mistake xd

Ok, can you shorten the space between the revision date and the username links, so it won't look like "far away" please ? :P

drobnjak’s picture

Status: Needs work » Needs review
StatusFileSize
new2.2 KB
new972 bytes
new68.63 KB

Changes to css for different resolutions and devices. Screenshot provided for one of them.
And yes, character was deleted but on purpose to show how different numbers in dates wont affect the user columns to be unaligned.

johnchque’s picture

Status: Needs review » Needs work
  1. +++ b/css/diff.visual-inline.css
    @@ -12,17 +12,16 @@ ins {
     .comparation-flex-item-date {
    

    Let's add a padding-right: 1em;

  2. +++ b/css/diff.visual-inline.css
    @@ -12,17 +12,16 @@ ins {
    +  flex-basis: 18%;
    

    Let's change this to 20%

  3. +++ b/css/diff.visual-inline.css
    @@ -12,17 +12,16 @@ ins {
     .comparation-flex-item-author {
    

    Also add here the padding_right 1em;

  4. +++ b/css/diff.visual-inline.css
    @@ -36,3 +35,21 @@ ins {
    +@media screen and (min-width: 920px) and (max-width: 1100px) {
    +  .comparation-flex-item-date {
    +    flex-basis: 15%;
    +  }
    +  .comparation-flex-item-author {
    +    flex-basis: 15%;
    +    padding: 0 1em 0 1em;
    +  }
    +}
    +@media screen and (min-width: 1100px) {
    +  .comparation-flex-item-date {
    +    flex-basis: 15%;
    +  }
    +  .comparation-flex-item-author {
    +    flex-basis: 15%;
    +    padding: 0 0 0 0;
    +  }
    

    This would make the date too narrow and place them in two lines, let's avoid too many changes for different screens. Adding the message as basis 80% will place it in a new line, that is nice enough IMO.

If possible remove the min-width so we base our width on the flex-basis.

drobnjak’s picture

Status: Needs work » Needs review
StatusFileSize
new51.99 KB
new3.04 KB
new2.3 KB
miro_dietiker’s picture

Status: Needs review » Needs work
  1. +++ b/composer.json
    @@ -3,6 +3,12 @@
    +  "support": {
    +    "issues": "https://www.drupal.org/project/issues/diff"
    +  },
    
    @@ -33,8 +39,5 @@
       "support": {
         "issues": "https://www.drupal.org/project/issues/diff",
         "source": "http://cgit.drupalcode.org/diff"
    -  },
    

    You changed it and now support is present twice, making it strictly malformed.

  2. +++ b/src/Plugin/diff/Layout/VisualInlineDiffLayout.php
    @@ -136,7 +136,7 @@ class VisualInlineDiffLayout extends DiffLayoutBase {
    -      '#weight' => 0,
    +      'weight' => 0,
    

    You are reverting this, which was previously fixed in some other issue.
    Please properly reroll / rebase your work.

drobnjak’s picture

Status: Needs work » Needs review
StatusFileSize
new1.94 KB
new1.2 KB

Updated changes from #13

  • miro_dietiker committed 155646d on 8.x-1.x authored by drobnjak
    Issue #2812913 by drobnjak, tduong, yongt9412: Reformat how the revision...
miro_dietiker’s picture

Status: Needs review » Fixed

Yeah it can be that simple. Committed. :-)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.