Skip to content

Conversation

stowball
Copy link
Contributor

@stowball stowball commented Mar 25, 2025

Teams need to be able to have footer card actions that sit outside of a standard clickable card.

To be able to achieve all of the various configurations, I ended up needing to create footer and footerOutside props. I also created a header prop to be consistent, but realised this was also required with various configurations to have footerOutside.

Doing this also highlighted that cards with footers didn't flex to fill their space and that the CardLink hit area and focus states were always applied to the full card even when clickable was false plus other bugs.

Please compare the focus, mouse over and visual states of the first 9 cards in the demos below.

View preview

Playroom card demo

Same demo on develop

Checklist

Preflight

  • Prefix the PR title with the slug of the package or component - e.g. accordion: Updated padding or docs: Updated header links
  • Describe the changes clearly in the PR description
  • Read and check your code before tagging someone for review
  • Create a changeset file by running yarn changeset. Learn more about change management.

Testing

  • Manually test component in various modern browsers at various sizes (use Browserstack)
  • Manually test component in various devices (phone, tablet, desktop)
  • Manually test component using a keyboard
  • Manually test component using a screen reader
  • Manually tested in dark mode
  • Component meets Web Content Accessibility Guidelines (WCAG) 2.1 standards
  • Add any necessary unit tests (HTML validation, snapshots etc)
  • Run yarn test to ensure tests are passing. If required, run yarn test -u to update any generated snapshots.

Documentation

  • Create or update documentation on the website
  • Create or update stories for Storybook
  • Create or update stories for Playroom snippets

Copy link

changeset-bot bot commented Mar 25, 2025

🦋 Changeset detected

Latest commit: 74a9af3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@ag.ds-next/react Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Mar 25, 2025

PR Preview Action v1.6.1
Preview removed because the pull request was closed.
2025-04-22 02:02 UTC

@stowball stowball changed the title card: Add footer & footerOutside props to render footers outside card: Add footer render footers outside when clickable Mar 25, 2025
@stowball stowball changed the title card: Add footer render footers outside when clickable card: Add footer prop to render footer outside when clickable Mar 25, 2025
@stowball stowball force-pushed the card-footer-and-footer-outside-props branch from 95bf3eb to cd90827 Compare March 27, 2025 04:51
@stowball stowball force-pushed the card-footer-and-footer-outside-props branch from 1e774aa to 1bb2910 Compare March 30, 2025 22:40
@stowball stowball changed the title card: Add footer prop to render footer outside when clickable card: Add header, footer & footerOutside props. Improve layouts Apr 1, 2025
@stowball stowball requested a review from atlee025 April 1, 2025 01:44
Copy link

@atlee025
Copy link
Contributor

Checked again, looks good to go

@stowball stowball merged commit ac12f59 into develop Apr 22, 2025
8 checks passed
@stowball stowball deleted the card-footer-and-footer-outside-props branch April 22, 2025 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants