-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(glossary) Fix Glossary success messages and sort Glossary (#5533)
* show error and success messages in glossary properly * sort glossary nodes and terms alphabetically Co-authored-by: Chris Collins <[email protected]>
- Loading branch information
1 parent
d1f0c7a
commit d9d7764
Showing
8 changed files
with
55 additions
and
14 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
datahub-web-react/src/app/entity/glossaryNode/ChildrenTab.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { Entity, EntityType } from '../../../types.generated'; | ||
import EntityRegistry from '../EntityRegistry'; | ||
|
||
export function sortGlossaryNodes(entityRegistry: EntityRegistry, nodeA?: Entity | null, nodeB?: Entity | null) { | ||
const nodeAName = entityRegistry.getDisplayName(EntityType.GlossaryNode, nodeA); | ||
const nodeBName = entityRegistry.getDisplayName(EntityType.GlossaryNode, nodeB); | ||
return nodeAName.localeCompare(nodeBName); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { Entity, EntityType } from '../../../types.generated'; | ||
import EntityRegistry from '../EntityRegistry'; | ||
|
||
export function sortGlossaryTerms(entityRegistry: EntityRegistry, nodeA?: Entity | null, nodeB?: Entity | null) { | ||
const nodeAName = entityRegistry.getDisplayName(EntityType.GlossaryTerm, nodeA) || ''; | ||
const nodeBName = entityRegistry.getDisplayName(EntityType.GlossaryTerm, nodeB) || ''; | ||
return nodeAName.localeCompare(nodeBName); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters