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

fix: diff no changes #4480

Merged
merged 1 commit into from
Aug 11, 2023
Merged

fix: diff no changes #4480

merged 1 commit into from
Aug 11, 2023

Conversation

kwasniew
Copy link
Contributor

@kwasniew kwasniew commented Aug 11, 2023

About the changes

  • omit createdAt and createdBy in segments
  • rename variables for segments (they were copied from strategies)
  • fixed our diff component as it was never showing (no changes) and was showing the entire new code on no changes.
  • added missing tests for event diff

before:
Screenshot 2023-08-11 at 11 17 51

after:
Screenshot 2023-08-11 at 11 59 52

Important files

Discussion points

@vercel
Copy link

vercel bot commented Aug 11, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 11, 2023 10:22am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Aug 11, 2023 10:22am


if (diffs) {
changes = diffs
.map(buildDiff)
.sort(sort)
.map(({ value }) => value);
} else {
} else if (entry.data == null || entry.preData == null) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

you have to expand a few lines below to see how changes.length was never 0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the entire new or old code should be shown only when one of the data or preData is null o rundefined. If both are provided we should not go in here

@kwasniew kwasniew requested a review from sjaanus August 11, 2023 10:22
@kwasniew kwasniew merged commit c1fe43f into main Aug 11, 2023
17 checks passed
@kwasniew kwasniew deleted the fix-diff-no-changes branch August 11, 2023 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants