Skip to content

Conversation

@OmeGak
Copy link
Member

@OmeGak OmeGak commented Oct 4, 2024

This PR makes sure that event logos take the entire width of the page content while preserving form factor. In particular, it solves issues when the event logo's width is lesser and greater than the content page's width.

before after
image image
before after
image image
before after
image image

@OmeGak OmeGak force-pushed the fix/event-logo-size branch 2 times, most recently from 86d326b to 0bd790e Compare October 4, 2024 13:33
Copy link
Member

@tomasr8 tomasr8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks much better now!

@ThiefMaster
Copy link
Member

ThiefMaster commented Oct 7, 2024

How likely is this to cause problems w/ existing conferences, especially ones using custom CSS?

@OmeGak
Copy link
Member Author

OmeGak commented Oct 8, 2024

How likely is this to cause problems w/ existing conferences, especially ones using custom CSS?

If the custom CSS uses span.conference-title-link instead of just .conference-title-link, the selector will no longer work. The main change, otherwise, is that .confLogoBox is no longer floating but it's quite unpredictable how this may break custom CSS.

@ThiefMaster
Copy link
Member

That's what worries me a bit... I think we have to test on our side with a bunch of existing conferences that have a custom stylesheet which contains any selectors likely related to the logo

@GovernmentPlates
Copy link
Member

Just tested this, and whilst it seems to be fine with our custom stylesheets that we have on the CERN instance, the change does cause small logos to be stretched out:

image

A good alternative (suggested by @ThiefMaster) for this would be to add an option that would allow users to show the event logo as a banner; by selecting this option, we would use different CSS styles that would be more suitable for showing this as a banner. That way, we don't break old events (as well as save time for people no longer having to write custom CSS styles for banner-like logos).

@OmeGak OmeGak force-pushed the fix/event-logo-size branch 2 times, most recently from 6ac3827 to 345916c Compare October 18, 2024 12:45
@OmeGak
Copy link
Member Author

OmeGak commented Oct 18, 2024

Added a new "Use logo as banner" switch in the Header Style settings section. Enabling it activates the new CSS, leaving it disabled uses the previous CSS.

image

@OmeGak OmeGak force-pushed the fix/event-logo-size branch from 345916c to 0981e2d Compare October 18, 2024 13:14
@github-actions github-actions bot added the alembic Contains database changes label Oct 18, 2024
@OmeGak OmeGak force-pushed the fix/event-logo-size branch 3 times, most recently from ee06c4b to 4b87153 Compare October 18, 2024 13:39
@ThiefMaster ThiefMaster added this to the v3.3 milestone Oct 23, 2024
@ThiefMaster
Copy link
Member

Just wondering, do we really want to scale an image up or can we prevent that while still making it look as banner-like as possible w/ its size?

Otherwise an event organizer might upload something that's a bit too small and not even notice that it gets blurrier than it should be.

Mentioning the recommended width of a banner logo on the layout management page might also be useful.

@OmeGak OmeGak force-pushed the fix/event-logo-size branch 5 times, most recently from 52f914b to f291841 Compare October 25, 2024 16:00
@OmeGak
Copy link
Member Author

OmeGak commented Oct 25, 2024

I added flashed warnings when:

  • The logo is configured as banner and the image is smaller than 950px.
  • The logo appears on the left and the image is larger than 200px.

These warnings appear both when:

  • A new logo image is uploaded and the checks above fail.
  • The logo as banner setting is changed and the checks above fail against the current event logo.
logo set as banner but current image is too small too large image uploaded as legacy logo
image image

@OmeGak OmeGak force-pushed the fix/event-logo-size branch from f291841 to 001118f Compare October 25, 2024 16:13
We do not show the label anywhere but it feels cleaner to have it set
nonetheless. If we want to ditch labels for that field, it should be
done in all places wher that particular field is used.
@ThiefMaster ThiefMaster merged commit 86a024b into indico:master Oct 25, 2024
@OmeGak OmeGak deleted the fix/event-logo-size branch October 30, 2024 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

alembic Contains database changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants