adobe / aem-react-editable-components

SPA React Editable Components for Adobe Experience Manager
Apache License 2.0
61 stars 26 forks source link

issues/195 - Stylesystem Bugfix : Code refactored as per new design #196

Closed friendlymahi closed 1 year ago

friendlymahi commented 1 year ago

Description

Existing code (v2.0.5) assumes appliedCssClassNames is available as a prop when obtaining component mapping. But with SPA 2.0 design the prop will be available only to children under EditableComponent. In addition, while authoring, when we change styles, model is updated, but EditableComponent doesn't recieve the new style info as our code is bound to model passed from parent e.g. container. With these inferences in mind, made changes below

package.json with new version can be updated upon confirmation from approvers. Additional unit tests can be added if approvers deem necessary

Related Issue

195

Motivation and Context

Same as description, as we all understand the power of stylesystem and keeping this feature supported is critical for us to upgrade to SPA 2.0 where one may choose to do a hybrid of SPA implementations e.g an entire help section coming from AEM as-is and other pages from React app share some sections that are editable via AEM

How Has This Been Tested?

Screenshots (if appropriate):

Inside AEM Editor with Changing Styles

Changed background of text from Skyblue to Gray

Screenshot 2023-07-27 at 7 23 39 AM Screenshot 2023-07-27 at 7 24 24 AM

View as Published Experience

Screenshot 2023-07-27 at 7 20 15 AM

Types of changes

Checklist:

codecov[bot] commented 1 year ago

Codecov Report

Merging #196 (0b99c65) into master (c2deb32) will not change coverage. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #196   +/-   ##
=======================================
  Coverage   98.88%   98.88%           
=======================================
  Files          14       14           
  Lines         180      180           
  Branches       78       78           
=======================================
  Hits          178      178           
  Misses          2        2           
Files Changed Coverage Δ
src/core/EditableComponent.tsx 100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

friendlymahi commented 1 year ago

@sharanyavinod , @CezCz, @habansal , @niekraaijmakers , @vladbailescu - Requesting your help for moving this fix. Advise me if its not a valid usecase or if you want me to make any further changes, Thanks !

friendlymahi commented 1 year ago

Hello. Good Morning to you ! Can someone please share some feedback on this PR? Thanks !

friendlymahi commented 1 year ago

@sharanyavinod - Any feedback on this PR?

friendlymahi commented 1 year ago

Thanks @sharanyavinod . Can you please merge the PR in this case?

friendlymahi commented 1 year ago

Hello. Hope you are doing well. Any update on this request? Thanks

github-actions[bot] commented 1 year ago

:tada: This PR is included in version 2.1.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: