Skip to content

Constrain hero carousel height and stretch to full width on story share portal#913

Merged
maebeale merged 6 commits intostory-share-portalfrom
copilot/sub-pr-902-again
Feb 10, 2026
Merged

Constrain hero carousel height and stretch to full width on story share portal#913
maebeale merged 6 commits intostory-share-portalfrom
copilot/sub-pr-902-again

Conversation

Copy link
Contributor

Copilot AI commented Feb 10, 2026

What is the goal of this PR and why is this important?

Hero section was using a flexible aspect ratio that caused vertical expansion with large images. Fixed height prevents layout instability and matches design spec. Additionally, the hero image now stretches horizontally to fill the full container width.

How did you approach the change?

  • Hero container: Changed from aspect-[16/6] to h-96 max-h-96 (384px fixed height)
  • Image sizing: Added object-cover to hero variant so images crop/scale to fit container
  • Full-width stretch: Removed flex centering and added !w-full to ensure image stretches horizontally to fill the container width
<!-- Before: Container height scales with viewport width -->
<div class="aspect-[16/6] bg-gray-200">

<!-- After: Container has fixed max height, image stretches to full width -->
<div class="h-96 max-h-96 bg-gray-200 overflow-hidden">
  <%= render "assets/display_image",
             resource: @featured_story,
             extra_image_classes: "!w-full h-full object-cover",
             variant: :hero %>
</div>

Anything else to add?

Image now:

  • Has a constrained height that prevents vertical growth based on image dimensions
  • Stretches horizontally to fill 100% of the container width
  • Uses object-cover to properly crop/scale while maintaining aspect ratio

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI mentioned this pull request Feb 10, 2026
Copilot AI changed the title [WIP] Work in progress for story share portal Constrain hero carousel height on story share portal Feb 10, 2026
Copilot AI requested a review from maebeale February 10, 2026 13:54
Copilot AI and others added 2 commits February 10, 2026 09:11
Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>
@maebeale maebeale force-pushed the copilot/sub-pr-902-again branch from c0cf17d to e7b53e3 Compare February 10, 2026 14:11
@maebeale
Copy link
Collaborator

@copilot stretch the hero image horizontally to fit the width on share_portal index

Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 10, 2026

@copilot stretch the hero image horizontally to fit the width on share_portal index

I've updated the hero image to stretch horizontally to fill the full width of the container.

Changes in commit 858e3b9:

  • Removed flex items-center from the container (was preventing full-width stretch)
  • Added !w-full to force the image to fill 100% of the container width
  • Image now uses w-full h-full object-cover to fill the entire container while maintaining aspect ratio

Copilot AI changed the title Constrain hero carousel height on story share portal Constrain hero carousel height and stretch to full width on story share portal Feb 10, 2026
@maebeale maebeale marked this pull request as ready for review February 10, 2026 14:25
@maebeale maebeale merged commit 2d88f54 into story-share-portal Feb 10, 2026
2 of 3 checks passed
@maebeale maebeale deleted the copilot/sub-pr-902-again branch February 10, 2026 14:25
maebeale added a commit that referenced this pull request Feb 11, 2026
…re portal (#913)

* Initial plan

* Limit hero image height to prevent vertical growth

Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>

* Allow extra classes to be sent in

* Don't hard-code the size

* Stretch hero image to full width horizontally

Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>

* Hard-code nav item colors

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>
Co-authored-by: maebeale <maebeale@users.noreply.github.com>
maebeale added a commit that referenced this pull request Feb 11, 2026
…re portal (#913)

* Initial plan

* Limit hero image height to prevent vertical growth

Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>

* Allow extra classes to be sent in

* Don't hard-code the size

* Stretch hero image to full width horizontally

Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>

* Hard-code nav item colors

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>
Co-authored-by: maebeale <maebeale@users.noreply.github.com>
maebeale added a commit that referenced this pull request Feb 12, 2026
…re portal (#913)

* Initial plan

* Limit hero image height to prevent vertical growth

Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>

* Allow extra classes to be sent in

* Don't hard-code the size

* Stretch hero image to full width horizontally

Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>

* Hard-code nav item colors

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>
Co-authored-by: maebeale <maebeale@users.noreply.github.com>
maebeale added a commit that referenced this pull request Feb 12, 2026
* WIP: story share portal

* WIP: show page for story

* Isolate Story Share Portal with dedicated purple-themed layout (#903)

* Initial plan

* Redesign share_portal page with Tailwind CSS to match design

Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>

* Add full-width layout support for share_portal page

Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>

* Address code review feedback: add accessibility labels and use dynamic story links

Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>

* Create separate layout for story share portal with purple navigation

Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>

* Address code review feedback: remove redundant nav wrapper and duplicate link

Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>

* Redesign Story Share Portal to match visual specifications (#904)

* Initial plan

* Add Telefon font, redesign navbar with 3 rows, update sector styling and overlays

Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>

* Refine font declarations and remove unused CSS variables

Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>

* Fix Tailwind class interpolation and improve scroll performance

Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>

* Use actual story sectors for category badges in What Others Are Reading

Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>

* Add new logo image and merge conflict

* Redesign Story Share Portal to match visual specifications (#905)

* Initial plan

* Update story share portal navigation and layout to match design

Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>

* Force first 5 stories for stories_by_focus for now

* Refine Story Share Portal layout and visual hierarchy (#911)

* Initial plan

* Update Story Share Portal layout per feedback

Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>

* Visual tweaks

* WIP: messing w hero height

* Fixes

* Refine What Others Are Reading section colors and alignment (#912)

* Initial plan

* Update What Others Are Reading section colors and alignment

Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>

* Constrain hero carousel height and stretch to full width on story share portal (#913)

* Initial plan

* Limit hero image height to prevent vertical growth

Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>

* Allow extra classes to be sent in

* Don't hard-code the size

* Stretch hero image to full width horizontally

Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>

* Hard-code nav item colors

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>
Co-authored-by: maebeale <maebeale@users.noreply.github.com>

* Add individual story view with share portal layout and navigation (#915)

* Initial plan

* Add show_share_portal page with matching layout and navigation

Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>

* Improve popular stories query and sector fallback

Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>

* Fix test

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>
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.

2 participants