Skip to content

[TAS-6774] ✨ Add public domain flag to book settings and bulk upload - #827

Merged
nwingt merged 1 commit into
likecoin:masterfrom
nwingt:tas-6774
Oct 27, 2026
Merged

nwingt merged 1 commit into
likecoin:masterfrom
nwingt:tas-6774

Conversation

@nwingt

@nwingt nwingt commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

QA screenshots

Tested on https://publish.sepolia.3ook.com (2026-10-26), publisher account, API deployed to rinkeby.

Book settings: both toggles, off by default, then on

toggles off

toggles on

Review step: Yes / No

review yes

review no

Edit settings: saved and reloaded, off then on

saved off

saved on

Bulk upload: CSV field help, review table, result CSV

csv field help

bulk review table

result csv

Invalid value (yes) is rejected

validation error

@notion-workspace

Copy link
Copy Markdown

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.

🔵 Needs a closer look

The change is broad and functionally correct but depends on a coordinated backend release (likecoin-api-public#1533) that an automated reviewer cannot verify, warranting human sign-off.

No open issues 🎉

What changed in this PR

This PR adds a "Public domain" (isPublicDomain) flag to both the book settings UI and the CSV-driven bulk-upload flow, stacked on top of #826 (which introduced the AI-generated-content flag). The diff therefore also carries the hasAiGeneratedContent and a bulk-only, one-way isLikerLandArt flag. The implementation mirrors the existing isAdultOnly listing-flag pattern end-to-end: type definitions, defaults, parse/validate/serialize round-trips, the review table, the settings form, the review cards, the edit-change labels, and both i18n locales. It depends on backend support in likecoin-api-public#1533.

Changes:

  • Adds isPublicDomain (plus hasAiGeneratedContent) toggles to BookSettingsFields and wires them through the pricing draft, settings composable, publish payload, review cards, and edit-change tracking.
  • Extends the bulk-upload pipeline with is_public_domain, has_ai_generated_content, and a one-way is_liker_land_art CSV column (constants, parse, validate, serialize, result CSV, review table, template) and sends isLikerLandArt only when true.
  • Adds matching en.json/zh-TW.json strings for all new columns, labels, and hints.
File Description
i18n/​locales/​zh-TW.json Authoritative zh-TW strings for new CSV descriptions, review-table headers, and form labels/hints
i18n/​locales/​en.json English translations mirroring the new zh-TW keys
app/​utils/​bulk-upload.ts Adds three CSV columns across column list, defaults, parse, validate, serialize, and result CSV
app/​types/​publish.ts Adds hasAiGeneratedContent/isPublicDomain to PricingFormSettings
app/​types/​bulk-upload.ts Adds new flags to CSV row, book, and serialized-book interfaces
app/​types/​book.ts Adds optional hasAiGeneratedContent/isPublicDomain to ClassListingData
app/​pages/​new-book.vue Seeds the new flags in the default listing draft
app/​pages/​bulk-upload.vue Adds review-table columns/cells, review data mapping, and template columns
app/​constant/​index.ts Adds CSV_DEFAULT_* constants (all false)
app/​composables/​usePublishBook.ts Sends the new flags in the single-book listing payload
app/​composables/​useBulkUpload.ts Sends isPublicDomain/hasAiGeneratedContent always, isLikerLandArt only when true
app/​composables/​useBookListingSettings.ts Adds refs, init, snapshot/restore, and settings payload handling
app/​composables/​useBookEditChanges.ts Maps new fields to their label keys
app/​components/​publish/​SaleSettingsCard.vue Binds new v-models to BookSettingsFields
app/​components/​publish/​ReviewStep.vue Passes new props to the review pricing card
app/​components/​publish/​ReviewPricingCard.vue Adds props and settings rows for the new flags
app/​components/​BookSettingsFields.vue Adds toggle rows and required defineModels
app/​components/​book-status/​BookListingSettingsCard.vue Binds new v-models from the settings context

I verified completeness against the established isAdultOnly pattern (all 11 call sites updated), confirmed CSV column ordering is consistent across CSV_ALL_COLUMNS, generateResultCSV, and the template, and confirmed full i18n key parity across both locales. No concrete code defects were found.

Review effort: Balanced

@nwingt
nwingt force-pushed the tas-6774 branch 2 times, most recently from 39eaaaf to 97dcf4e Compare October 24, 2026 02:52
@nwingt
nwingt requested a balanced review from Copilot October 26, 2026 16:41
@notion-workspace

Copy link
Copy Markdown

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.

🟢 Approval recommended

The flag is threaded completely and consistently through every layer following the established parallel-flag pattern, with i18n parity preserved and no objective issues found.

No open issues 🎉

Review effort: Balanced

@nwingt
nwingt merged commit d67b0d2 into likecoin:master Oct 27, 2026
1 check passed
@nwingt
nwingt deleted the tas-6774 branch October 27, 2026 15:46
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