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

feat(ui): Add display name & title to editable corp user properties. #4097

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -138,6 +138,9 @@ public CorpUser update(@Nonnull String urn, @Nonnull CorpUserUpdateInput input,

private RecordTemplate mapCorpUserEditableInfo(CorpUserUpdateInput input, Optional<CorpUserEditableInfo> existing) {
CorpUserEditableInfo result = existing.orElseGet(() -> new CorpUserEditableInfo());
if (input.getDisplayName() != null) {
result.setDisplayName(input.getDisplayName());
}
if (input.getAboutMe() != null) {
result.setAboutMe(input.getAboutMe());
}
Expand All @@ -162,6 +165,9 @@ private RecordTemplate mapCorpUserEditableInfo(CorpUserUpdateInput input, Option
if (input.getEmail() != null) {
result.setEmail(input.getEmail());
}
if (input.getTitle() != null) {
result.setTitle(input.getTitle());
}

return result;
}
Expand Down
Expand Up @@ -21,6 +21,8 @@ public static CorpUserEditableProperties map(@Nonnull final com.linkedin.identit
@Override
public CorpUserEditableProperties apply(@Nonnull final com.linkedin.identity.CorpUserEditableInfo info) {
final CorpUserEditableProperties result = new CorpUserEditableProperties();
result.setDisplayName(info.getDisplayName());
result.setTitle(info.getTitle());
result.setAboutMe(info.getAboutMe());
result.setSkills(info.getSkills());
result.setTeams(info.getTeams());
Expand Down
Expand Up @@ -21,6 +21,8 @@ public static CorpUserProperties map(@Nonnull final com.linkedin.identity.CorpUs
@Override
public CorpUserProperties apply(@Nonnull final com.linkedin.identity.CorpUserInfo info) {
final CorpUserProperties result = new CorpUserProperties();
result.setDisplayName(info.getDisplayName());
result.setTitle(info.getTitle());
result.setActive(info.isActive());
result.setCountryCode(info.getCountryCode());
result.setDepartmentId(info.getDepartmentId());
Expand Down
30 changes: 30 additions & 0 deletions datahub-graphql-core/src/main/resources/entity.graphql
Expand Up @@ -2217,6 +2217,16 @@ Deprecated, use CorpUserEditableProperties instead
Additional read write info about a user
"""
type CorpUserEditableInfo {
"""
Display name to show on DataHub
"""
displayName: String

"""
Title to show on DataHub
"""
title: String

"""
About me section of the user
"""
Expand All @@ -2242,6 +2252,16 @@ type CorpUserEditableInfo {
Additional read write properties about a user
"""
type CorpUserEditableProperties {
"""
Display name to show on DataHub
"""
displayName: String

"""
Title to show on DataHub
"""
title: String

"""
About me section of the user
"""
Expand Down Expand Up @@ -2283,6 +2303,16 @@ type CorpUserEditableProperties {
Arguments provided to update a CorpUser Entity
"""
input CorpUserUpdateInput {
"""
Display name to show on DataHub
"""
displayName: String

"""
Title to show on DataHub
"""
title: String

"""
About me section of the user
"""
Expand Down
Expand Up @@ -41,6 +41,16 @@ record CorpUserEditableInfo {
*/
pictureLink: Url = "https://raw.githubusercontent.com/linkedin/datahub/master/datahub-web-react/src/images/default_avatar.png"

/**
* DataHub-native display name
*/
displayName: optional string

/**
* DataHub-native Title, e.g. 'Software Engineer'
*/
title: optional string

/**
* Slack handle for the user
*/
Expand Down
Expand Up @@ -1674,6 +1674,16 @@
"type" : "com.linkedin.common.Url",
"doc" : "A URL which points to a picture which user wants to set as a profile photo",
"default" : "https://raw.githubusercontent.com/linkedin/datahub/master/datahub-web-react/src/images/default_avatar.png"
}, {
"name" : "displayName",
"type" : "string",
"doc" : "DataHub-native display name",
"optional" : true
}, {
"name" : "title",
"type" : "string",
"doc" : "DataHub-native Title, e.g. 'Software Engineer'",
"optional" : true
}, {
"name" : "slack",
"type" : "string",
Expand Down
Expand Up @@ -2098,6 +2098,16 @@
"type" : "com.linkedin.common.Url",
"doc" : "A URL which points to a picture which user wants to set as a profile photo",
"default" : "https://raw.githubusercontent.com/linkedin/datahub/master/datahub-web-react/src/images/default_avatar.png"
}, {
"name" : "displayName",
"type" : "string",
"doc" : "DataHub-native display name",
"optional" : true
}, {
"name" : "title",
"type" : "string",
"doc" : "DataHub-native Title, e.g. 'Software Engineer'",
"optional" : true
}, {
"name" : "slack",
"type" : "string",
Expand Down
Expand Up @@ -1431,6 +1431,16 @@
"type" : "com.linkedin.common.Url",
"doc" : "A URL which points to a picture which user wants to set as a profile photo",
"default" : "https://raw.githubusercontent.com/linkedin/datahub/master/datahub-web-react/src/images/default_avatar.png"
}, {
"name" : "displayName",
"type" : "string",
"doc" : "DataHub-native display name",
"optional" : true
}, {
"name" : "title",
"type" : "string",
"doc" : "DataHub-native Title, e.g. 'Software Engineer'",
"optional" : true
}, {
"name" : "slack",
"type" : "string",
Expand Down