Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UI5 Web Components 2.0] Changes suggestion list [Topic B] #7888

Closed
ilhan007 opened this issue Nov 21, 2023 · 4 comments
Closed

[UI5 Web Components 2.0] Changes suggestion list [Topic B] #7888

ilhan007 opened this issue Nov 21, 2023 · 4 comments

Comments

@ilhan007
Copy link
Member

Issue Description

The goal is to gather a list with breaking changes that you are willing to do to improve/simplify the components API.

  • list deprecated APIs within your components that should be removed with 2.0
  • list APIs that we would like to improve and change before releasing 2.0

There is already this issue #4460 with changes we already identified, so first take a look of it - it could be that some of your suggestions are already proposed.

@ilhan007
Copy link
Member Author

Use for reference: #4460 (comment)

@tsanislavgatev
Copy link
Contributor

tsanislavgatev commented Feb 2, 2024

ui5-bar

  • will be moved from fiori to main library as it is widely used by other components there (mainly popovers, dialogs, etc., as header/subheader)

!Changes agreed !

  • move Bar to main package

ui5-menu-item - items slot should be deprecated (replaced by menu slot). For more information – see the PoC.

TODO [Balkan team]: follow up needed to (1) understand the need of this change as the current API is easier
and (2) if technically cover all cases, f.e. as the menus are passed from outside and the root menu should open/close them, but at the same time the apps have access/control over them

ui5-calendar - selectedDates getter and setter



TODO [Balkan team]: setters and getters are not declarative and would worsen the usage from frameworks, instead explore adding a new element CalendarRangeDate(with properties startValue and endValue) to be accepted by the dates slot (similar to CalendarDate) and form a range.

ui5-color-palette-popover - openPopover method (replaced by showAt method)


!Changes agreed !

  • remove openPopover and showAt in favour of open and opener.

ui5-segmented-button - selectedItem getter (replaced by selectedItems property) selectedItem parameter in selectionChange event (replaced by selectedItems parameter)



!Changes agreed !

  • remove selectedItem getter, keep selectedItems
  • remove selectedItem parameter, keep selectedItems

ui5-time-selection, ui5-wheelslider ui5-time-selection (as the ui5-time-picker and ui5-datetime-picker will use ui5-time-selection-clocks component)

TODO [Core team]

  • move the classes to an external project that uses some of these and remove them from ui5-webcomponents code base

@ilhan007
Copy link
Member Author

ilhan007 commented Feb 29, 2024

=ColorPalettePopover

  • openPopover to be removed in favour of showAt
  • but we have added open and opener, so we need to remove showAt as well

!Changes agreed !

  • remove openPopover and showAt.

SegmentedButtonItem

  • pressed - could be "selected"

!Changes agreed !

  • Use selected, not pressed - more consistent with the public getter selectedItems, event detail called selectedItems and event selection-change
  • To enable the change either split Button to ButtonBase and Button, and make the SegmentedButtonItem inherit from ButtonBase, or make the SegmentedButtonItem compose the ToggleButton instead of inheritting it - the second would b less work and quicker to check.

@ilhan007
Copy link
Member Author

ilhan007 commented Mar 5, 2024

External Feedback:

ui5-calendar

  • selection-mode seems to be very similar to the mode attribute offered by the ui5-list. It would be good to harmonize the two. (List, Table, SegmentedButton, UploadCollection have mode property)
  • Enum value "Multi" vs "Multiple"

Table - mode and selection-change (event detail: selectedRows)
List - mode and selection-change (event detail: selectedItems)
Calendar - selectionMode and selected-dates-change (event detail: dates)
SegmentedButton - mode and selection-change (event detail: selectedItems)

ListMode - None, SingleSelect, MultiSelect, Delete
TableMode - None, SingleSelect, MultiSelect
CalendarSelectionMode - Single, Multiple, Range
SegmentedButtonMode - SingleSelect and MultiSelect

!Changes agreed!

  • selectionMode to remain, mode properties in Table, List, SegmentedButton to become selectionMode
  • Change Calendar's event selected-dates-change to selection-change + the event detils values and dates to selectedValues and selectedDateValues.
  • Change some enum values in TableMode, ListMode, SegmentedButtonMode: SingleSelect -> Single, MultiSelect -> Multiple,
  • Change Enums' names: TableMode -> TableSelectionMode, ListMode -> ListSelectionMode, SegmentedButtonMode -> SegmentedButtonSelectionMode

ui5-color-picker:

  • color: the color attribute is used by no other component. Other pickers use the value attribute instead. It would be more consistent to use the value attribute here as well.

!Changes agreed !:
change property color to value - more consistent with the rest with the pickers.

ui5-menu:

  • starts-section: in other components, a separator element is used. The menu uses the starts-section flag to indicate a separator line, this is not severe but somewhat inconsistent. It would be easier if separators are handled always the same.

!Changes agreed !:
replace starts-section with exposing a new custom element ui5-menu-separator that apps can add wherever they need.

ui5-split-button

  • active-icon: This allows to swap out the icon while pressed. This feature is not available on any other button, and I don’t understand its purpose?

TODO: [Balkan team] follow up with SAP Design if this is relevant feature, and is it really relevant for the SplitButton only and then decide to keep or remove it.

Date..

  • min-date and max-date naming - there are min and max in the Sliders and maxlength TextArea

TODO: [core team] min-date and max-date remain, discuss if min and max in Sliders should be changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Completed
Development

No branches or pull requests

3 participants