Deprecated BadgeType (re-exported appui-abstract type) and added BadgeKind as replacement.
Deprecated all properties that use BadgeType and created badgeKind properties that use BadgeKind type as replacements.
Deprecated PopupItem, PopupItemProps, PopupItemWithDrag, PopupItemWithDragProps, ToolbarPopupContext, ToolbarPopupContextProps, useToolbarPopupContext. These components, context and hook are used internally to construct toolbars. I chose to deprecate these now because I used the new BadgeKind type inside the components but did not want to change the public props of PopupItem and PopupItemWithDrag.
Also added internal CommonToolbarItemWithBadgeKind, GroupButtonWithBadgeKind, ActionButtonWithBadgeKind types which extend types from appui-abstract to allow the toolbars to work with the new BadgeKind type. Not the cleanest solution but all of this logic is internal so there are no changes to the public api concerning this change.
Testing
Tested in standalone test-app. Added some tests for badges in various components. Updated storybook to showcase badges in toolbars, widget tabs and context menu.
Changes
BadgeType
(re-exportedappui-abstract
type) and addedBadgeKind
as replacement.BadgeType
and createdbadgeKind
properties that useBadgeKind
type as replacements.PopupItem
,PopupItemProps
,PopupItemWithDrag
,PopupItemWithDragProps
,ToolbarPopupContext
,ToolbarPopupContextProps
,useToolbarPopupContext
. These components, context and hook are used internally to construct toolbars. I chose to deprecate these now because I used the newBadgeKind
type inside the components but did not want to change the public props ofPopupItem
andPopupItemWithDrag
.CommonToolbarItemWithBadgeKind
,GroupButtonWithBadgeKind
,ActionButtonWithBadgeKind
types which extend types fromappui-abstract
to allow the toolbars to work with the newBadgeKind
type. Not the cleanest solution but all of this logic is internal so there are no changes to the public api concerning this change.Testing
Tested in standalone test-app. Added some tests for badges in various components. Updated storybook to showcase badges in toolbars, widget tabs and context menu.