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

fix(ui) Standardize subtypes casing with View Definition tab #7477

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion datahub-web-react/src/app/entity/dataset/DatasetEntity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ export class DatasetEntity implements Entity<Dataset> {
component: ViewDefinitionTab,
display: {
visible: (_, dataset: GetDatasetQuery) =>
(dataset?.dataset?.subTypes?.typeNames?.includes(SUBTYPES.VIEW) && true) || false,
dataset?.dataset?.subTypes?.typeNames
?.map((t) => t.toLocaleLowerCase())
.includes(SUBTYPES.VIEW.toLocaleLowerCase()) || false,
Comment on lines +103 to +105
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this for backwards compatibility? Seems simpler to change SUBTYPES.VIEW to View

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah for backwards compatibility! and just defensive in case it ever changes again, might as well compare them as a standard

enabled: (_, dataset: GetDatasetQuery) =>
(dataset?.dataset?.viewProperties?.logic && true) || false,
},
Expand Down