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

Feat: user import action: imported dynamic data replaces pre-existing rather than merging #2824

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

jfmcquade
Copy link
Collaborator

@jfmcquade jfmcquade commented Feb 27, 2025

PR Checklist

Description

When restoring user profile info via the user: import template action, the user's dynamic data is now reset before the new data is imported. Previously, the imported data would be merged on top of any existing dynamic data as updates.

Additionally, the new underlying logic to reset all dynamic data is exposed in these ways:

  • Via calling the reset_data template action without specifying a _list_id to reset
  • On the /user debug page

Git Issues

Closes #2810, #2652

As noted in issue, we may want to offer various merge strategies and expose these to template actions. For example, click | user: import | user_id: a_user_id, merge_strategy: replace. This should be added as a follow-up issue after merging.

Screenshots/Videos

user: import flow demo:
Making change on feat_data_actions -> Sync data to server -> make additional changes on feat_data_actions -> import synced data via /user debug page -> return to feat_data_actions to see how imported changes have replaced intermediate updates. This is contrasted with the behaviour on master, where the imported updates are merged on top of intermediate updates (when executing the precise user journey shown here on master, the final state of the data list is ✅, ❌, ❌)

User.import.flow.mov

New reset buttons at bottom of /user debug page:

Screenshot 2025-02-27 at 18 01 48

Updated feat_data_actions template:
Screenshot 2025-02-27 at 18 02 28

@github-actions github-actions bot added the feature Work on app features/modules label Feb 27, 2025
@jfmcquade jfmcquade changed the title Feat: user import dynamic data merge strategy Feat: user import action: imported dynamic data replaces pre-existing Feb 27, 2025
@jfmcquade jfmcquade changed the title Feat: user import action: imported dynamic data replaces pre-existing Feat: user import action: imported dynamic data replaces pre-existing rather than merging Feb 27, 2025
@esmeetewinkel
Copy link
Collaborator

@jfmcquade Does this also close #2652?

Copy link

github-actions bot commented Mar 6, 2025

Visit the preview URL for this PR (updated for commit 9202f87):

https://plh-teens-app1--pr2824-feat-user-import-dya-92h3ciaj.web.app

(expires Thu, 20 Mar 2025 17:28:36 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: e4c0bab6b08dd290fbf002fd6e07987fa4b5fce1

Copy link
Collaborator

@esmeetewinkel esmeetewinkel left a comment

Choose a reason for hiding this comment

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

I can't consistently get this to work (in video below I get no data, but I also think I've seen merged data...). I'm testing from the PR preview branch in a regular and private browser window.

Screenity.video.-.Mar.6.2025.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Work on app features/modules test - preview Create a preview deployment of the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] User import action does not update progress negatively
2 participants