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

[UICAL-269] Migrate from self-contained typings to stripes-types #506

Merged
merged 5 commits into from
Dec 21, 2023

Conversation

ncovercash
Copy link
Member

@ncovercash ncovercash commented Dec 21, 2023

Jira UICAL-269

Purpose

Initially, we developed our own typings for the Stripes framework, to be used internally by ui-calendar. This was great when we were the only TypeScript module in the FOLIO ecosystem, however, that is no longer the case, and it does not make sense for ui-calendar to be the source of truth for Stripes typings.

Approach

Types were moved to https://github.com/folio-org/stripes-types (over the past many months), where they can be contributed to and shared by all FOLIO developers.

Now that this central location exists, there's no reason for ui-calendar to contain the old types; in fact, they often caused conflicts when attempting to build a platform.

Pre-Merge Checklist

Before merging this PR, please go through the following list and take appropriate actions.

  • I've added an appropriate record to the CHANGELOG.md
  • Does this PR meet or exceed the expected quality standards?
    • Code coverage on new code is 80% or greater
    • Duplications on new code is 3% or less
    • There are no major code smells or security issues
  • Does this introduce breaking changes?
    • If any API-related changes - okapi interfaces and permissions are reviewed/changed correspondingly N/A
    • There are no breaking changes in this PR.
      • We could consider this a breaking change, however, these types were never intended to be used externally and therefore were not a public interface.

Copy link

github-actions bot commented Dec 21, 2023

Jest Unit Test Statistics

    1 files  ±0    71 suites  ±0   2m 47s ⏱️ -7s
327 tests ±0  326 ✔️ ±0  1 💤 ±0  0 ±0 
354 runs  ±0  353 ✔️ ±0  1 💤 ±0  0 ±0 

Results for commit 0b36f6f. ± Comparison against base commit 153e107.

♻️ This comment has been updated with latest results.

Copy link

@ncovercash ncovercash merged commit 011ce22 into master Dec 21, 2023
5 checks passed
@ncovercash ncovercash deleted the uical-269 branch December 21, 2023 20:55
zburke added a commit that referenced this pull request Dec 22, 2023
zburke added a commit that referenced this pull request Dec 22, 2023
…pes (#506)" (#507)

This reverts commit 011ce22 
(UICAL-269/PR #506).

platform automation builds fail with numerous typescript-related errors, e.g.
```
ERROR in /home/jenkins/workspace/Automation/build-platform-complete-snapshot/node_modules/@folio/calendar/src/components/fields/ServicePointAssignmentField.tsx
./node_modules/@folio/calendar/src/components/fields/ServicePointAssignmentField.tsx 51:10-19
[tsl] ERROR in /home/jenkins/workspace/Automation/build-platform-complete-snapshot/node_modules/@folio/calendar/src/components/fields/ServicePointAssignmentField.tsx(51,11)
      TS2769: No overload matches this call.
  Overload 1 of 2, '(props: MultiSelectionProps<ServicePoint> | Readonly<MultiSelectionProps<ServicePoint>>): MultiSelection<...>', gave the following error.
    Type '({ option, searchTerm, }: { option: ServicePoint; searchTerm: string | undefined; }) => React.JSX.Element' is not assignable to type '(option: ServicePoint, searchTerm: string) => ReactNode'.
      Types of parameters '__0' and 'option' are incompatible.
        Type 'ServicePoint' is missing the following properties from type '{ option: ServicePoint; searchTerm: string; }': option, searchTerm
  Overload 2 of 2, '(props: MultiSelectionProps<ServicePoint>, context: any): MultiSelection<ServicePoint, MultiSelectionProps<ServicePoint>>', gave the following error.
    Type '({ option, searchTerm, }: { option: ServicePoint; searchTerm: string | undefined; }) => React.JSX.Element' is not assignable to type '(option: ServicePoint, searchTerm: string) => ReactNode'.
 @ ./node_modules/@folio/calendar/src/forms/CalendarForm/CalendarForm.tsx 22:0-94 81:44-71
 @ ./node_modules/@folio/calendar/src/views/CreateEditCalendarLayer.tsx 16:0-75 41:230-237 42:32-44
 @ ./node_modules/@folio/calendar/src/views/AllCalendarView.tsx 13:0-64 86:44-67 96:44-67
 @ ./node_modules/@folio/calendar/src/views/CalendarSettings.tsx 17:0-48 30:31-46
 @ ./node_modules/@folio/calendar/src/index.tsx 13:0-48 16:35-43
 @ ./node_modules/stripes-config.js
```
@ncovercash ncovercash restored the uical-269 branch December 22, 2023 14:09
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