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(chrome)!: detect Footer automatically with Context #1761

Merged
merged 3 commits into from
Mar 29, 2024

Conversation

geotrev
Copy link
Contributor

@geotrev geotrev commented Mar 27, 2024

Description

Removes hasFooter prop from react-chrome's Body component. Uses React context similar to how other components detect when a child is present in the JSX tree.

Checklist

  • πŸ‘Œ design updates will be Garden Designer approved (add the designer as a reviewer)
  • 🌐 demo is up-to-date (npm start)
  • ⬅️ renders as expected with reversed (RTL) direction
  • 🀘 renders as expected with Bedrock CSS (?bedrock)
  • πŸ’‚β€β™‚οΈ includes new unit tests. Maintain existing coverage (always >= 96%)
  • β™Ώ tested for WCAG 2.1 AA accessibility compliance
  • πŸ“ tested in Chrome, Firefox, Safari, and Edge

@geotrev geotrev marked this pull request as ready for review March 27, 2024 20:25
@geotrev geotrev requested a review from a team as a code owner March 27, 2024 20:25
@coveralls
Copy link

coveralls commented Mar 27, 2024

Coverage Status

coverage: 95.991% (-0.05%) from 96.037%
when pulling 4ab0dae on george/chrome-body-footer
into 78f531b on next.

@geotrev geotrev changed the title feat(chrome)!: detect Footer automatically with React context feat(chrome)!: detect Footer automatically with Context Mar 28, 2024
@@ -47,6 +47,7 @@ consider additional positioning prop support on a case-by-case basis.
#### @zendeskgarden/react-chrome

- Removed `PRODUCT` type export. Use `IHeaderItemProps['product']` instead.
- Removed `hasFooter` prop for `Body` (no replacement needed)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we call out that IBodyProps is no longer exported?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, good call.

packages/chrome/src/elements/body/Body.tsx Outdated Show resolved Hide resolved
@geotrev geotrev merged commit 074840e into next Mar 29, 2024
5 checks passed
@geotrev geotrev deleted the george/chrome-body-footer branch March 29, 2024 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

4 participants