Skip to content

docs(website): clear all TS errors in React samples and add CI typecheck#13213

Merged
ilhan007 merged 1 commit intomainfrom
fix/typecheck-react-samples
Mar 6, 2026
Merged

docs(website): clear all TS errors in React samples and add CI typecheck#13213
ilhan007 merged 1 commit intomainfrom
fix/typecheck-react-samples

Conversation

@ilhan007
Copy link
Contributor

@ilhan007 ilhan007 commented Mar 6, 2026

Summary

  • Fixed all 83 TypeScript errors across 60 React sample.tsx files. These errors accumulated silently because samples are loaded via raw-loader as plain text — even completely broken syntax compiles fine during the website build.
  • Added a typecheck:samples CI step to the website workflow so that any new TypeScript error in a React sample will fail the PR check going forward.

What was fixed

  • Mismatched prop types (wrong enum string literals, missing required props)
  • Incorrect event handler signatures (UI5CustomEvent type mismatches)
  • Wrong HTML attribute types (min-date, max-date as Date instead of string)
  • Missing component type declarations in monaco-ui5-types.d.ts
  • JSX issues (wrong slot types, invalid prop combinations)

CI change

A new step "Typecheck React samples" runs tsc --noEmit against docs/_samples/tsconfig.json after the website build:

- name: Typecheck React samples
  run: yarn workspace @ui5/webcomponents-website typecheck:samples

Test plan

  • yarn typecheck:samples passes locally with 0 errors
  • CI website workflow passes on this PR

… typecheck

All 83 TypeScript errors in the React sample.tsx files have been fixed.
Since samples are loaded via raw-loader as plain text, broken types were
invisible during the website build. A new `typecheck:samples` script and
CI step now run `tsc --noEmit` against the samples so regressions are
caught on every PR.
@github-actions
Copy link

github-actions bot commented Mar 6, 2026

Sample sync reminder

HTML sample changed but React sample (sample.tsx) not updated:

  • main/DateRangePicker/DateFormat
  • main/DateRangePicker/MinMax
  • main/DateTimePicker/DateTimePickerInDifferentTimezone
  • main/DateTimePicker/MinMax
  • main/TabContainer/ReorderTabsMaxNestingLevel

React sample changed but HTML sample (sample.html/main.js/main.css) not updated:

  • ai/Input/Basic
  • compat/Table/Grouping
  • compat/Table/GrowingOnScroll
  • compat/Table/MultipleSelection
  • compat/Table/SingleSelection
  • compat/Table/StickyHeader
  • fiori/DynamicSideContent/Basic
  • fiori/DynamicSideContent/EqualSplit
  • fiori/DynamicSideContent/SideContentPosition
  • fiori/FlexibleColumnLayout/Basic
  • fiori/FlexibleColumnLayout/LayoutsConfiguration
  • fiori/MediaGallery/VideoContent
  • fiori/NotificationList/GroupItems
  • fiori/ShellBar/Advanced
  • fiori/ShellBar/Basic
  • fiori/ShellBar/EmbeddedBackNavigation
  • fiori/ShellBar/MultipleNonProductiveInstances
  • fiori/ShellBar/MultipleProductiveInstances
  • fiori/ShellBar/TrialExample
  • fiori/SideNavigation/OverlayMode
  • fiori/UploadCollection/Basic
  • fiori/UploadCollection/DragAndDrop
  • fiori/UploadCollection/RenamingFiles
  • fiori/UploadCollection/VariousUploadStates
  • main/AvatarGroup/IndividualWithPopover
  • main/Calendar/Bounds
  • main/Calendar/CalendarWithDisabledDates
  • main/Calendar/CalendarWithLegend
  • main/CalendarLegend/Basic
  • main/CheckBox/Group
  • main/FileUploader/WithoutInput
  • main/Input/ValueHelpDialog
  • main/List/MultipleDrag
  • main/MultiInput/TokenCreation
  • main/Table/Interactive
  • main/Table/Popin
  • main/Table/SelectionMulti
  • main/Table/SelectionSingle
  • patterns/AIAcknowledgement/ScrollToAccept
  • patterns/AIGuidedPrompt/Dialog

Please keep both samples in sync, or ignore if the change does not apply to both.

@ilhan007 ilhan007 changed the title fix(website): clear all TS errors in React samples and add CI typecheck docs(website): clear all TS errors in React samples and add CI typecheck Mar 6, 2026
@ui5-webcomponents-bot
Copy link
Collaborator

@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview March 6, 2026 19:24 Inactive
@ilhan007 ilhan007 merged commit 810c55d into main Mar 6, 2026
15 checks passed
@ilhan007 ilhan007 deleted the fix/typecheck-react-samples branch March 6, 2026 20:05
@ui5-webcomponents-bot ui5-webcomponents-bot requested a deployment to preview March 6, 2026 20:05 Abandoned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants