[WHIT-3136] Update topical event logo with responsive dimensions#11221
Open
[WHIT-3136] Update topical event logo with responsive dimensions#11221
Conversation
4beeb7b to
596ed9b
Compare
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.
596ed9b to
6097646
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
version_prefixsupport toImageKind/ImageVersionso multiple image kinds can share the same version names (e.g.desktop_2x,tablet) in config while maintaining unique CarrierWave version names internallyImageUploaderto use prefixed version names for CarrierWave registrationImage#publishing_api_detailsto use unprefixed version names as source keys in the Publishing API payloadTest plan
desktop_2x,tablet, etc.)image_data.all_asset_variants_uploaded?returnstrueafter processingimage_data.assets.map(&:variant)includes all 6 prefixed logo versions plus original