amundsen-io / amundsen

Amundsen is a metadata driven application for improving the productivity of data analysts, data scientists and engineers when interacting with data.
https://www.amundsen.io/amundsen/
Apache License 2.0
4.39k stars 954 forks source link

feat - Allow Badges to have displayName different from key #2138

Closed B-T-D closed 1 year ago

B-T-D commented 1 year ago

Description

Updates the BadgesListConfig to add an optional key string field. Updates the BadgeList component to use a BadgeConfig's key, if available, instead of its displayName in callback used to apply search filter for a particular badge.

Motivation and Context

Sometimes helpful to be able to have a badge display name that's different from the badge's name in the database (its "key"). The new key field is optional so that BadgeStyleConfigs in existing config-custom.ts files will still work without providing a key.

How Has This Been Tested?

Ran existing tests.

Documentation

To create a badge with different key in database than its displayName:

const configCustom: AppConfigCustom = {
  badges: {
    my_badge: {
      style: BadgeStyle.DEFAULT,
      displayName: "MyBadge",
      key: "my_badge_key",
    },

CheckList