Skip to content
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

Worked on the feature to update group title #6047

Conversation

Ankit-Keshari-Vituity
Copy link
Contributor

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@github-actions github-actions bot added the product PR or Issue related to the DataHub UI/UX label Sep 26, 2022
@github-actions
Copy link

github-actions bot commented Sep 26, 2022

Unit Test Results (build & test)

591 tests   587 ✔️  13m 42s ⏱️
146 suites      4 💤
146 files        0

Results for commit 900dba3.

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@chriscollins3456 chriscollins3456 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! some small comments then i think this is good to go

Comment on lines 71 to 72
String tagUrn = _entityClient.ingestProposal(proposal, context.getAuthentication());
OwnerUtils.addCreatorAsOwner(context, tagUrn, OwnerEntityType.CORP_USER, OwnershipType.TECHNICAL_OWNER, _entityService);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can change tagUrn -> domainUrn

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked and Fixed!!

Comment on lines 64 to 65
String tagUrn = _entityClient.ingestProposal(proposal, context.getAuthentication());
OwnerUtils.addCreatorAsOwner(context, tagUrn, OwnerEntityType.CORP_USER, OwnershipType.TECHNICAL_OWNER, _entityService);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same, tagUrn -> glossaryNodeUrn

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked and Fixed!!

Comment on lines 64 to 66
String tagUrn = _entityClient.ingestProposal(proposal, context.getAuthentication());
OwnerUtils.addCreatorAsOwner(context, tagUrn, OwnerEntityType.CORP_USER, OwnershipType.TECHNICAL_OWNER, _entityService);
return tagUrn;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tagUrn -> glossaryTermUrn

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked and Fixed!!

@@ -91,6 +103,29 @@ export default function GroupInfoSidebar({ sideBarData, refetch }: Props) {
/* eslint-disable @typescript-eslint/no-unused-vars */
const [editGroupModal, showEditGroupModal] = useState(false);
const canEditGroup = true; // TODO; Replace this will fine-grained understanding of user permissions.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you update this to reflect our permissions? you can do something like

const me = useGetAuthenticatedUser();
const canEditGroup = me?.platformPrivileges.manageIdentities;

and then can you add a check to ensure that they have these permissions before making the name editable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked and Fixed!!

Copy link
Collaborator

@chriscollins3456 chriscollins3456 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking good! the comments I have are around the functionality change fro DeprecationPill.

In the future, when you have separate projects can you put them in separate PRs? for example, your work on editing group names and adding owners on creation of terms, nodes, and domains is done, but now it's intermingled with your new deprecation pill work.

Comment on lines 175 to 177
<GroupTitle level={3} editable={{ onChange: handleTitleUpdate }}>
{groupTitle}
</GroupTitle>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you use the new canEditGroup to make it so they can't edit the name if they can't edit the group? check below for the aboutText where we say editable={canEditGroup ? { onChange: onSaveAboutMe } : false} as an example

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked and Fixed!!

Sure. For the next time onward I'll definitely create a new PR for each task.

)}
{isDividerNeeded && <ThinDivider />}
<Button
type="default"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of using Button here, can we actually just make this text with font-size 12px and a hover state with blue[5] as the color on hover?
Here's some screenshots of what I'm thinking:
image

on hover:
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked and Fixed!!

@@ -56,11 +57,14 @@ const StyledInfoCircleOutlined = styled(InfoCircleOutlined)`
`;

type Props = {
urns: Array<string>;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while the mutation below is batch, I think this pill is only relevant to one entity at a time, so I think this can be a singular urn.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked and Fixed!!

})
}
>
Mark as un-deprecated
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also don't think we want this button to be shown every time we show this pill. ie. we don't want them to be able to undeprecate from the search results page so DefaultPrevieCard instances of this pill shouldn't show this button.

What do you think about adding a new optional prop called showUndeprecate that will show this button if you pass it in?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked and Fixed!!

<LastEvaluatedAtLabel>{decommissionTimeLocal}</LastEvaluatedAtLabel>
</Tooltip>
</Typography.Text>
<>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you need these extra fragments around the decommission time piece

Copy link
Collaborator

@chriscollins3456 chriscollins3456 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@chriscollins3456
Copy link
Collaborator

you're getting failing tests on CreateDomainResolverTest, CreateGlossaryNodeResolverTest, and CreateGlossaryTermResolverTest. Anywhere you instantiate CreateDomainResolver, CreateGlossaryNodeResolver, or CreateGlossaryTermResolver in those tests, you're going to need to pass in a new mock entity service.

Check out AddTagsResolverTest.java where we pass in EntityService mockService = Mockito.mock(EntityService.class); to AddTagsResolver resolver = new AddTagsResolver(mockService);

@@ -10,7 +10,7 @@
import com.linkedin.metadata.Constants;
import com.linkedin.metadata.key.GlossaryTermKey;
import com.linkedin.metadata.utils.GenericRecordUtils;
import com.linkedin.mxe.MetadataChangeProposal;
gitimport com.linkedin.mxe.MetadataChangeProposal;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gotta remove the "git" here as that's causing a failing build

@chriscollins3456 chriscollins3456 merged commit 11092c7 into datahub-project:master Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product PR or Issue related to the DataHub UI/UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants