Skip to content

feat: [MP-3062] add goals feedback survey to goal in review recap - #7127

Merged
roger-in-kiva merged 1 commit into
mainfrom
MP-3062_goal_review_feedback_survey
Jul 31, 2026
Merged

feat: [MP-3062] add goals feedback survey to goal in review recap#7127
roger-in-kiva merged 1 commit into
mainfrom
MP-3062_goal_review_feedback_survey

Conversation

@roger-in-kiva

@roger-in-kiva roger-in-kiva commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds the goals feedback survey to the Goal in Review recap. Slide 7's secondary CTA ("Share your feedback") reveals an embedded Form Assembly survey, and once a lender submits it we persist a per-year flag so the survey isn't shown again for that recap year.

What changed

  • GoalInReviewFeedbackForm.vue — a thin, dependency-free wrapper around @kiva/kv-components' KvFormAssemblyForm (the shared FA component, per the ticket's dev note). Holds the FA form id + title and emits submitted.
  • GoalInReviewSlide7.vue — the "Share your feedback" CTA now reveals the survey. showFeedback gates on !isPastGoalYear && !feedbackSubmitted, so it shows for current-year completed and in-progress goals and hides once submitted. Uses v-show (not v-if) so re-toggling the CTA doesn't remount/reload the iframe and lose entered answers.
  • useGoalData.js — new year-keyed user preference goalFeedbackSubmitted: { [year]: true } with goalFeedbackSubmittedByYear / hasSubmittedGoalFeedbackForYear / setGoalFeedbackSubmittedPreference, mirroring the existing viewedGoalComplete helpers.
  • GoalInReviewModal.vue — forwards the feedbackSubmitted prop down to slide 7 and the feedback-submitted event up to the page.
  • MyKivaPageContent.vue — reuses the shared injected goalData composable to snapshot the "already submitted" flag at recap open (network-only, evaluated per modal load rather than reactively) and persists it on submit.
  • StorybookMyKiva/GoalInReview/GoalInReviewFeedbackForm story.

How it works

Read  (gate):  MyKivaPageContent → :feedback-submitted → GoalInReviewModal → :feedback-submitted → Slide7
Write (submit): GoalInReviewFeedbackForm → @submitted → Slide7 → @feedback-submitted → Modal → Page → setGoalFeedbackSubmittedPreference(year)

Design decisions

  • Persist trigger = raw FA submitted (no valid-guard): fa_form_closed isn't reliably emitted by this form, so we flag on the fa_form_submitted postMessage.
  • Snapshot at open, not reactive: the gate is read once when the modal opens (network-only, so it reflects cross-tab/device state) and copied into a page data field — submitting mid-session doesn't yank the form out from under the user.
  • Persistence owned by the page (via the shared goalData); the wrapper and slides stay presentational (no goalData coupling), keeping the wrapper reusable and slides pure prop-driven components.

Observability (AC)

Submission is observable from our side: KvFormAssemblyForm surfaces the FA fa_form_submitted postMessage as its fa-form-submitted event, which this PR persists per year. This feeds the tracking/measurement work in MP-2956. (The ticket-side observability note is being handled separately.)

Related tests

File Covers
test/unit/specs/composables/useGoalData.spec.js goalFeedbackSubmitted flag — missing key, set/true, year-keyed no-leak, persist, merge, idempotent, falsy-year no-op (7 cases)
.../GoalInReview/GoalInReviewFeedbackForm.spec.js wrapper renders FA with numeric id + title, stable testid, forwards submitted
.../GoalInReview/GoalInReviewSlide7.spec.js reveal via v-show, hide when already submitted, re-emit feedback-submitted, existing past-year hide
.../MyKiva/GoalInReviewModal.spec.js feedbackSubmitted prop gates slide 7, feedback-submitted forwarded up
.../pages/MyKiva/MyKivaPageContent.spec.js snapshots flag at recap open, gates when already submitted, persists on submit

Verification: full unit suite 4463 passed / 6 skipped / 0 failed; lint:js 0 errors, lint:css clean.

Known open items / follow-ups

  • FA form id is a placeholder test value (659) — production id is a pending product dependency; swap before release.
  • The recap currently runs on mock data via useGoalInReview; the real backend contract is a separate ticket.

Storybook

MyKiva/GoalInReview/GoalInReviewFeedbackForm — note it mounts the real FA iframe with the placeholder id, so it loads the live form.

Screenshots

Desktop:
Screenshot 2026-07-31 at 11 58 28 a m

Mobile:
Screenshot 2026-07-31 at 11 58 41 a m

Embed a Form Assembly survey in the Goal in Review recap via a thin GoalInReviewFeedbackForm wrapper around @kiva/kv-components' KvFormAssemblyForm, revealed from slide 7's "Share your feedback" CTA for current-year completed and in-progress goals.

Persist a year-keyed goalFeedbackSubmitted user preference (mirroring viewedGoalComplete) and gate the survey once submitted. The gate is snapshotted at recap open (network-only) rather than reactively, and the survey uses v-show so re-toggling the CTA does not remount/reload the iframe. Adds a Storybook story and unit coverage across the composable, wrapper, slide, modal, and page.
@roger-in-kiva roger-in-kiva added the b2c Sends B2C team a message in Slack on PR creation label Jul 31, 2026
@roger-in-kiva
roger-in-kiva requested a review from a team July 31, 2026 18:06
Comment thread src/components/MyKiva/GoalInReview/GoalInReviewFeedbackForm.vue
Comment thread src/components/MyKiva/GoalInReview/GoalInReviewSlide7.vue
Comment thread src/pages/MyKiva/MyKivaPageContent.vue

@dyersituations dyersituations left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approved pending the commit being pushed up to fix the spacing around the form.

@roger-in-kiva

Copy link
Copy Markdown
Collaborator Author

Approved pending the commit being pushed up to fix the spacing around the form.

That's a Form Assembly side fix, we don't need a commit.

@roger-in-kiva
roger-in-kiva merged commit 3f29274 into main Jul 31, 2026
9 checks passed
@roger-in-kiva
roger-in-kiva deleted the MP-3062_goal_review_feedback_survey branch July 31, 2026 20:01
kiva-robot added a commit that referenced this pull request Aug 4, 2026
## [3.82.0-rc.1](v3.81.0...v3.82.0-rc.1) (2026-08-04)

### 🎉 New Features

* [MP-3056] - goal in review slide 3 ([#7122](#7122)) ([053d3cb](053d3cb))
* add borrower grid slide to goal in review ([babda2c](babda2c))
* add goals feedback survey to goal in review recap ([#7127](#7127)) ([3f29274](3f29274))
* **apollo:** build operation variables with one shared helper ([5764b92](5764b92))
* **apollo:** compose composable operation exports in the transform ([554b58d](554b58d))
* **apollo:** prefetch composable operations attached to component definitions ([db26fc8](db26fc8))
* mp-3012-meta-tracking-new-events-pt-1 ([3cf226f](3cf226f))
* mp-3012-meta-tracking-new-events-pt-1 ([8747c64](8747c64))
* mp-3012-meta-tracking-new-events-pt-1 ([8ea88c9](8ea88c9))
* mp-3012-meta-tracking-new-events-pt-1 ([d71eb04](d71eb04))
* mp-3012-meta-tracking-new-events-pt-1 ([26bfacc](26bfacc))
* mp-3012-meta-tracking-new-events-pt-1 ([4887896](4887896))
* mp-3012-meta-tracking-new-events-pt-1 ([484e857](484e857))
* mp-3012-meta-tracking-new-events-pt-1 ([a50872d](a50872d))
* mp-3012-meta-tracking-new-events-pt-1 ([bc94b52](bc94b52))

### 🐛 Bugfixes

* add spacing to banner copy ([b65adec](b65adec))
* **apollo:** unify useApolloQuery with the plugin operation handling ([ac0d4ce](ac0d4ce))
* avoid old conventions in pure js files ([629e6c8](629e6c8))
* avoid specific width value on css ([b3540a0](b3540a0))
* bg size in first slide ([fd27530](fd27530))
* borrower grid white space ([4ea18e7](4ea18e7))
* design feedback on loans beta page ([#7134](#7134)) ([2339c2a](2339c2a))
* keep borrower profile comment avatar circular when team name wraps ([#7124](#7124)) ([5340bfc](5340bfc))
* **LendCta:** derive the stats slot from a prefetched multi matching setting ([43d705e](43d705e))
* loans page migration design feedback ([#7126](#7126)) ([205ebb0](205ebb0))
* **logFormatter:** stop losing caught errors, and fix 17 wrong-level calls ([#7118](#7118)) ([ea1e758](ea1e758))
* remove borrower image hardcoded with ([53dcc13](53dcc13))
* repair error handling defects found while auditing logFormatter ([#7119](#7119)) ([4b76c15](4b76c15))
* sectionbg color ([07389dc](07389dc))
* **settingsUtils:** treat null setting values as unset ([2aef515](2aef515))
* tests content ([0385667](0385667))

### 🪚 Refactors

* **filters-challenge-header:** remove inactive experiment ([14b04ce](14b04ce))
* **operationVariables:** rename the merged-in parameter to ownVariables ([b8388c3](b8388c3))

### 📚 Documentation Changes

* **apollo:** clean up composable operation comments ([9074eb7](9074eb7))
* document composable data fetching and SSR scope rules ([1c98f2e](1c98f2e))
* guide composable data fetching and relocate SSR scope rules ([6103828](6103828))

### 🔍 Tests

* **LendCta:** add stories for matched loans with no lenders ([0a75b47](0a75b47))
@kiva-robot

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 3.82.0-rc.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

kiva-robot added a commit that referenced this pull request Aug 4, 2026
## [3.82.0](v3.81.0...v3.82.0) (2026-08-04)

### 🎉 New Features

* [MP-3056] - goal in review slide 3 ([#7122](#7122)) ([053d3cb](053d3cb))
* add borrower grid slide to goal in review ([babda2c](babda2c))
* add goals feedback survey to goal in review recap ([#7127](#7127)) ([3f29274](3f29274))
* **apollo:** build operation variables with one shared helper ([5764b92](5764b92))
* **apollo:** compose composable operation exports in the transform ([554b58d](554b58d))
* **apollo:** prefetch composable operations attached to component definitions ([db26fc8](db26fc8))
* mp-3012-meta-tracking-new-events-pt-1 ([3cf226f](3cf226f))
* mp-3012-meta-tracking-new-events-pt-1 ([8747c64](8747c64))
* mp-3012-meta-tracking-new-events-pt-1 ([8ea88c9](8ea88c9))
* mp-3012-meta-tracking-new-events-pt-1 ([d71eb04](d71eb04))
* mp-3012-meta-tracking-new-events-pt-1 ([26bfacc](26bfacc))
* mp-3012-meta-tracking-new-events-pt-1 ([4887896](4887896))
* mp-3012-meta-tracking-new-events-pt-1 ([484e857](484e857))
* mp-3012-meta-tracking-new-events-pt-1 ([a50872d](a50872d))
* mp-3012-meta-tracking-new-events-pt-1 ([bc94b52](bc94b52))

### 🐛 Bugfixes

* add spacing to banner copy ([b65adec](b65adec))
* **apollo:** unify useApolloQuery with the plugin operation handling ([ac0d4ce](ac0d4ce))
* avoid old conventions in pure js files ([629e6c8](629e6c8))
* avoid specific width value on css ([b3540a0](b3540a0))
* bg size in first slide ([fd27530](fd27530))
* borrower grid white space ([4ea18e7](4ea18e7))
* design feedback on loans beta page ([#7134](#7134)) ([2339c2a](2339c2a))
* keep borrower profile comment avatar circular when team name wraps ([#7124](#7124)) ([5340bfc](5340bfc))
* **LendCta:** derive the stats slot from a prefetched multi matching setting ([43d705e](43d705e))
* loans page migration design feedback ([#7126](#7126)) ([205ebb0](205ebb0))
* **logFormatter:** stop losing caught errors, and fix 17 wrong-level calls ([#7118](#7118)) ([ea1e758](ea1e758))
* remove borrower image hardcoded with ([53dcc13](53dcc13))
* repair error handling defects found while auditing logFormatter ([#7119](#7119)) ([4b76c15](4b76c15))
* sectionbg color ([07389dc](07389dc))
* **settingsUtils:** treat null setting values as unset ([2aef515](2aef515))
* tests content ([0385667](0385667))

### 🪚 Refactors

* **filters-challenge-header:** remove inactive experiment ([14b04ce](14b04ce))
* **operationVariables:** rename the merged-in parameter to ownVariables ([b8388c3](b8388c3))

### 📚 Documentation Changes

* **apollo:** clean up composable operation comments ([9074eb7](9074eb7))
* document composable data fetching and SSR scope rules ([1c98f2e](1c98f2e))
* guide composable data fetching and relocate SSR scope rules ([6103828](6103828))

### 🔍 Tests

* **LendCta:** add stories for matched loans with no lenders ([0a75b47](0a75b47))

### 🧹 Chores

* **release:** 3.82.0-rc.1 [skip ci] ([cb93496](cb93496)), closes [#7122](#7122) [#7127](#7127) [#7134](#7134) [#7124](#7124) [#7126](#7126) [#7118](#7118) [#7119](#7119)
@kiva-robot

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 3.82.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

b2c Sends B2C team a message in Slack on PR creation released on @staging released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants