Skip to content

Commit

Permalink
WB-1623: Cell states don't work with anchor tags correctly [fix] (#2073)
Browse files Browse the repository at this point in the history
## Summary:

There’s an issue with wb-cell that was introduced after making some layout/css
changes to the components.

Turns out that Cell states won’t be displayed as expected when the cell top node
is `display: inline`. As cells are meant to use the full-width of it’s parent
container, this PR fixes that by making the top node to always use `display: flex`.

Issue: https://khanacademy.atlassian.net/browse/WB-1623

## Test plan:

Verify that cell states are displayed as expected (hover, active change the bg
color).

Author: jandrade

Reviewers: jeresig, adinardi

Required Reviewers:

Approved By: jeresig

Checks: ✅ codecov/project, ✅ Chromatic - Get results on non-draft regular PRs (ubuntu-latest, 16.x), ✅ Test (ubuntu-latest, 16.x, 2/2), ✅ Lint (ubuntu-latest, 16.x), ✅ Check build sizes (ubuntu-latest, 16.x), ✅ Test (ubuntu-latest, 16.x, 1/2), ✅ Chromatic - Build on non-draft regular PRs / chromatic (ubuntu-latest, 16.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 16.x), ⏭  Chromatic - Skip on Release PR (changesets), ✅ Publish npm snapshot (ubuntu-latest, 16.x), ✅ Prime node_modules cache for primary configuration (ubuntu-latest, 16.x), ✅ gerald, ⏭  dependabot

Pull Request URL: #2073
  • Loading branch information
jandrade authored Sep 29, 2023
1 parent b32ec45 commit bf5a2d4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/hot-starfishes-sleep.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@khanacademy/wonder-blocks-cell": patch
---

Add display:flex to top node to ensure that cells render correctly
2 changes: 1 addition & 1 deletion .github/workflows/node-ci-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
globs: "!(**/__tests__/*), !(**/dist/*)" # Ignore test files

- name: Verify changeset entries
uses: Khan/changeset-per-package@v1.0.1
uses: Khan/changeset-per-package@v1.0.2-pre
with:
changed_files: ${{ steps.match.outputs.filtered }}

Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@
],
"resolutions": {
"@types/react": "16",
"@types/react-dom": "16"
"@types/react-dom": "16",
"strip-ansi": "6.0.1",
"strip-ansi-explanation": "There's an issue with strip-ansi v7 which causes conflicts with the Khan/changeset-per-package action"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ const styles = StyleSheet.create({
wrapper: {
background: Color.white,
color: Color.offBlack,
display: "flex",
minHeight: CellMeasurements.cellMinHeight,
textAlign: "left",
},
Expand Down

0 comments on commit bf5a2d4

Please sign in to comment.