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: show changes that would be overwritten in change request overview UI #5964

Merged
merged 28 commits into from
Jan 22, 2024

Conversation

thomasheartman
Copy link
Contributor

@thomasheartman thomasheartman commented Jan 19, 2024

This PR adds a first, rough iteration of what it could look like to show changes that would be overwritten by applying a PR.

The changes are listed in a table (semantically; looks more like a list visually) and show the property, the current live value and the version that you have in your changes. The changes are hidden by default, but can be shown by expanding a details element.

@nicolaesocaciu Suggested that we merge this version for now and iterate on the design later.

Here's what it looks like closed:
image

Here's what it looks like with a typical change load:
image

Here's what it looks like if you change more or less every property changed:
image

…ten by applying a CR

This change adds an algorithm with tests for detecting what changes
would be overwritten by applying a CR.

Test cases:
- It compares strategies regardless of order of keys in the objects.
This ensures that two strategies with the same content but different
order of keys are compared correctly.
- It treats `undefined` or missing segments in old config as equal to `[]` in change
- It treats `undefined` or missing strategy variants in old config and
change as equal to `[]`
- It lists changes in a sorted list with the correct values
- It ignores object order on nested objects. Similar to the first
point, this does order-insensitive comparison for nested objects (such
as params and constraints).
Because the types are different, there's no chance of mixing them up
Copy link

vercel bot commented Jan 19, 2024

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 Jan 19, 2024 2:08pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Jan 19, 2024 2:08pm

@thomasheartman thomasheartman force-pushed the feat/add-conflict-detection-algorithm branch from c31ca2a to 83b29b4 Compare January 19, 2024 07:57
Copy link
Contributor

@andreas-unleash andreas-unleash left a comment

Choose a reason for hiding this comment

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

LG

@thomasheartman thomasheartman merged commit 0bb709a into main Jan 22, 2024
12 checks passed
@thomasheartman thomasheartman deleted the feat/display-changes-to-be-overwritten branch January 22, 2024 07:13
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