-
Notifications
You must be signed in to change notification settings - Fork 73
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 D&D resource display names #5498
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
fides Run #11090
Run Properties:
|
Project |
fides
|
Branch Review |
refs/pull/5498/merge
|
Run status |
Passed #11090
|
Run duration | 00m 38s |
Commit |
f0d554c5f3 ℹ️: Merge 3ca7ec519d513826ed85c5bbf999434f946e6a7c into c7e645fd2d7e6d7367d961443817...
|
Committer | jpople |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
0
|
Skipped |
0
|
Passing |
4
|
Upgrade your plan to view test results. | |
View all changes introduced in this branch ↗︎ |
!resource.parent_table_urn || | ||
splitUrn.length === TOP_LEVEL_FIELD_URN_PARTS | ||
!table_name || | ||
!top_level_field_name || |
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.
If it would be helpful I am adding in top_level_field_urn
as well in this PR: https://github.com/ethyca/fidesplus/pull/1727/files#diff-8bd50e59212bea55bbd599dd3564999eecbda0c718c2681318bbc990a29d28c9R354
not sure if it's actually better or the same as top_level_field_name
but I figured better to give as much info as possible now and then we can remove one later if it's not helpful
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 imagine top_level_field_name
to be maybe a little tricky in structures like
same_name
|------- same_name
|------- same_name
|------- same_name
etc etc
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.
Thanks for flagging-- yeah, that'll make this much cleaner if I can just elide that.
// for a subfield, we want to show all subfield names separated by "." | ||
return splitUrn.slice(TOP_LEVEL_FIELD_URN_PARTS).join(URN_SEPARATOR); | ||
partsToRemove.forEach((part) => { | ||
const index = splitUrn.indexOf(part!); |
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.
super nitpicky: I would feel more comfortable with this if it were wrapped in an if
rather than using a forced Type !
const index = splitUrn.indexOf(part!); | |
if (!!part) { | |
const index = splitUrn.indexOf(part); |
Take this example:
"my string has a null word in it".indexOf(null);
returns 16
because Javascript!
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.
Code looks good. Thanks for updating the nitpick.
fides Run #11092
Run Properties:
|
Project |
fides
|
Branch Review |
main
|
Run status |
Passed #11092
|
Run duration | 00m 38s |
Commit |
ee3924d878: Fix D&D resource display names (#5498)
|
Committer | jpople |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
0
|
Skipped |
0
|
Passing |
4
|
Upgrade your plan to view test results. | |
View all changes introduced in this branch ↗︎ |
Closes #HJ-162
Description Of Changes
Fixes D&D resource display names to be more generalizable across systems and handle some edge cases better by no longer relying (solely) on URN length.
Steps to Confirm
To test, have some data in your detection or discovery tables with:
.
Pre-Merge Checklist
CHANGELOG.md
updatedmain
downgrade()
migration is correct and works