Skip to content

Change class if logo has portrait format

Eduardo Sanz García requested to merge eduardosanz/portrait-format-logo into master

What does this MR do and why?

Checks if the uploaded logo has a portrait format and if so sets the width of the image.

Past attempts:

This is the JavaScript solution.

Closes #378719 (closed)

Screenshots or screen recordings

Before After
Landscape format logo Screenshot_2023-07-27_at_11.06.57_AM Screenshot_2023-07-27_at_11.04.54_AM
Square format logo Screenshot_2023-07-27_at_11.05.10_AM Screenshot_2023-07-27_at_11.06.24_AM
Portrait format Not affected Not affected

How to set up and validate locally

  1. Go to /admin/application_settings/appearance and upload logos of different sizes.
  2. In an incognito window, go to /users/sign_in
  3. Check dimensions of logo.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Eduardo Sanz García

Merge request reports