-
Notifications
You must be signed in to change notification settings - Fork 275
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
Link component change in href rendering behaviour without applicable unit test #1909
Comments
@mg-aceik Hey if (
!field ||
(!(field as LinkFieldValue).editable &&
!field.value &&
!(field as LinkFieldValue).href &&
!field.metadata)
) {
return null;
} |
Ok you're right I saw that my links that have a I've added unit tests here: https://github.com/mg-aceik/jss/pull/1/files
|
Hi @mg-aceik I registered a bug for our backlog for this. Can you help us in prioritizing it, if you have a detailed repro scenario? |
This was just something my unit tests picked up for my components that were using links. I am ok with the change, I think, but just saw that there wasn't any unit test your side to cover the change, as I presume your team made this change to fix something but it has no unit test so it feels like it could be unintentional. |
@mg-aceik it is unintentional indeed, and more of a case that hasn't crossed our our field of view. We've added an item to backlog to address this, fortunately it's not a severe bug. |
Describe the Bug
The change here b4309e8#diff-cd0f8f166dc72a9504e6cf7b0dfaaf409561f62d651b115c3e8185151162c7e1R36 in JSS 21.1.0 is a breaking change in that it needs a metadata property otherwise it will not render the link.
There isn't actually any unit test that is asserting this - e.g. you could have a field with a value and href, but if no metadata is set then it still returns null. I'm not sure if that was intentional or not and so I think a unit test should be added to assert that it was intentional.
To Reproduce
N/A
Expected Behavior
N/A
Possible Fix
N/A
Provide environment information
The text was updated successfully, but these errors were encountered: