Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Hold] feat(imports): Add CmsBatchImport events #562

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

damassi
Copy link
Member

@damassi damassi commented Feb 25, 2025

The type of this PR is: Feat

Description

This updates cohesion with the new BatchImports events.

Additionally (per our discussion @leodmz) starts organizing our CMS-specific events inside of an src/Schema/CMS folder, mirroring how things are structured in web / ios folders:

├── Schema
│   ├── CMS
│   │   ├── Events
│   │   └── Values

An updated organization like this will become imperative as we continue migrating CMS pages to our modern patterns and moving legacy CMS events over to cohesion.

Note that CMS interfaces/events/values have been prefixed with a CMS identifier. This shouldn't preclude mixing in events from other parts of the schema in an event (like Event.click), only that now we can go directly to the CMS folder not get lost in collector-specific events, and avoid type clashes.

cc @artsy/amber-devs

PR Checklist (tick all before merging)

  • If I've added a new file to the tree I've exported it from the common index.ts
  • I've added comments with examples for any new interfaces and ensured that they're in the docs
  • No platform-specific terminology has been used outside of click and tap (platform is inferred by the DB storing events)
📦 Published PR as canary version: 4.238.1--canary.562.11138.0

✨ Test out this PR locally via:

npm install @artsy/[email protected]
# or 
yarn add @artsy/[email protected]

@damassi damassi requested review from leodmz and a team February 25, 2025 00:17
@damassi damassi self-assigned this Feb 25, 2025
@artsy-peril artsy-peril bot added the Version: Minor A deploy for new features label Feb 25, 2025
@damassi damassi added canary Create a canary build and removed Version: Minor A deploy for new features labels Feb 25, 2025
@damassi damassi force-pushed the damassi/feat/batch-import branch from 7631ab9 to 03f1aa2 Compare February 25, 2025 00:18
@damassi damassi assigned leodmz and unassigned damassi Feb 25, 2025
@damassi damassi force-pushed the damassi/feat/batch-import branch 3 times, most recently from b1ac220 to 7e4bc6d Compare February 25, 2025 00:54
* {
* context_module: "batchImportFlow",
* context_page_owner_type: "batchImport",
* context_page_owner_id: "67b646ecbe87376bfeb3f962",
Copy link
Member Author

Choose a reason for hiding this comment

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

Ditto here; where the partner is given the option to download we haven't yet generated an import ID. Cool if we pass an empty string here?

@damassi damassi force-pushed the damassi/feat/batch-import branch from 7e4bc6d to 9deed32 Compare February 25, 2025 01:05
* {
* event: "csvImportError",
* context_page_owner_type: "batchImport",
* context_page_owner_id: "67b646ecbe87376bfeb3f962",
Copy link
Member Author

@damassi damassi Feb 25, 2025

Choose a reason for hiding this comment

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

☝️ If there's a (fatal) error during import we don't generate an ID.

If there's a warning, where some rows can be imported, we do have an ID.

@damassi damassi force-pushed the damassi/feat/batch-import branch from 9deed32 to 139e039 Compare February 25, 2025 04:14
@damassi damassi changed the title feat(imports): Add CmsBatchImport events [Hold] feat(imports): Add CmsBatchImport events Feb 25, 2025
@artsy-peril
Copy link
Contributor

artsy-peril bot commented Feb 25, 2025

Fails
🚫

Hi there! 👋

We use conventional commit formatting which has not been detected in your PRs title.

Refer to README#327 and Conventional Commits for PR/commit formatting guidelines.

Generated by 🚫 dangerJS against e0560f9

@leodmz
Copy link
Contributor

leodmz commented Mar 12, 2025

@damassi Amended the PR after reviewing what's available in the BE.
Changes are:

  • removed both warning and error events that are tracked in the BE
  • added an exit click event to track when partners click to exit the flow

@damassi
Copy link
Member Author

damassi commented Mar 12, 2025

Sweet, thanks @leodmz. I'll rebase and merge this!

Copy link
Contributor

@jpotts244 jpotts244 left a comment

Choose a reason for hiding this comment

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

sounds great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
canary Create a canary build
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants