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

feat: RO-Crate Contextual entities #372

Closed sivangbagri closed 4 weeks ago

sivangbagri commented 4 weeks ago

Description

Continuing https://github.com/elixir-cloud-aai/cloud-components/pull/370. This PR adds contextual entities(Person, Organisation) to RO-Crate.

Checklist

Comments

Summary by Sourcery

New Features:

changeset-bot[bot] commented 4 weeks ago

⚠️ No Changeset found

Latest commit: e811aebad013bfcb3babbef302fd4ebc4038b84b

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 4 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 Oct 30, 2024 2:21pm
sourcery-ai[bot] commented 4 weeks ago

Reviewer's Guide by Sourcery

This PR implements RO-Crate contextual entities by introducing a new web component that handles the "About" section of RO-Crate metadata. The component is built using LitElement and provides a tabbed interface for managing different aspects of the metadata including basic information, related entities (people/organizations), and structure.

Class diagram for ECCClientRoCrateAbout component

classDiagram
    class ECCClientRoCrateAbout {
        -activeTab: number
        +_switchTab(index: number): void
        +render(): any

        AboutFields: Field[]
        RelatedPeopleFields: Field[]
        StructureFields: Field[]
    }

    class Field {
        +key: string
        +label: string
        +type: string
        +fieldOptions: object
        +arrayOptions: object
        +children: Field[]
    }

    ECCClientRoCrateAbout --> Field
    note for ECCClientRoCrateAbout "This class represents a web component for managing RO-Crate metadata with a tabbed interface."

File-Level Changes

Change Details Files
Implementation of a new web component for RO-Crate metadata management
  • Created a tabbed interface with three sections: About, Related People/Orgs, and Structure
  • Implemented state management for tab switching
  • Added form fields for basic metadata like ID, type, name, description, and publication date
  • Created form fields for dataset relationships in the About section
packages/ecc-client-elixir-ro-crate/src/components/about/about.ts
Added support for person and organization entities
  • Implemented author fields for person entities with ID, type, and name properties
  • Added publisher fields for organization entities with ID, type, name, and URL properties
  • Created funder fields for organization entities with similar properties
  • All entity sections are collapsible and support multiple instances
packages/ecc-client-elixir-ro-crate/src/components/about/about.ts
Added demo pages for testing and showcase
  • Created a main demo page with navigation
  • Added a specific demo page for the About component
  • Set up basic styling and component initialization
packages/ecc-client-elixir-ro-crate/demo/about/index.html
packages/ecc-client-elixir-ro-crate/demo/index.html
Set up component registration and type definitions
  • Registered the custom element with the browser
  • Added TypeScript declarations for HTML element map
packages/ecc-client-elixir-ro-crate/src/components/about/index.ts

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).
sivangbagri commented 4 weeks ago

Closing this due to some consistency error