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: incremental updates for mobile transformer #19567

Merged
merged 8 commits into from
Jan 3, 2024

Conversation

pauldambra
Copy link
Member

@pauldambra pauldambra commented Jan 2, 2024

first pass at adding incremental mutations

created some fake mobile recordings locally and these behaved as expected

this adds:

  • removals
    • these can be passed through - they're the same as rrweb
  • adds
    • the added wireframes can be converted just like in full snapshots (I think)
  • updates
    • these are implemented as removes and then adds
    • this might not work on recordings with very many mutations but it'll be at least enough for us to get some folk testing it and we should have few enough mutations that it'll be ok

Copy link
Contributor

github-actions bot commented Jan 2, 2024

Size Change: 0 B

Total Size: 2 MB

ℹ️ View Unchanged
Filename Size
frontend/dist/toolbar.js 2 MB

compressed-size-action

@pauldambra pauldambra marked this pull request as ready for review January 2, 2024 22:06
@pauldambra pauldambra requested a review from a team January 2, 2024 22:06
@marandaneto
Copy link
Member

More like a question, since we have synthetic IDs, what if the removed/updated wireframe is a synthetic ID? Would that work the way how it is implemented? I believe the synthetic IDs are just the nested components right?

For example, a button on Mobile is a div and a nested text, if I remove or update the button, is the whole div and text correctly mutated?

Copy link
Member

@marandaneto marandaneto left a comment

Choose a reason for hiding this comment

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

Left a comment but otherwise LGTM

if (convertedEl !== null) {
acc.push(convertedEl)
}
return acc
}, [] as serializedNodeWithId[])
}

function isMobileIncrementalSnapshotEvent(x: unknown): x is MobileIncrementalSnapshotEvent {
Copy link
Contributor

Choose a reason for hiding this comment

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

Feels like this does a little more than just checking the type on the event

Suggested change
function isMobileIncrementalSnapshotEvent(x: unknown): x is MobileIncrementalSnapshotEvent {
function isValidMobileIncrementalSnapshotEvent(x: unknown): x is MobileIncrementalSnapshotEvent {

Copy link
Member Author

Choose a reason for hiding this comment

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

hmmm, I want to split this up more so I'm going to punt this into the future

@pauldambra pauldambra merged commit 388d88d into master Jan 3, 2024
77 checks passed
@pauldambra pauldambra deleted the feat/incremental-updates-for-mobile-transformer branch January 3, 2024 10:31
@pauldambra pauldambra mentioned this pull request Jan 3, 2024
19 tasks
fuziontech pushed a commit that referenced this pull request Jan 4, 2024
first pass at adding incremental mutations

created some fake mobile recordings locally and these behaved as expected

this adds:

removals
these can be passed through - they're the same as rrweb
adds
the added wireframes can be converted just like in full snapshots (I think)
updates
these are implemented as removes and then adds
this might not work on recordings with very many mutations but it'll be at least enough for us to get some folk testing it and we should have few enough mutations that it'll be ok
fuziontech added a commit that referenced this pull request Jan 4, 2024
* master: (94 commits)
  feat: Add cta on billing for >20k annual spend customers (#19508)
  refactor(temporal/squash): Support flat person override table in squash workflow (#19347)
  fix(surveys): remove link in user interview template (#19584)
  feat: populate plugin capabilities on install and edit (#19188)
  chore: Make plugin-server ignore deleted plugin configs (#18444)
  chore: Add Flutter feature flags snippets (#19563)
  fix(bi): fixed some of the query duplications (#19573)
  fix: assume typeless series nodes are of type events node (#19550)
  chore(deps): bump chromaui/action from 1 to 10 (#19560)
  fix(trends): fix breakdowns persons label (#19534)
  fix(trends): fix breakdown legend (#19533)
  feat: incremental updates for mobile transformer (#19567)
  chore(deps): bump peter-evans/find-comment from 1 to 2 (#19559)
  chore(data-warehouse): cleanup unused celery code and extend time (#19568)
  Revert "feat(data-warehouse): hubspot integration" (#19569)
  feat(data-warehouse): hubspot integration (#19529)
  feat: Feature gate session replay controls using available_product_features (#19401)
  fix: Padding on bullet lists (#19565)
  chore: Post 3000 LemonButtton cleanup (#19540)
  chore(deps): bump aws-actions/amazon-ecr-login from 1 to 2 (#19558)
  ...
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