mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-06 00:07:44 +01:00
c5fced89fb
https://linear.app/unleash/issue/2-582/display-the-change-request-created-with-variants-in-the-ui ![image](https://user-images.githubusercontent.com/14320932/214341314-c4f1aefb-fada-4d59-9d40-86f8dce98b76.png) Includes a basic diff visualisation on variants change requests. It seems like components like `CodeSnippetPopover` and `PopoverDiff` are currently very tightly coupled together with strategies, so I preferred to follow my own approach and leave those alone for now instead of trying to refactor them. `patchVariant` could also be renamed to a more fitting name in the future as well, since we're now doing more of an override than applying a patch. `Diff` is a generic diff component that uses `EventDiff` internally and simply takes into account a "before" and "after" state, as `preData` and `data`. I made some changes to `EventDiff` that made some sense to me: - Cover edge cases where `path` is undefined and `.join` crashes, also fallback to the diff index (or undefined); - Leverage the key to correctly sort the change items in the diff; |
||
---|---|---|
.. | ||
EventCard | ||
EventDiff | ||
EventJson | ||
EventLog | ||
EventPage |