1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-01 00:08:27 +01:00
unleash.unleash/frontend/src/component/changeRequest
Thomas Heartman 2531819222
fix: CR strategy name changes code (#4449)
This change addresses two things that were done in
https://github.com/Unleash/unleash/pull/4004 and that I believe to be
bugs.

1. It shows the previous strategy name also if there was no previous
title. So if there was no previous title, it'll show the strategy name
with a strikethrough and then the new title (see the discussion
section).
2. It changes a `span` component to a [`del`
component](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/del).
I believe the
span was erroneously changed from a `s` component (strikethrough
component) in the linked PR (based on a comment on the PR). This
caused the strikethrough to not be there anymore. However, the `del`
component is semantically more correct and reintroduces the
strikethrough, so it is a better change.
3. It uses [`ins`
elements](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ins)
for names that have changed.

Finally, it removes a redundant pair of curly braces.

How it looks now:


![image](https://github.com/Unleash/unleash/assets/17786332/a9947619-056d-4cd8-8b44-8a562c83ba40)


## Discussion

Regarding point 1: It might be that we don't want to show a
strikethrough through the name of the strategy if there was no previous
title. In that case, the changes related to the first point should be
removed. If we do that, it looks like this:


![image](https://github.com/Unleash/unleash/assets/17786332/aeb6c86c-d283-4703-96e6-c4302d252417)

It makes it harder (impossible, actually) to see when a custom title was
added, but that might be what we want.

But maybe the solution is to also use `ins` elements for new data. That
way the difference is visible (and semantically correct):

![image](https://github.com/Unleash/unleash/assets/17786332/ef13a745-9f9c-4b1a-886f-a7917eb12190)
2023-08-09 12:47:02 +00:00
..
ChangeRequest fix: CR strategy name changes code (#4449) 2023-08-09 12:47:02 +00:00
ChangeRequestConfirmDialog
ChangeRequestOverview fix: can review CR with skip change request (#3998) 2023-06-16 13:36:23 +02:00
ChangeRequestSidebar feat: segments in pending CR screen (#4420) 2023-08-04 15:34:03 +03:00
ChangeRequestStatusBadge
ProjectChangeRequests feat: add UI to variant metrics (#3697) 2023-05-08 10:15:26 +00:00
ChangeRequest.test.tsx feat: segments in pending CR screen (#4420) 2023-08-04 15:34:03 +03:00
changeRequest.types.ts Feat(#4209): add conflict marker to segment changes (#4447) 2023-08-08 12:36:45 +00:00
ChangeRequestPermissions.test.tsx fix: Performance improvements for demo and docs update (#4454) 2023-08-09 12:58:03 +02:00
changesCount.ts feat: segments in pending CR screen (#4420) 2023-08-04 15:34:03 +03:00