Skip to content

Show story images as a hero-first carousel - #2221

Merged
maebeale merged 1 commit into
mainfrom
maebeale/story-hero-carousel
Aug 16, 2026
Merged

Show story images as a hero-first carousel#2221
maebeale merged 1 commit into
mainfrom
maebeale/story-hero-carousel

Conversation

@maebeale

Copy link
Copy Markdown
Collaborator

🤖 suggested review level: 1 Skim 👀 view-only swap to a shared carousel partial, no logic or data changes

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

Both the public story share page and the internal story show page rendered the hero image, then the body text, then the primary asset again alongside the gallery — showing the hero twice. This makes all of a story's images read as one gallery instead of a duplicated hero.

How did you approach the change?

Replaced the direct hero render and the separate display_assets gallery on both pages with the existing assets/_display_assets_carousel partial, which builds a single hero-first carousel (primary + gallery) wired to the Swiper carousel controller. The #hero-image wrapper is kept on the internal page so the upload blur/fade in asset_picker_controller.js still works.

UI Testing Checklist

  • Story share page (/story_shares/:id) shows one carousel starting with the hero; body text appears once
  • Internal story page (/stories/:id) shows the same carousel; prev/next arrows appear only with multiple images
  • Single-image and no-image stories render cleanly
  • Uploading a new primary image on the internal page still blurs/fades the hero region

Anything else to add?

View-only. Existing story view + share request specs pass.

The share and internal story pages rendered the hero image, then the
body, then the primary asset again plus the gallery — duplicating the
hero. Reuse the existing display_assets_carousel partial on both pages
so all images appear in one carousel starting with the hero.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 16, 2026 21:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@maebeale
maebeale marked this pull request as ready for review August 16, 2026 21:30
@maebeale
maebeale merged commit 29d4725 into main Aug 16, 2026
3 checks passed
@maebeale
maebeale deleted the maebeale/story-hero-carousel branch August 16, 2026 21:40
maebeale added a commit that referenced this pull request Aug 16, 2026
Seed the file-upload form field (#2136), professional-license management (#2218),
person history/activity filter (#2207), planned-giving grant flag (#2203), story
image carousel (#2221), story-idea promotion email (#2213), and payments recent-
period default (#2216). Hide the detail-page "View the pull request" link behind
admin.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
maebeale added a commit that referenced this pull request Aug 16, 2026
Seed the file-upload form field (#2136), professional-license management (#2218),
person history/activity filter (#2207), planned-giving grant flag (#2203), story
image carousel (#2221), story-idea promotion email (#2213), and payments recent-
period default (#2216). Hide the detail-page "View the pull request" link behind
admin.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
maebeale added a commit that referenced this pull request Aug 16, 2026
* Add admin-editable Features & tips page (/features)

A login-gated, filterable "Features & tips" page so facilitators and admins can
see what the portal can do. DB-backed Feature model (rich WYSIWYG description for
screenshots, external doc link, audience/display status, area, pro tips, release
date), edited in-app by super-admins. config/features.yml is the starter seed an
admin "Import from seed" button hydrates (create-missing-only, never clobbers
in-app edits). Client-side search + area/audience dropdowns + date range + sort.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Specs + AI docs for the Features & tips page

Model/decorator/service/policy/request/routing specs, factory, and page_bg_class
mappings. Document the seed-append workflow in CLAUDE.md, AGENTS.md, and the
Copilot instructions.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Expand features seed to full app history; full-row feature cards

Grow config/features.yml from the initial 15 to 132 curated user-facing features
mined from the full git history (2025-09 → 2026-08), grouped by area. Switch the
features index from a 2-up grid to full-width row cards (pro tips move to a right
rail on wide screens).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Move feature card badges under the title

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Feature cards: chips right of a truncating title

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Feature cards: pro tips below the date in the right rail

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Feature detail: colored topper, check-out + PR links; fill-blanks sync

- Detail page gets a person-show-style colored topper (area colour banner with the
  area identity + audience chip), title on its own line with the date far right.
- Add per-feature "Check out this feature" in-app link (action_path) and a GitHub
  PR link (pr_number); seed carries both (action_path on all 132, PR # on 101).
- "Import from seed" → "Sync latest updates": now also fills BLANK fields on
  existing features (never overwrites in-app edits); returns created/updated.
- Edit/Delete buttons carry the admin-blue themselves (no background block).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Feature cards: full-title tooltip; chips fold below title, date stays top-right

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Feature links point at real pages; audit audiences; catalog-resync

- "Check out this feature" now targets the actual feature page with sample id 1
  (e.g. org-autofill → /events/1/registrants), falling back to the resource index
  when id 1 is absent (FeatureDecorator#resolved_action_url). Re-curated all 132
  action_paths to real routes.
- Audit display_status: Topic subscriptions, Communications, Workshop ideas are
  admin-only (→ admin_facing); CE requests are public (→ public_facing).
- "Sync latest updates" now re-aligns catalog classification (area, audience,
  links, date, PR) so seed corrections propagate, while still only filling blank
  admin content (summary/tips/guide/description) — never overwriting it.
- Search box + Clear button match the community-news look (live filter, btn-utility).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Seed the 6 newest user-facing features from main

CE attendance tracking (#2075), CE/licenses browse indexes (#2208), payments
Stripe/metadata/amount search (#2210), grant sector+category tagging (#2199),
richer communications log (#2177), and topic-subscription recipient filter (#2179).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Split CE registrations and licenses into two feature entries

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Clamp feature-card pro tips to two lines on the index

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* AI files: 'prefix' out of context means the PR title prefix

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Consolidate feature migrations into one create_features

Fold action_path + pr_number into the create_features migration and drop the two
follow-up add-column migrations; it's all shipping in this PR.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Convert features index to the lazy Turbo-frame filter pattern

Replace the bespoke client-side feature_list Stimulus controller with the app's
standard server-side pattern: a _search_boxes form (query + area/audience selects
+ date range + sort) driving a :features_results Turbo frame via the shared
collection controller. Controller filters/sorts server-side; no custom JS.

Removes feature_list_controller.js and the decorator's client-only search_text/
released_iso helpers. Docs updated (lazy-frame list, controller count).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Trim feature-code comments to non-obvious whys; add admin-home card

Apply the "default to no comment" rule across the feature model/decorator/service/
controller/policy/view — keep only genuine gotchas (Tailwind safelist, rhino_
convention, the id-1 action_path fallback, the catalog-vs-content sync contract).
Add a "Features & tips" card to the admin home's Additional data section.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Fix Details link (break out of results frame); nav link admin-only

- Card title/Details links inside the features_results Turbo frame now set
  data-turbo-frame="_top" so they open the show page instead of erroring with a
  "content missing" frame swap.
- Gate the Help-menu "Features & tips" link on admin (allowed_to?(:create?,
  Feature)) and give it the admin-only bg-blue-100 styling, desktop + mobile.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Remove admin-facing hint on the feature audience field

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Feature areas: draw colour/icon from DomainTheme; ticket links resolve to a ticket

- Feature::AREAS now maps each area to a shared `domain` key; FeatureDecorator
  resolves colour via DomainTheme.color_for and icon via INDEX_BUTTON_ICONS
  (content/reporting keep a manual colour+icon since they have no model).
- Ticket/callout features use a "/registration/sample" action_path that resolves
  to a real registrant's ticket, else a sample ticket, else /events.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Move the sync button to an admin-home Actions section

Split the admin-home Deprecated data row to 50% and add a 50% Actions section
holding the "Sync features & tips" button; remove that button from the /features
index (New feature stays). Add an admin-home render spec.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Trim feature-code comments further; certificate feature is public

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Collapsible feature cards with per-card + bulk expand toggle

Reuse the expandable-card/expandable-cards controllers: index cards collapse to
their header row (name, chips, date) with a top-right chevron to expand each, plus
a bulk Expand all / Collapse all toggle above the list. Cards start collapsed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Fix collapse: separate the hidden toggle target from md:flex

md:flex overrode the hidden class at the md breakpoint, so card bodies never
collapsed. Move md:flex to an inner div so the target carries only hidden.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Add 7 newest features to the seed; gate the PR link to admins

Seed the file-upload form field (#2136), professional-license management (#2218),
person history/activity filter (#2207), planned-giving grant flag (#2203), story
image carousel (#2221), story-idea promotion email (#2213), and payments recent-
period default (#2216). Hide the detail-page "View the pull request" link behind
admin.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.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