SAP/ui5-webcomponents-react

☂️ Road to 2.0

Lukas742 opened this issue · 4 comments

This issue is a smorgasbord of topics we would like to include in our 2.0 release. It mainly contains features that require breaking changes.

Please note, that the major release is not yet on our roadmap.

General

  • Extend common props to also include data-* attributes. Currently these attributes are only supported when used as props inside tags (e.g.: <Label data-hello="hi" />), but not when used as type for an object (e.g.: const props: LabelPropTypes = {"data-hello:"hi"}) #3855

  • Remove role="application". We should take the same approach as @ui5/webcomponents, i.e. the role="application" attribute for components should no longer be used, as application developers should be responsible for how the application behaves when using screen readers.

  • sapScrollBar: Opt-out instead of opt-in. --> Make all elements wrapped inside the ThemeProvider use the custom scrollbar styles per default and only use the native scrollbar if the .sapUiNativeScrollbars class is applied. (Maybe check if we still want to support the data-native-scrollbar attribute) In the course of this, remove both scrollbar style classes, as they'll be redundant then.

  • Change React Runtime from classic to automatic in order to use the new JSX runtime. Our peer dependencies currently only support versions where the JSX runtime can already be used.

  • Remove jestSetup file

  • Replace all keydown selection/click events on SPACE press with keyup event

  • Check usage of enrichEventWithDetails function. It should only be used when based on a real event. We should not use it to create artificial events with an actual target. Also improve its behavior to also include "native" detail (e.g. when using the click event)

TypeScript

  • Investigate if ReactElement should be replaced by ReactNode for public types. See this PR for more details.

Components

AnalyticalCard: Remove deprecated component.

MessageBox: make onClose a pure custom event (no target, etc.) and allow onAfterClose for consumption

ObjectPageSection:

  • replace titleTextUppercase with titleTextLowerCase and remove defaultProp
  • make titleText required --> it makes no sense omitting titleText as then an empty tab would be rendered

AnalyticalTable:

  • remove deprecated TableScaleWidthMode, TableSelectionBehavior, TableSelectionMode, TableVisibleRowCountMode enums
  • remove deprecated canReorder column option
  • Don't wrap all custom header components inside Text component. (see here)
  • We should consider changing the detail property of the onRowSelect event, to not return selectedFlatRows as array and use an object (e.g. selectedFlatRowsById) instead, as currently we need to iterate over all rows the table renders, which can impact performance especially for huge datasets.

ActionSheet:

  • replace showCancelButton with hideCancelButton and remove defaultProp
  • replace headerContentPinnable with hidePinHeaderButton and remove defaultProp
  • remove deprecated canReorder column option

DynamicPage:

  • replace showHideHeaderButton with hideShowHeaderButton and remove defaultProp

FilterGroupItem:

  • replace visible with hidden and remove defaultProp

Text:

  • replace wrapping with wrappingType, its type with WrappingType and change the default value to WrappingType.None

Grid:

  • remove position as the functionality can be achieved with simple CSS

Charts

ChartContainer:

  • Replace height: '400px' with height: '100%'