Skip to content

Email submitter + admin FYI when a story idea is promoted to a story - #2213

Merged
maebeale merged 1 commit into
mainfrom
maebeale/story-promotion-emails
Aug 16, 2026
Merged

Email submitter + admin FYI when a story idea is promoted to a story#2213
maebeale merged 1 commit into
mainfrom
maebeale/story-promotion-emails

Conversation

@maebeale

Copy link
Copy Markdown
Collaborator

🤖 suggested review level: 3 Read 📖 contained addition of two notification kinds + a create-flow trigger, following the existing idea_submitted pattern

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

  • Promoting a story idea into a story (creating a Story from a StoryIdea) previously sent no emails.
  • Now it emails the idea's submitter ("your story idea is now a story") and sends an admin FYI, mirroring the existing idea_submitted / idea_submitted_fyi flow.

How did you approach the change?

  • New notification kinds story_promoted / story_promoted_fyi (KINDS + NotificationMailerJob map).
  • StoriesController#create fires both via NotificationServices::CreateNotification when the new story has a story_idea — submitter goes to story_idea.created_by.email, FYI to REPLY_TO_EMAIL.
  • Added the two NotificationMailer methods, four views (html + text), previews, and mailer + request specs.
  • Added Story to NOTICEABLE_TYPES and topic entries so the new emails are filterable/searchable on the notifications index.

Anything else to add?

  • Person's "View story" button is shown only when the story is published/publicly visible, so submitters never hit a link they can't open.

Story promotion (creating a Story from a StoryIdea) previously sent no
notifications. Mirror the idea_submitted pattern so the submitter learns
their shared idea became a story and admins get an FYI.

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

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 18:48
@maebeale
maebeale merged commit 5a6c399 into main Aug 16, 2026
3 checks passed
@maebeale
maebeale deleted the maebeale/story-promotion-emails branch August 16, 2026 18:53
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