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

Research: base APIs (written in Typescript) used in components #6080

Closed
37 of 39 tasks
ilhan007 opened this issue Nov 23, 2022 · 1 comment
Closed
37 of 39 tasks

Research: base APIs (written in Typescript) used in components #6080

ilhan007 opened this issue Nov 23, 2022 · 1 comment
Assignees
Milestone

Comments

@ilhan007
Copy link
Member

ilhan007 commented Nov 23, 2022

Description

Research base APIs (written in Typescript) used in components to check if we miss use cases and if new types, interfaces should be created or changed.

"base" package APIs used in components to check:

  • ItemNavigation - (new interface Tabbable has been introduced, and components subject to item navigation must implement it - f.e. the BreadcrumbsItem, ProductSwitchItem, etc. - see this PR, we made _getCurrentItem to return HTMLElement | undefined to simplify the return type) PR

  • I18nBundle - (fix return type of getI18nBundle and getI18nBundleSync to Promise {I18nBundle} and I18nBundle respectively - see this PR)

  • AriaLabelHelper - (Checked in Link and Input for both public methods - getEffectiveAriaLabelText, getAssociatedLabelForTexts. It works as expected.)

  • Device - (all types except isOS return boolean type. Main usage of this util is in expressions, nevertheless "boolean" type of iOS is now ensured with this fix )

  • InvisibleMessage - ("announce" method is checked in Select and Combobox, works with small change to use InvisibleMessageMode.Polite instead of directly passing "Polite")

  • TabbableElements - (checked in table and seems okey)

  • FocusableElements - Stoyan - (checked in the Popups, Dialog and Wizard and seems fine)

    • Added type FocusableElementPromise to FocusableElements.ts, and made startFromContainer param optional.
      ( check this PR)
  • PopupUtils - (checked in Popup and Popover and types seem fine)

    • PopupUtils#isClickInRect checked
    • PopupUtils#getNextZIndex checked
    • PopupUtils#getCurrentZIndex checked
    • PopupUtils#getFocusedElement checked
    • PopupUtils#getClosedPopupParent checked
  • locale/getLocale.js - (it's used together with getCachedLocaleDataInstance from @ui5/webcomponents-localization
    and to completely verify it, we need to work on the localization package as well.

  • asset-registries/LocaleData (checked in DataComponentBase and TimePickerBase, no changes needed)

  • FormatSettings#getFirstDayOfWeek (checked in DayPicker, it has good return type, no changes needed)

  • isDefaultSlotProvided - (checked in Badge and Butonn and it seems fine, will provide return type of boolean)

  • ScrollEnablement - (Tested in Tokenizer and Carousel. Generic types should be removed from ScrollEnablement class because generic type is assigned to static field in the class and they can mismatch with the original type) chore: remove generics for ScrollEnablement #6115

  • ColorConversion - (Tested in ColorPicker and nothing was found. Just some exports and return types are adjusted PR

  • debounce - (checked in table and seems okey)

  • slideDown, slideUp - Stoyan ( checked in TabContainer and Panel, no problems at all )

  • debounce, isElementInView - (checked in table and seems okey)

  • ManagedStyles - ( checked in Popup and seems okay );

  • MediaRange - Stoyan

    • getCurrentRange now always returns a result, because it fallbacks to the default rangeSet, previously it was returning null;
    • initRangeSet method now expects 2 params, instead of 3.
    • We completely changed the usage of the initRangeSet. For reference check this PR
  • getSlottedNodes (the "this" parameter "this: Record<string, Array>" has been removed as it does not match with the callee "this", e.g. the UI5Element - see chore: fix getSlottedNodes context #6119)

  • delegate/ResizeHandler - (Checked in List and works okey)

  • features/F6Navigation

  • config/AnimationMode

  • asset-registries/Illustrations -

    • Migrated the ui5-illustrated-message component to TS.
    • Changed types, in the IllustrationProperties type.
    • Small refactor of onBeforeRendering(). For more check - this PR
  • Keys - Added explicit return type (chore: add explicit return type to key related functions #6130)

  • FeaturesRegistry

  • Render

  • util/getFileExtension

  • util/clamp

  • locale/getLocale

  • config/CalendarType

  • util/Caret - Nayden

  • util/getActiveElement

  • util/getEffectiveContentDensity

  • renderer/executeTemplate

  • asset-registries/Icons

  • util/getEffectiveScrollbarStyle - (Checked in List and works okey)

  • util/getNormalizedTarget -(Checked in List and works okey)

  • config/Theme

@ilhan007 ilhan007 added this to the 1.11.0 milestone Nov 23, 2022
ilhan007 added a commit that referenced this issue Nov 25, 2022
Previously,Device.isIOS had the following return type: " boolean | RexExpMatch | null" which is a bit confusing.
Now, "boolean" is enforced.

Related to: #6080
@nnaydenow
Copy link
Contributor

Integer type can't be used in Math object's functions because of incorrect type.

ilhan007 pushed a commit that referenced this issue Nov 30, 2022
ilhan007 pushed a commit that referenced this issue Nov 30, 2022
chore: correct return type and export in ColorConversion
Related to: #6080
ilhan007 added a commit that referenced this issue Dec 16, 2022
Several components (public and private) have been migrated to Typescript to validate decorators and check base and upload-utils APIs:
- components to TS: Bar, UploadCollection
- other classes to TS: upload-utils/UploadCollectionBodyDnD, features/CoPilotAnimation, fiori/Assets

Related to: #6080
ilhan007 added a commit that referenced this issue Dec 19, 2022
Several components (public and private) have been migrated to Typescript to validate decorators and check base and localization APIs
- public: Button, DatePicker, Calendar
- private : CalendarPart, CalendarHeader, YearPicker, MonthPicker and DayPicker

Related to: #6080
ilhan007 added a commit that referenced this issue Dec 20, 2022
The ProgressIndicator component have been migrated to Typescript as part of the TS migration initiative.

Related to: #6080
ilhan007 added a commit that referenced this issue Dec 20, 2022
The Panel component has been migrated to Typescript as part of the TS migration initiative.
Note: there is a getter, called "header", that collides with the "header" slot and the framework generated accessors. The getter is now removed.

Related to: #6080
ilhan007 added a commit that referenced this issue Dec 20, 2022
The Page component has been migrated to Typescript as part of the TS migration initiative.

Related to: #6080
ilhan007 added a commit that referenced this issue Dec 20, 2022
The Link component has been migrated to Typescript as part of the TS migration initiative.
Note: the tabIndex getter collides with the HTML property and has been renamed to effectiveTabIndex

Related to: #6080
ilhan007 added a commit that referenced this issue Dec 20, 2022
The **Timeline** and **TimelineItem** components have been migrated to Typescript as part of the TS migration initiative.

Related to: #6080
ilhan007 added a commit that referenced this issue Dec 20, 2022
The **DynamicSideContent** component has been migrated to Typescript as part of the TS migration initiative.
- Note: some system files (**main/Interface.ts** and **fiori/Interface.ts** also converted)
- Note: make use of `**ClassMap**` base type for `**DynamicSideContent#get classes**`

Related to: #6080
ilhan007 added a commit that referenced this issue Dec 20, 2022
The SplitButton component has been migrated to Typescript as part of the TS migration initiative.
Note: some system files (main/Interface.ts and fiori/Interface.ts also converted)

Related to: #6080
ilhan007 added a commit that referenced this issue Dec 20, 2022
The FileUploader component has been migrated to Typescript as part of the TS migration initiative.
Note: this._input.click(e); changed to this._input.click(); as HTMLElement#click doesn't have params.

Related to: #6080
ilhan007 added a commit that referenced this issue Dec 21, 2022
The ColorPicker component has been migrated to Typescript as part of the TS migration initiative.
- Could not find styles.progressContainer usage in the template or anywhere else and it's removed
- TS complains for e.offsetHeight, e.offsetWidth usage on MosueEvent object, so it has been changed to 
- The method _applySliderStyles is not used and it's now removed.

Related to: #6080
ilhan007 added a commit that referenced this issue Jan 9, 2023
Table component migrated to TS.

Related to: #6080
@ilhan007 ilhan007 modified the milestones: 1.11.0, 1.10.0 Jan 12, 2023
s-todorova pushed a commit that referenced this issue Jan 20, 2023
Table component migrated to TS.

Related to: #6080
@petyabegovska petyabegovska moved this to Completed in Planning - Topic Core Jun 21, 2024
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