Problem/Motivation

User picture should not be an "hero/wide" image because it is no more aligned
user picture

Steps to reproduce

Display the profil of a user having a defined picture (or a default one)

Proposed resolution

Adapt olivero_preprocess_field as follow:

function olivero_preprocess_field(&$variables) {
  ...
  if (
    $variables['field_type'] == 'image' &&
    $variables['element']['#view_mode'] == 'full' &&
    !$variables["element"]["#is_multiple"] &&
    $variables['field_name'] !== 'user_picture' // Here is the change
  ) {
    $variables['attributes']['class'][] = 'wide-image';
  }
}

Remaining tasks

Create a patch

Comments

DuneBL created an issue. See original summary.

andregp’s picture

Assigned: Unassigned » andregp

Okay, I'll do it =)

andregp’s picture

Assigned: andregp » Unassigned
Status: Active » Needs review
StatusFileSize
new720 bytes
new111 KB

Sending the patch with the proposed change.
Here's an image of before/after the code change:

Status: Needs review » Needs work

The last submitted patch, 3: 3256433-3.patch, failed testing. View results

andregp’s picture

Status: Needs work » Needs review

I think there was a bug on the tests because I repeated the test and it worked on the second time, so I'm sending it back to "needs review".

abhijith s’s picture

StatusFileSize
new26.96 KB
new72.57 KB

Applied patch #3 on 9.4.x and it works fine.

Before patch:
before

After patch:
after

RTBC +1

awset’s picture

StatusFileSize
new56.28 KB

Applied patch #3 on 9.4.x and it works fine.

Tested on:

  • Chrome
  • Latest Edge
  • Firefox
  • Safari

RTBC +1

awset’s picture

Status: Needs review » Reviewed & tested by the community
mherchel’s picture

Issue tags: -dropbutton created by a view doesn't use all the olivero css rules

Patch in #3 looks great to me! Thanks @andregp

  • lauriii committed 80ba63e on 10.0.x
    Issue #3256433 by andregp, Abhijith S, awangsetyawan, DuneBL, mherchel:...

  • lauriii committed 79ad424 on 9.4.x
    Issue #3256433 by andregp, Abhijith S, awangsetyawan, DuneBL, mherchel:...
lauriii’s picture

Status: Reviewed & tested by the community » Fixed

Committed 80ba63e and pushed to 10.0.x. Also cherry-picked to 9.4.x. Thanks!

Status: Fixed » Closed (fixed)

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