Skip to content

feat(DataRetentionSettingsForm): per-store data retention settings element - #244

Open
brettflorio wants to merge 6 commits into
mainfrom
feat/data-retention-settings-form
Open

brettflorio wants to merge 6 commits into
mainfrom
feat/data-retention-settings-form

Conversation

@brettflorio

@brettflorio brettflorio commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

DataRetentionSettingsForm — edits the store's data_retention field

data_retention now lives on the Store resource (not a data_retention_settings sub-resource), so the form is Store-typed and edits the nested data_retention object via custom getValue/setValue + this.edit() (the StoreForm nested-JSON-field pattern).

  • auto_anonymize (switch) + auto_anonymize_days (number, min 90); v8n and hiddenSelector read data_retention.*; days control hidden unless auto-anonymize is on.
  • Stories bound to a store href; tests updated (incl. a read/write-through-data_retention case). Suite green.

Requires the foxy-sdk change adding data_retention to the Store graph.

Brett Florio and others added 2 commits June 18, 2026 11:11
…ement

foxy-data-retention-settings-form edits fx:data_retention_settings: a toggle
(auto_anonymize) and a conditional days-of-inactivity field with a 90-day
minimum (v8n + min). Mirrors CustomerPortalSettingsForm (PATCH-only settings
singleton: delete/timestamps hidden). Includes i18n, tests, and a story.

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

Populated fixture + store link so the storybook Playground loads an editable
data_retention_settings resource.

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

CLAassistant commented Jun 19, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ pheekus
❌ Brett Florio


Brett Florio seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Brett Florio seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Brett Florio and others added 2 commits July 29, 2026 18:15
…field

data_retention now lives on the Store resource (not a sub-resource), so the
form binds to a store and edits the nested data_retention object via custom
get/set + this.edit() (the StoreForm pattern). Update v8n/hiddenSelector to
read data_retention.*, stories to a store href, and tests.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UGvyb3Yx7kGiTWfaVnBa4u
…e field

The form edits the store's `data_retention` field, but the demo server still
carried a `data_retention_settings` collection from the earlier sub-resource
design. Nothing referenced it.

- drop the orphan collection and its links entry
- add `data_retention` to the demo store so it carries the field
- regenerate the test groups so the new element's tests get a group

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@brettflorio
brettflorio requested a review from pheekus September 17, 2026 18:09
Data retention lives in the store's `data_retention` field, so it belongs in
the store form rather than in an element of its own. Adds a "Data retention"
summary section with the auto-anonymize switch and the days-of-inactivity
number control, and drops the standalone DataRetentionSettingsForm.

- v8n: 90-day minimum, days required while auto-anonymize is on
- days control only renders while auto-anonymize is on
- tests moved into the StoreForm suite

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
pheekus
pheekus previously approved these changes Sep 17, 2026
@pheekus

pheekus commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

@brettflorio I've moved data retention settings into foxy-store-form because they are no longer a standalone API resource. Otherwise looks good, approved.

@pheekus

pheekus commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Let me fix that Netlify build first though.

The lockfile pinned 1.16.2, whose Store graph has no `data_retention`, so
`edit({ data_retention })` failed the build with TS2345.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@pheekus

pheekus commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Ah it was an old SDK version. @brettflorio ready to merge now.

@pheekus
pheekus self-requested a review September 17, 2026 22:43

Copy link
Copy Markdown
Contributor Author

@filipcujanovic This one's done now, if you needed it for the other related PRs. cc @adamjudd

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.

3 participants