Skip to content

[WHIT-3136] Update topical event logo with responsive dimensions#11221

Open
TonyGDS wants to merge 3 commits intomainfrom
update-topical-event-logo-dimensions
Open

[WHIT-3136] Update topical event logo with responsive dimensions#11221
TonyGDS wants to merge 3 commits intomainfrom
update-topical-event-logo-dimensions

Conversation

@TonyGDS
Copy link
Contributor

@TonyGDS TonyGDS commented Mar 10, 2026

Summary

  • Add version_prefix support to ImageKind/ImageVersion so multiple image kinds can share the same version names (e.g. desktop_2x, tablet) in config while maintaining unique CarrierWave version names internally
  • Update ImageUploader to use prefixed version names for CarrierWave registration
  • Update Image#publishing_api_details to use unprefixed version names as source keys in the Publishing API payload
  • Replace placeholder 800x800 topical event logo dimensions with responsive breakpoint versions (mobile/tablet/desktop at 1x and 2x), ~30px narrower than header to account for padding
  • Minimum upload size is now 1506x1004

Test plan

  • Upload a logo image (minimum 1506x1004) to a configurable topical event
  • Verify hint text shows correct minimum dimensions (1506x1004)
  • Verify upload validation rejects images smaller than 1506x1004
  • Verify Publishing API payload has unprefixed source keys (desktop_2x, tablet, etc.)
  • In Rails console, confirm image_data.all_asset_variants_uploaded? returns true after processing
  • In Rails console, confirm image_data.assets.map(&:variant) includes all 6 prefixed logo versions plus original

@TonyGDS TonyGDS force-pushed the update-topical-event-logo-dimensions branch 13 times, most recently from 4beeb7b to 596ed9b Compare March 11, 2026 16:10
TonyGDS added 3 commits March 11, 2026 17:03
When an image kind has `version_prefix: true` in image_kinds.yml, its
CarrierWave version names are prefixed with the image kind name (e.g.
"tablet" becomes "topical_event_logo_tablet"). This prevents version
name collisions when multiple image kinds define versions with the
same name.

ImageVersion gains `prefixed_name` and `prefixed_from_version`
attributes, which are used by ImageUploader for CarrierWave version
registration and by ImageKind#version_names. The unprefixed `name`
is preserved for use in Publishing API payloads.
Image#publishing_api_details now uses `prefixed_name` to look up the
file URL (since CarrierWave versions are registered under the prefixed
name) but uses the unprefixed `name` as the source key in the payload.
This ensures the Publishing API receives clean, consumer-friendly
version names like "desktop_2x" rather than
"topical_event_logo_desktop_2x".
Replace the single s800_logo version with responsive breakpoint
versions matching the topical_event_header pattern: desktop, tablet,
and mobile at 1x and 2x resolutions. Enable version_prefix to avoid
name collisions with the header versions.

The new logo dimensions maintain a 3:2 aspect ratio at each
breakpoint, sized to match the design specifications for topical
event pages.

Add a Cucumber scenario to verify logo image upload end-to-end via
the configurable document type UI.
@TonyGDS TonyGDS force-pushed the update-topical-event-logo-dimensions branch from 596ed9b to 6097646 Compare March 11, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant