v2.0.0
2.0.0 (2024-08-23)
Migration Guide
BREAKING CHANGES
General Changes
- ❗ Updated UI5 Web Components to v2. All breaking changes apply to this project as well. ❗
- ❗ The minimum required react and react-dom version is now 18.0.0 ❗
- UI5 Web Components Enums are no longer exported
- the dedicated build for Server Side Rendering in the
ssr
folder has been removed as the UI5 Web Components now natively support being imported in Node.js environments. You can import all components from@ui5/webcomponents-react
. - UI5 Web Components for React is no longer relying on
react-jss
internally, hence the dependency is now removed and thereact-jss
ThemeProvider is no longer rendered as part of ourThemeProvider
. If you are relying onreact-jss
in your application, please make sure to render your ownreact-jss
ThemeProvider. - We stopped recommending
jest
as a testing framework over a year ago, thus thejestSetup
file is removed. We recommend using cypress instead.
Component Changes
ActionSheet
- ActionSheet:
a11yConfig
has been renamed toaccessibilityAttributes
. - ActionSheet: the
portalContainer
prop has been removed as it's not needed anymore - ActionSheet: the
showCancelButton
has been renamed tohideCancelButton
and the logic has been inverted. - ActionSheet: prop
placementType
has been renamed toplacement
,onAfterClose
toonClose
andonAfterOpen
toonOpen
AnalyticalCard
- AnalyticalCard: The
AnalyticalCard
component has been removed. Please use theCard
component instead.
AnalyticalTable
- AnalyticalTable - TypeScript: The internal table instance types were updated, leading to stricter types, so depending on your implementation, you might encounter ts-errors.
- AnalyticalTable:
selectedFlatRows
has been removed from thedetail
object ofonRowSelect
. - AnalyticalTable: The properties and values for the
AnalyticalTableSelectionMode
enum has been changed.SingleSelect
is nowSingle
andMultiSelect
is nowMultiple
. - AnalyticalTable:
a11yConfig
has been renamed toaccessibilityAttributes
. - AnalyticalTable: The
TableScaleWidthMode
enum has been removed, please useAnalyticalTableScaleWidthMode
instead. - AnalyticalTable: The
TableSelectionBehavior
enum has been removed, please useAnalyticalTableSelectionBehavior
instead. - AnalyticalTable: The
TableSelectionMode
enum has been removed, please useAnalyticalTableSelectionMode
instead. - AnalyticalTable: The
TableVisibleRowCountMode
enum has been removed, please useAnalyticalTableVisibleRowCountMode
instead. - AnalyticalTable: The
alwaysShowSubComponent
prop has been removed, please usesubComponentsBehavior
instead. - AnalyticalTable: The default value (
true
) of thesortable
prop has been removed, it is now required to explicitly set this prop, if the table should be sortable. - AnalyticalTable: The
canReorder
column property has been removed, please usedisableDragAndDrop
instead. - AnalyticalTable: When selecting or pressing a row by using the Space key,
onRowClick
andonRowSelect
are now fired onkeyup
instead ofkeydown
. - AnalyticalTable:
portalContainer
has been removed as it's no longer needed due to the Popover API.
Badge
- Badge: the
Badge
component has been renamed toTag
ComboBoxGroupItem
- ComboBoxGroupItem: the
ComboBoxGroupItem
component has been renamed toComboBoxItemGroup
CustomListItem
- CustomListItem: the
CustomListItem
has been replaced with theListItemCustom
component
DynamicPage
- DynamicPage The
DynamicPage
component has been replaced with theui5-dynamic-page
UI5 Web Component, please visit our Migration Guide for more details. - DynamicPage The
DynamicPageHeader
component has been replaced with theui5-dynamic-page-header
UI5 Web Component. - DynamicPage The
DynamicPageTitle
component has been replaced with theui5-dynamic-page-title
UI5 Web Component.
ExpandableText
- ExpandableText: the inherited props
hyphenated
andemptyIndicator
from theText
have been removed. - ExpandableText: the
portalContainer
prop has been removed as it's not needed anymore
FilterBar & FilterGroupItem
-
FilterBar: The
FilterBar
component was completely overhauled and references of input elements aren’t copied to the filters dialog anymore, also internal logic for reordering and selection has been removed, meaning it’s necessary to control their values manually (e.g. via React state). -
FilterBar:
onToggleFilters
: Thedetail
property of the event now only includesvisible
andnativeDetail
properties.filters
andsearch
have been removed. -
FilterBar:
onFiltersDialogSave
: Thedetail
property of the event now only includesselectedFilterKeys
,reorderedFilterKeys
andnativeDetail
properties.elements
,toggledElements
,filters
,search
,orderIds
have been removed. -
FilterBar:
onFiltersDialogCancel
: The event is now a callback instead of aUi5CustomEvent
. It implements theescPressed
parameter. -
FilterBar:
onFiltersDialogClose
: The event is now a callback instead of aUi5CustomEvent
. It implements thecloseTrigger
parameter. -
FilterBar:
onFiltersDialogSelectionChange
: The event is now a callback instead of aUi5CustomEvent
. It implements a payload object as parameter. -
FilterBar:
onFiltersDialogSearch
: The event is now a standardInput
onInput
event. Thedetail
propertiesvalue
andelement
have been removed. -
FilterBar:
onClear
: The event is now a standardToolbarButton
onClick
event. Thedetail
propertiesfilters
andsearch
have been removed. -
FilterBar:
onGo
: The event is now a standardToolbarButton
onClick
event. Thedetail
propertieselements
,filters
,search
,nativeDetail
have been removed. -
FilterBar:
onRestore
: The event is now a callback instead of aCustomEvent
. It implements a payload object as parameter. -
FilterBar:
onFiltersDialogOpen (TypeScript)
: The target of the event is now aToolbarButton
. -
FilterBar:
portalContainer
has been removed as it's no longer needed due to the Popover API used in thePopover
ui5 web component. -
FilterGroupItem:
orderId
has been removed. Please usefilterKey
instead. -
FilterGroupItem: For a better aligned API, the
visible
andvisibleInFilterBar
(default:true
) props have been replaced withhidden
andhiddenInFilterBar
(no default value).
Form
- Form: The
Form
component has been replaced with theui5-form
UI5 Web Component, please visit our Migration Guide for more details.
GroupHeaderListItem
- GroupHeaderListItem: the
GroupHeaderListItem
component has been renamed toListItemGroup
Loader
- Loader: The deprecated
Loader
component has been moved to the@ui5/webcomponents-react-compat
package. Please use theBusyIndicator
instead, as it's now the only loading indicator that is supported by our UX guidelines. Please visit our Migration Guide for more details.
MessageBox
- MessageBox:
onClose
is now a plain callback and not aCustomEvent
event anymore. It now receives two params:action
&escPressed
.
Modals
- Modals: modals are now rendered as children of the
Modals
component instead of being rendered intodocument.body
- Modals: ThemeProvider: the prop
withoutModalsProvider
has been removed. For more information, please refer to our Migration Guide. - Modals: the hooks
useShowDialog
,useShowPopover
,useShowResponsivePopover
,useShowMenu
,useShowMessageBox
anduseShowToast
have been removed. For more information, please refer to our Migration Guide.
MultiComboBoxGroupItem
- MultiComboBoxGroupItem: the
MultiComboBoxGroupItem
has been replaced with theMultiComboBoxItemGroup
component
NotificationAction
- NotificationAction: the
NotificationAction
component has been removed. You can use theMenu
component instead.
ObjectPage, ObjectPageSection, ObjectPageSubSection & ObjectPageTitle
-
ObjectPage:
headerContent
has been renamed toheaderArea
and now only accepts theObjectPageHeader
component. -
ObjectPage:
headerTitle
has been renamed totitleArea
and now only accepts theObjectPageTitle
component. -
ObjectPage:
footer
has been renamed tofooterArea
. -
ObjectPage:
onToggleHeaderContent
has been renamed toonToggleHeaderArea
-
ObjectPage:
onPinnedStateChange
has been renamed toonPinButtonToggle
-
ObjectPage:
headerTitle
now only accepts theObjectPageTitle
component instead of theDynamicPageTitle
. -
ObjectPage:
headerContent
now only accepts theObjectPageHeader
component instead of theDynamicPageTitle
. -
ObjectPage:
a11yConfig.dynamicPageAnchorBar
has been renamed toa11yConfig.objectPageAnchorBar
-
ObjectPage: the props
showHideHeaderButton
andshowTitleInHeaderContent
have been removed. -
ObjectPage: the prop
alwaysShowContentHeader
has been renamed toheaderPinned
-
ObjectPage: the prop
headerContentPinnable
has been renamed tohidePinButton
and its logic has been inverted. The pin button is now shown by default. -
ObjectPage: the prop
showSubHeaderRight
has been removed as it's not defined by design anymore. -
ObjectPage:
a11yConfig
has been renamed toaccessibilityAttributes
. -
ObjectPage (TypeScript): replace
headerTitle
type withReactElement<DynamicPageTitlePropTypes>
-
ObjectPage (TypeScript): replace
headerContent
type withReactElement<DynamicPageHeaderPropTypes>
-
ObjectPage (TypeScript): replace
image
type withstring | ReactElement<AvatarPropTypes>
-
ObjectPageSection: the prop
titleText
is now required. -
ObjectPageSection: the default value
true
for the proptitleTextUppercase
has been removed. -
ObjectPageSubSection: the prop
titleText
is now required. -
ObjectPageTitle:
actions
has been renamed toactionsBar
. Instead of single actions, theToolbar
component should now be passed. -
ObjectPageTitle:
navigationActions
has been renamed tonavigationBar
. Instead of single actions, theToolbar
component should now be passed. -
ObjectPageTitle:
actionsToolbarProps
: Since it's now recommended passing theToolbar
component directly, this prop is redundant. -
ObjectPageTitle:
navigationActionsToolbarProps
: Since it's now recommended passing theToolbar
component directly, this prop is redundant.
ObjectStatus
- ObjectStatus:
active
has been renamed tointeractive
. - ObjectStatus (TypeScript):: the
HTMLDivElement
type has been removed from theonClick
handler.
SelectDialog
- SelectDialog: renamed prop
mode
toselectionMode
to be aligned with new List API,onAfterClose
toonClose
andonAfterOpen
toonOpen
SelectMenu
- SelectMenu: the
SelectMenu
andSelectMenuOption
components have been removed. TheSelect
andOption
now allow custom content.
StandardListItem
- StandardListItem: the
StandardListItem
has been replaced with theListItemStandard
component
SuggestionGroupItem
- SuggestionGroupItem: the
SuggestionGroupItem
component has been replaced by theSuggestionItemGroup
component
TableColumn
- TableColumn: the
TableColumn
component has been replaced with theTableHeaderCell
component
TableGroupRow
- TableGroupRow: the
TableGroupRow
component has been deleted
Text
- Text: the
Text
component has been replaced with theui5-text
web component, please visit our Migration Guide for more details.
ThemeProvider
- ThemeProvider: the
GlobalStyleClasses
enum has been removed
Toolbar
- Toolbar: the
Toolbar
component and its related components have been moved to the@ui5/webcomponents-react-compat
package.
ToolbarV2, ToolbarSpacerV2 & ToolbarSeparatorV2
- ToolbarV2: the
ToolbarV2
component has been renamed toToolbar
- ToolbarSpacerV2: the
ToolbarSpacerV2
component has been renamed toToolbarSpacer
- ToolbarSeparatorV2: the
ToolbarSeparatorV2
component has been renamed toToolbarSeparator
VariantManagement
- VariantManagement: the
portalContainer
prop has been removed as it is no longer needed.
Enums
- enums: the
MessageBoxActions
enum has been renamed toMessageBoxAction
- enums: the
MessageBoxTypes
enum has been renamed toMessageBoxType
- enums: the
Themes
enum has been renamed toTheme
and the deprecated "Belize" (sap_belize
) theme family has been removed
Types
- CommonProps - TypeScript:
dangerouslySetInnerHTML
type has been removed
Charts
- charts: the
MicroBarChart
component as been removed as this is a legacy component which is not covered by design specs anymore.
Base
- useResponsiveContentPadding: The
useResponsiveContentPadding
has been removed. You can achieve the same look and feel by using the responsive content padding from Common CSS. - All
spacing
variables have been removed. You can use common CSS classes as a substitute for most variables. For more information, please refer to our Migration Guide.
Changes
Bug Fixes
-
AnalyticalTable -
useRowDisableSelection
: removetitle
from select-all cell (#5955) (c731554), closes #5953 -
AnalyticalTable: don't wrap custom header content in
Text
component (#6022) (455acc1) -
AnalyticalTable: fire row select & click events on
keyup
instead ofkeydown
(#6013) (f1386f8), closes #4388 -
AnalyticalTable: fix custom header alignment (#6068) (c4a49e4)
-
AnalyticalTable: improve focus border alignment (#5944) (18aeb52), closes #5898
-
apply correct scoping for internal ui5wc CSS vars (#6057) (3822bee), closes #6051
-
CommonProps - TypeScript: remove
dangerouslySetInnerHTML
from types (#6002) (f5f9101) -
deps: update dependency @tanstack/react-virtual to v3.5.1 (#5883) (2db3ca9)
-
deps: update dependency react-content-loader to v7.0.1 (#5899) (5ed11e9)
-
deps: update dependency react-content-loader to v7.0.2 (#5909) (cb79434)
-
deps: update react monorepo to v19.0.0-rc-fb9a90fa48-20240614 (patch) (#5928) (863055a)
-
MessageBox - TypeScript: adjust
onClose
type (#5975) (a30867a) -
MessageViewItem: enable details view if
titleText
is overflowing (#6015) (dba28ce), closes #5990 -
MessageView: use correct icon and color for default type (#6016) (0018bba)
-
ObjectStatus: remove
HTMLDivElement
fromonClick
type (#6011) (671cfaa) -
use new JSX transform in preparation for React 19 (#5837) (7dcad64)
-
codemod: fix import statment for UI5 Web Component enums (#6084) (b3a5aed)
-
AnalyticalTable: add "Filter" text to column popover (#6164) (c035703), closes #6132
-
AnalyticalTable: add
aria-hidden
to multi selection checkboxes (#6134) (082d1c0), closes #6133 -
AnalyticalTable: allow selecting all rows via keyboard (#6168) (65de580), closes #6110
-
AnalyticalTable: fix pop-in content styles (#6170) (5f7d56b), closes #5977
-
deps: update dependency @tanstack/react-virtual to v3.8.4 (main) (#6137) (ef1650b)
-
ObjectPage: increase header z-index (#6117) (e9aeb63), closes #6116
-
ObjectPageTitle: prevent styling race condition when using static css bundle (#6115) (f4c4ebb)
-
UI5CustomEvent - TypeScript: correctly
currentTarget
type (#6167) (656ad5a), closes #6136 -
AnalyticalTable: correct
CustomElementsScope
import path (#6184) (de68b2d), closes #6183 -
MessageBox: don't throw error if
onClose
is not passed (#6226) (7981491), closes #6215 -
VariantManagement: apply correct header size for "Manage Views" dialog (#6185) (8b01af4)
-
add runtime index to global Modal and Style store (#6248) (8184b4e)
-
AnalyticalTable: ensure loading indicator displays correctly across all browsers (#6244) (4fb6008), closes #6243
chore
Code Refactoring
-
AnalyticalTable: remove deprecated props & enums (#6021) (ca13875)
-
AnalyticalTable: remove unnecessary
portalContainer
prop (#6039) (7e19fbb) -
make titleText required for object page sections (#6014) (10e50a2)
-
Modals: replace context with use-sync-external-store (#6042) (e0818c4)
-
FilterBar: remove reference copying of filter/input elements (#6214) (4473118), closes #5652
-
Modals: avoid unnecessary use of
createPortal
(#6242) (a571981) -
AnalyticalTable: remove
selectedFlatRows
& addrowsById
toonRowSelect
(#6255) (ee2785c)
Features
-
AnalyticalTable: introduce
loadingDelay
prop (#6025) (6d80fd8) -
cli: create codemod for UI5 Web Components React v2 migration (#5908) (9f65c98)
-
DynamicPage & ObjectPage: use ui5wc
DynamicPage
& renameObjectPage
components (#5939) (cb684cd) -
move
Loader
tocompat
package & replace withBusyIndicator
(#6020) (80d8c0b) -
ObjectPage: introduce
preserveHeaderStateOnClick
prop (#6049) (c3c6f06) -
RadialChart: introduce
loading
&loadingDelay
props (#6028) (3891437) -
support objects and references as Web Component props (#5957) (f41d32b)
-
ThemeProvider: apply Fiori scrollbar styling to all scroll containers (#5978) (9a611fd)
-
codemod: basic replacements for
DynamicPage
(#6086) (93819a9) -
codemod: transform Text
wrapping
tomaxLines
(#6085) (a879a9b) -
ObjectPage: refactor component to support ui5wc v2 (#6089) (105b2da)
-
update to UI5 Web Components ~2.1.1 (#6151) (80c9a65), closes #5971
-
VariantManagement: introduce
size
prop & improve docs (#6166) (c0184cc) -
expose CLI package for creating web component wrappers (#6212) (28b14d9), closes #5046
-
react 19: bind web components event handlers using react lifecycle (#6169) (70f9f27)
-
register current runtime version in window (#6222) (367628c), closes #6210
-
AnalyticalTable - TypeScript: improve instance & prop types (#6256) (796f7c1)