elixir-cloud-aai / cloud-components

Reusable components for the ELIXIR Cloud
https://cloud-components.2.rahtiapp.fi/
Apache License 2.0
8 stars 14 forks source link

fix: improve ts support #378

Closed SalihuDickson closed 3 weeks ago

SalihuDickson commented 3 weeks ago

Description

Fixes #371

Checklist

Comments

Summary by Sourcery

Fix TypeScript support by ensuring component properties reflect their values to attributes and enhance code documentation with detailed JSDoc comments.

Bug Fixes:

Enhancements:

sourcery-ai[bot] commented 3 weeks ago

Reviewer's Guide by Sourcery

This PR improves TypeScript support by enhancing property decorators and adding comprehensive JSDoc documentation. The changes focus on adding the reflect attribute to property decorators and improving property documentation across TES and WES client components.

Updated class diagram for ECCClientGa4ghTesRuns

classDiagram
    class ECCClientGa4ghTesRuns {
        +Number pageSize
        +String baseURL
        +Boolean filter
        +Boolean search
        +Field[] fields
        +Boolean extendFields
    }
    note for ECCClientGa4ghTesRuns "Added reflect attribute to properties"

Updated class diagram for ECCClientGa4ghWesRuns

classDiagram
    class ECCClientGa4ghWesRuns {
        +Number pageSize
        +String baseURL
        +Field[] fields
        +Boolean filter
        +Boolean extendFields
    }
    note for ECCClientGa4ghWesRuns "Added reflect attribute to properties"

Updated class diagram for ECCCLientGa4ghTesCreateRun

classDiagram
    class ECCCLientGa4ghTesCreateRun {
        +String baseURL
    }
    note for ECCCLientGa4ghTesCreateRun "Added reflect attribute to baseURL property"

Updated class diagram for ECCClientGa4ghWesCreateRuns

classDiagram
    class ECCClientGa4ghWesCreateRuns {
        +String baseURL
    }
    note for ECCClientGa4ghWesCreateRuns "Added reflect attribute to baseURL property"

File-Level Changes

Change Details Files
Added reflect attribute to property decorators
  • Added reflect: true to all @property decorators
  • Changed property visibility from private to package-level access
packages/ecc-client-ga4gh-tes/src/components/runs/runs.ts
packages/ecc-client-ga4gh-wes/src/components/runs/runs.ts
packages/ecc-client-ga4gh-tes/src/components/create-run/create-run.ts
packages/ecc-client-ga4gh-wes/src/components/create-run/create-run.ts
Enhanced JSDoc documentation for component properties
  • Added comprehensive component summary and @since tags
  • Improved property descriptions with more specific details
  • Added missing property documentation
packages/ecc-client-ga4gh-tes/src/components/runs/runs.ts
packages/ecc-client-ga4gh-wes/src/components/runs/runs.ts

Assessment against linked issues

Issue Objective Addressed Explanation
#371 Expose proper TypeScript type definitions for React components from tes & wes packages

Possibly linked issues


Tips and commands #### Interacting with Sourcery - **Trigger a new review:** Comment `@sourcery-ai review` on the pull request. - **Continue discussions:** Reply directly to Sourcery's review comments. - **Generate a GitHub issue from a review comment:** Ask Sourcery to create an issue from a review comment by replying to it. - **Generate a pull request title:** Write `@sourcery-ai` anywhere in the pull request title to generate a title at any time. - **Generate a pull request summary:** Write `@sourcery-ai summary` anywhere in the pull request body to generate a PR summary at any time. You can also use this command to specify where the summary should be inserted. #### Customizing Your Experience Access your [dashboard](https://app.sourcery.ai) to: - Enable or disable review features such as the Sourcery-generated pull request summary, the reviewer's guide, and others. - Change the review language. - Add, remove or edit custom review instructions. - Adjust other review settings. #### Getting Help - [Contact our support team](mailto:support@sourcery.ai) for questions or feedback. - Visit our [documentation](https://docs.sourcery.ai) for detailed guides and information. - Keep in touch with the Sourcery team by following us on [X/Twitter](https://x.com/SourceryAI), [LinkedIn](https://www.linkedin.com/company/sourcery-ai/) or [GitHub](https://github.com/sourcery-ai).
changeset-bot[bot] commented 3 weeks ago

⚠️ No Changeset found

Latest commit: 01f8536f6ee66caa3a457de9f775e8cc09780fb8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

vercel[bot] commented 3 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
elixir-cloud-components ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 2, 2024 4:26pm
SalihuDickson commented 3 weeks ago

hey @anurag, I've fixed the missing typescript references issue in this PR, please check it out ASAP

anuragxxd commented 3 weeks ago

Thanks @SalihuDickson for the quick fix!