Skip to content

Commit

Permalink
Merge branch 'main' into ktravers/rm-sx-from-tree-view
Browse files Browse the repository at this point in the history
  • Loading branch information
jonrohan authored Nov 14, 2024
2 parents bdd9ffd + aac10fa commit 919f426
Show file tree
Hide file tree
Showing 38 changed files with 88 additions and 53 deletions.
5 changes: 5 additions & 0 deletions .changeset/brave-cheetahs-prove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

Move Select component from team to staff flag
5 changes: 5 additions & 0 deletions .changeset/calm-meals-impress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

Move CounterLabel CSS module feature flag from staff to ga
5 changes: 5 additions & 0 deletions .changeset/chilled-goats-visit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

Move Spinner component from team to staff flag
5 changes: 0 additions & 5 deletions .changeset/clean-coats-lie.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/clean-ligers-approve.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/cyan-lions-itch.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/erken-gelen-oturur.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/five-hornets-agree.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/grumpy-cherries-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

Move Details component from team to staff flag
5 changes: 5 additions & 0 deletions .changeset/honest-plums-approve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

Move Header component from team to staff flag
5 changes: 0 additions & 5 deletions .changeset/late-swans-knock.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/new-donkeys-attend.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/polite-ligers-exercise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

chore(ButtonGroup): Move ButtonGroup CSS module feature flag from staff to ga
5 changes: 0 additions & 5 deletions .changeset/tricky-ways-tan.md

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions e2e/components/Textarea.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ const stories = [
id: 'components-textarea-features--custom-width',
title: 'Custom Width',
},
{
id: 'components-textarea-dev--dev-default',
title: 'Dev Default',
},
] as const

test.describe('Textarea', () => {
Expand Down
2 changes: 1 addition & 1 deletion examples/app-router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"type-check": "tsc --noEmit"
},
"dependencies": {
"@primer/react": "37.4.0",
"@primer/react": "37.5.0",
"next": "^14.2.10",
"react": "^18.3.1",
"react-dom": "^18.3.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/codesandbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@typescript-eslint/eslint-plugin": "^7.11.0",
"@typescript-eslint/parser": "^7.3.1",
"@vitejs/plugin-react": "^4.2.1",
"@primer/react": "37.4.0",
"@primer/react": "37.5.0",
"eslint": "^8.56.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.7",
Expand Down
2 changes: 1 addition & 1 deletion examples/consumer-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"@types/react": "^18.3.11",
"@types/react-dom": "^18.2.19",
"@types/styled-components": "^5.1.11",
"@primer/react": "37.4.0",
"@primer/react": "37.5.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"styled-components": "^5.3.11",
Expand Down
2 changes: 1 addition & 1 deletion examples/theming/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"dependencies": {
"@primer/octicons-react": "^19.9.0",
"@primer/react": "37.4.0",
"@primer/react": "37.5.0",
"clsx": "^1.2.1",
"next": "^14.2.10",
"react": "^18.3.1",
Expand Down
24 changes: 24 additions & 0 deletions packages/react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# @primer/react

## 37.5.0

### Minor Changes

- [#5253](https://github.com/primer/react/pull/5253) [`729c0fa`](https://github.com/primer/react/commit/729c0fac9a8d84f20bb77c046063837b38e90d37) Thanks [@hussam-i-am](https://github.com/hussam-i-am)! - Deprecate width, minWidth and maxWidth props from TextInput

- [#5169](https://github.com/primer/react/pull/5169) [`a2efba0`](https://github.com/primer/react/commit/a2efba0079304e25dd700523dbfa35fab56249ad) Thanks [@francinelucca](https://github.com/francinelucca)! - fix(ActionList): do not truncate description by default

- [#5254](https://github.com/primer/react/pull/5254) [`ac6ddcd`](https://github.com/primer/react/commit/ac6ddcd4b15526dd6f5ad6072a4daa57087eb1e7) Thanks [@hussam-i-am](https://github.com/hussam-i-am)! - Convert UnstyledTextInput to use CSS Modules behing feature flag

- [#5246](https://github.com/primer/react/pull/5246) [`c4ecb73`](https://github.com/primer/react/commit/c4ecb7312c1f595361a6b5a247c73af894c0be54) Thanks [@keithamus](https://github.com/keithamus)! - Migrate DialogV1 to CSS Modules

### Patch Changes

- [#5277](https://github.com/primer/react/pull/5277) [`a9088e6`](https://github.com/primer/react/commit/a9088e60b6f60ee13e309b7c263def781caba97e) Thanks [@langermank](https://github.com/langermank)! - Fix `TreeViewItem` folder icon color in legacy fallback theme + update VRT

- [#4745](https://github.com/primer/react/pull/4745) [`3f508c7`](https://github.com/primer/react/commit/3f508c7778839a8bfd659adcb21a1eda558e0f0a) Thanks [@cihad](https://github.com/cihad)! - UnderlineNav: Display loading counters only for items with the "counter" prop.

- [#5283](https://github.com/primer/react/pull/5283) [`d6ea909`](https://github.com/primer/react/commit/d6ea909eb3ef8c2ae178ee590865b80108fa3390) Thanks [@jonrohan](https://github.com/jonrohan)! - Move VisuallyHidden component from team to staff flag

- [#5292](https://github.com/primer/react/pull/5292) [`d3959f3`](https://github.com/primer/react/commit/d3959f3685bcf8aff908efe69cbf80c92c85483c) Thanks [@jonrohan](https://github.com/jonrohan)! - Move Stack component from team to staff flag

- [#5280](https://github.com/primer/react/pull/5280) [`973130e`](https://github.com/primer/react/commit/973130e9119e1f592345d3e67c1b61f37957191b) Thanks [@jonrohan](https://github.com/jonrohan)! - Move Checkbox CSS module feature flag from staff to ga

## 37.4.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@primer/react",
"version": "37.4.0",
"version": "37.5.0",
"description": "An implementation of GitHub's Primer Design System using React",
"main": "lib/index.js",
"module": "lib-esm/index.js",
Expand Down
4 changes: 2 additions & 2 deletions packages/react/src/ButtonGroup/ButtonGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {useProvidedRefOrCreate} from '../hooks'
import type {ForwardRefComponent as PolymorphicForwardRefComponent} from '../utils/polymorphic'

const StyledButtonGroup = toggleStyledComponent(
'primer_react_css_modules_staff',
'primer_react_css_modules_ga',
'div',
styled.div`
display: inline-flex;
Expand Down Expand Up @@ -82,7 +82,7 @@ const ButtonGroup = React.forwardRef<HTMLElement, ButtonGroupProps>(function But
{children, className, role, ...rest},
forwardRef,
) {
const enabled = useFeatureFlag('primer_react_css_modules_staff')
const enabled = useFeatureFlag('primer_react_css_modules_ga')
const buttonRef = useProvidedRefOrCreate(forwardRef as React.RefObject<HTMLDivElement>)

useFocusZone({
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/CounterLabel/CounterLabel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export type CounterLabelProps = React.PropsWithChildren<

const CounterLabel = forwardRef<HTMLSpanElement, CounterLabelProps>(
({scheme = 'secondary', sx = defaultSxProp, className, children, ...rest}, forwardedRef) => {
const enabled = useFeatureFlag('primer_react_css_modules_staff')
const enabled = useFeatureFlag('primer_react_css_modules_ga')
const label = <VisuallyHidden>&nbsp;({children})</VisuallyHidden>
const counterProps = {
ref: forwardedRef,
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/Details/Details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {clsx} from 'clsx'
import classes from './Details.module.css'
import {useMergedRefs} from '../internal/hooks/useMergedRefs'

const CSS_MODULES_FEATURE_FLAG = 'primer_react_css_modules_team'
const CSS_MODULES_FEATURE_FLAG = 'primer_react_css_modules_staff'

const StyledDetails = toggleStyledComponent(
CSS_MODULES_FEATURE_FLAG,
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type StyledHeaderProps = React.ComponentProps<'header'> & SxProp
type StyledHeaderItemProps = React.ComponentProps<'div'> & SxProp & {full?: boolean}
type StyledHeaderLinkProps = React.ComponentProps<'a'> & SxProp & {to?: Location | Pathname}

const CSS_MODULES_FEATURE_FLAG = 'primer_react_css_modules_team'
const CSS_MODULES_FEATURE_FLAG = 'primer_react_css_modules_staff'

const StyledHeader = toggleStyledComponent(
CSS_MODULES_FEATURE_FLAG,
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/Select/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export type SelectProps = Omit<
placeholder?: string
}

const CSS_MODULES_FEATURE_FLAG = 'primer_react_css_modules_team'
const CSS_MODULES_FEATURE_FLAG = 'primer_react_css_modules_staff'

const arrowRightOffset = '4px'

Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/Spinner/Spinner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const StyledBaseSpinner = styled.div`
`

function StyledSpinner({sx, className, ...props}: SpinnerProps) {
const enabled = useFeatureFlag('primer_react_css_modules_team')
const enabled = useFeatureFlag('primer_react_css_modules_staff')
if (enabled) {
if (sx) {
return <StyledBaseSpinner sx={sx} as={Spinner} className={clsx(className, classes.SpinnerAnimation)} {...props} />
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/Stack/Stack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {toggleStyledComponent} from '../internal/utils/toggleStyledComponent'
import {useFeatureFlag} from '../FeatureFlags'
import {clsx} from 'clsx'

const CSS_MODULE_FEATURE_FLAG = 'primer_react_css_modules_team'
const CSS_MODULE_FEATURE_FLAG = 'primer_react_css_modules_staff'

const StyledStack = toggleStyledComponent(
CSS_MODULE_FEATURE_FLAG,
Expand Down
17 changes: 17 additions & 0 deletions packages/react/src/Textarea/Textarea.dev.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React from 'react'
import type {Meta} from '@storybook/react'
import {Box, FormControl, Textarea} from '..'

export default {
title: 'Components/Textarea/Dev',
component: Textarea,
} as Meta

export const DevDefault = () => (
<Box as="form">
<FormControl>
<FormControl.Label>Default label</FormControl.Label>
<Textarea sx={{backgroundColor: 'darkgreen'}} style={{color: 'white'}} value="foo" />
</FormControl>
</Box>
)

0 comments on commit 919f426

Please sign in to comment.