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: support for virtual components #34

Merged
merged 17 commits into from
Oct 23, 2020
Merged

Conversation

habansal
Copy link
Contributor

@habansal habansal commented Oct 8, 2020

Main changes of this PR are -

  • the new API - withMappable
  • Updating get editProps() in EditableComponent.tsx

Description of the changes

  • Added a new withMappable Utility to make a React component mappable and add the edition capabilities and model data

  • Adds a new data-cq-resource-type attribute on the component editable dom, when passed via the EditConfig

    • Note that this attribute will always be present and the responsibility to check whether a component is virtual or not will be (and should be) of the back-end
  • Added unit tests for the fix

  • Fixed linting issues.

Added a new ComponentWrapper and added a new data-cq-resource-type attribute for virtual components
@codecov
Copy link

codecov bot commented Oct 8, 2020

Codecov Report

Merging #34 into master will increase coverage by 0.10%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #34      +/-   ##
==========================================
+ Coverage   97.61%   97.71%   +0.10%     
==========================================
  Files          13       13              
  Lines         293      306      +13     
  Branches       44       46       +2     
==========================================
+ Hits          286      299      +13     
  Misses          7        7              
Impacted Files Coverage Δ
src/ComponentMapping.tsx 100.00% <100.00%> (ø)
src/Constants.ts 94.44% <100.00%> (+0.32%) ⬆️
src/components/EditableComponent.tsx 100.00% <100.00%> (ø)
src/components/ModelProvider.tsx 97.77% <100.00%> (+0.15%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 97437bf...b978a85. Read the comment docs.

* update package-lock.json
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

93.3% 93.3% Coverage
0.0% 0.0% Duplication

@habansal habansal merged commit 8839f97 into master Oct 23, 2020
@habansal habansal deleted the feature/virtual-components branch October 23, 2020 03:10
@habansal habansal restored the feature/virtual-components branch October 23, 2020 03:10
@habansal habansal deleted the feature/virtual-components branch October 23, 2020 03:11
github-actions bot pushed a commit that referenced this pull request Oct 23, 2020
# [1.1.0](v1.0.6...v1.1.0) (2020-10-23)

### Features

* support for virtual components ([#34](#34)) ([8839f97](8839f97))
@github-actions
Copy link

🎉 This PR is included in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants