react icon indicating copy to clipboard operation
react copied to clipboard

Hidden component

Open pksjce opened this issue 3 years ago • 5 comments

The Hidden component will be used to hide or show content in a responsive manner. We can do this across three viewport breakpoints aka 'narrow', 'regular' and 'wide'.

It is inspired by Braid design system

This was built to satisfy use cases specific to PageHeader eg - Responsive title and context nav

Here, we want to show different text inside the primary Button based on viewport value.

Merge checklist

  • [ ] Added/updated tests
  • [x] Added/updated documentation
  • [x] Tested in Chrome
  • [x] Tested in Firefox
  • [x] Tested in Safari
  • [ ] Tested in Edge

pksjce avatar Sep 02 '22 10:09 pksjce

🦋 Changeset detected

Latest commit: 685fdb8e32d491440839f2225e90be6f309c16fc

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

This PR includes changesets to release 1 package
Name Type
@primer/react Patch

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

changeset-bot[bot] avatar Sep 02 '22 10:09 changeset-bot[bot]

size-limit report 📦

Path Size
dist/browser.esm.js 77.21 KB (0%)
dist/browser.umd.js 77.85 KB (0%)

github-actions[bot] avatar Sep 02 '22 10:09 github-actions[bot]

Hi 👋

Should we start this component in drafts till we feel confident about our responsive story?

siddharthkp avatar Sep 05 '22 07:09 siddharthkp

Closing this PR. Basically after discussion with @siddharthkp and reviewing Chakra library, I think it's better we use styled system's responsive props to power this hide behaviour. I will update the API docs accordingly.

pksjce avatar Sep 08 '22 07:09 pksjce

After some more thought and trying out the alternative sx way of having responsive css, I'm somewhat gravitating back to the simplicity and utility of this component. I have addressed existing feedback and moved this component to the drafts folder. I think we should test out the utility before writing off this component.

pksjce avatar Sep 15 '22 05:09 pksjce