adobe / adobe/aem-react-editable-components

[bug] removeDefaultStyles does not remove default styles on ResponsiveGrid

Open Beginner friendly
#292 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
68
Forks
35
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
Adding removeDefaultStyles to ResponsiveGrid does not remove styles.

Ref: https://github.com/adobe/aem-react-editable-components/blob/master/src/components/ResponsiveGrid.tsx#L45
```
if (isInEditor || !props.removeDefaultStyles) {
className = `${className} ${props.gridClassNames || ''} ${ClassNames.CONTAINER}`;
}
```
The code here shows that `isInEditor` will always return true and it seems impossible to override gridClassNames prop.

We want to use a custom grid but this is forcing our hand.

**Package version**
2.1.1

**To Reproduce**
1. Add removeDefaultStyles to ResponsiveGrid

**Expected behavior**
Grid styles removed in AEM

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.

Contributor guide

Open the contributing guide

Research direction

Start in src/components/ResponsiveGrid.tsx around line 45 and trace how removeDefaultStyles, isInEditor, and gridClassNames determine the className. Reproduce the issue with ResponsiveGrid, then verify that the expected grid styles are removed when removeDefaultStyles is enabled while editor behavior remains correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.