-
-
Notifications
You must be signed in to change notification settings - Fork 658
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: CR strategy name changes code #4449
Conversation
This change addresses two things that were done in #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. 2. It changes a `span` component to a `del` component. 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. Finally, it removes a redundant pair of curly braces.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the last option you suggested with ins the most.
Since we have lots of "if this then that" dilemmas and this code is at the core of Unleash I'd add a unit test for the tooltip describing the 3 cases you put as screenshots. I know it takes more time to finish the work but in this case it seems to be justified.
This change addresses two things that were done in
#4004 and that I believe to be bugs.
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).
span
component to adel
component. I believe thespan was erroneously changed from a
s
component (strikethroughcomponent) 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.
ins
elements for names that have changed.Finally, it removes a redundant pair of curly braces.
How it looks now:
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:
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):