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

feat(base): introduce static version property for component class #3579

Closed

Conversation

crav710
Copy link
Contributor

@crav710 crav710 commented Aug 23, 2023

Description

Adding Static property for component classes which can be useful for component libraries to handle scenarios like version conflict.

Related issue(s)

Motivation and context

Adding version to SWC components would help component library to make decision in below scenarios ::

  • If the registered component's version is semver compatible with the component libraries' dependency, there's no need to register the library's version of the component
  • If the registered component's version is not semver compatible the library might register and use the component using a custom tag name.
  • The component library could possibly smooth over backwards-incompatible changes by knowing what the registered version is and work around compatibility issues.

Versioning would also help in long term approach for custom scoped registries as discussed in #3556

How has this been tested?

  • Unit test for base.test has been written to check the version is present in SpectrumElement
  • Tested via storybook to check if the version is set correctly.

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (minor updates related to the tooling or maintenance of the repository, does not impact compiled assets)

Checklist

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • If my change required a change to the documentation, I have updated the documentation in this pull request.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices

Best practices

This repository uses conventional commit syntax for each commit message; note that the GitHub UI does not use this by default so be cautious when accepting suggested changes. Avoid the "Update branch" button on the pull request and opt instead for rebasing your branch against main.

@crav710
Copy link
Contributor Author

crav710 commented Aug 24, 2023

@Westbrook closing this as created another one #3582 as per discussion.

@crav710 crav710 closed this Aug 24, 2023
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