Releases: primer/react
v36.5.0
Permalink to documentation
Minor Changes
-
#4027
49f585f9
Thanks @iansan5653! - DeprecateMarkdownEditor
,MarkdownViewer
,InlineAutocomplete
, and related hooks -
#4049
f0d38bc39
Thanks @TylerJDev! - Replaces deprecatedButton
component inDialog
with newest version -
#4061
f46c07189
Thanks @mperrotti! - Adds a new prop,animated
, to the ProgressBar component. This allows the "filled" segment(s) to animate and indicate some process is still in progress. -
#3913
cf225772
Thanks @mperrotti! - Supports inactive ActionList items by letting users pass the required message to theinactiveText
prop. -
#4028
bbe58b8e1
Thanks @joshblack! - Use a CSS variable for the monospace font stack
Patch Changes
-
#4082
c2809d677
Thanks @mperrotti! - - Corrects the math to calculate the width of AvatarStack containers.- Prevents
.pc-AvatarStackBody
from being removed from document flow byposition: absolute
. This isn't strictly necessary now that we're correctly setting the width of the stack, but it's an extra level of safety for preserving the correct layout.
- Prevents
-
#4020
c2a53a003
Thanks @siddharthkp! - experimental/SelectPanel2: Use<dialog>
element -
#4056
752bea4f
Thanks @broccolinisoup! - Tooltip2: Do not wrap the tooltip span and its trigger in a div -
#4039
21e75dd8
Thanks @mattcosta7! - Sync theme in effect -
#4023
83c125fc
Thanks @mperrotti! - Usearia-required
instead ofrequired
on required form elements -
#4058
4d841b77
Thanks @mperrotti! - TextInput, Textarea: Does not passaria-required
attribute to input or textarea if it is undefined. This fixes some tests that were breaking in dotcom. -
#3869
57fcfe6f
Thanks @mperrotti! - Adapts Blankslate to render proportionally in narrow areas. -
#4000
a416298c
Thanks @strackoverflow! - Fix an issue where the scrollable Dialog body could not be focused with the keyboard -
#4002
1a1d89ce0
Thanks @peterbe! - Adds the ability to unsetemptyStateText
in Autocomplete.Menu. This results in no menu being rendered. -
#3926
4e4c5ec68
Thanks @strackoverflow! - Allow overflow scrolling to be controlled via an optionaloverflow
property on Overlay -
#4096
1b9011da4
Thanks @strackoverflow! - Fix missingaria-selected
&aria-checked
attributes in ActionList items -
#4035
6497f715
Thanks @keithamus! - use<BaseStyles>
in confirm() -
#4033
bca709d0
Thanks @keithamus! - Fixed confirm() leaving<div>
s in the DOM. -
#4074
06c7c6c1d
Thanks @dependabot! - Update types for Select to includeplaceholder
-
#4037
c2a18b9a
Thanks @mattcosta7! - Portal avoids useless createElement
v36.4.0
Permalink to documentation
Minor Changes
-
#3982
968d4ef05
Thanks @joshblack! - Update SSRProvider, useSSRSafeId to use the native React 18 useId() instead of @react-aria/ssr -
#3812
3f82a1cab
Thanks @mperrotti! - Adds an 'inactive' state to buttons. An inactive button looks disabled and has aria-disabled, but it can still be clicked and focused. This was added to support buttons that are broken due to availability issues, but can't be removed from the page.
Patch Changes
-
#4026
503c7e625
Thanks @mperrotti! - Fixes layout for loading DataTable cells -
#4001
0e9d841e3
Thanks @langermank! - Fixline-height
on markdown viewer (comment box) -
#3987
4321d59e9
Thanks @iulia-b! - MarkdownEditor & MarkdownViewer: Update new line identifier for formatting markdown -
#4008
df7dc2af1
Thanks @dipree! - Changes the focus styling of input components such asTextarea
,TextInput
,TextInputWithTokens
andSelect
from usingborder
andbox-shadow
to useoutline
only for better border rendering and scrollbar support. -
#4013
d26aeab32
Thanks @keithamus! - Avoid error when using Modal Dialog within TreeView -
#4012
5fd025f04
Thanks @keithamus! - Ensure ConfirmationDialog adds host element to the DOM -
#4024
0ea121af3
Thanks @colebemis! - StateLabel: Use correct octicons fordraft
andpullClosed
states -
#4022
98ad3203a
Thanks @joshblack! - Update the resize behavior of PageLayout to ignore right clicks when resizing
v36.3.1
Permalink to documentation
Patch Changes
- #3998
dd285e2ac
Thanks @joshblack! - Remove changes to focus outline to prevent double focus rings from showing
v36.3.0
Permalink to documentation
Minor Changes
-
#3963
e16927b5a
Thanks @mperrotti! - Adds "unavailable" status to StateLabel -
#3484
e40378951
Thanks @ValbertMartins! - TextArea: Add contrast property
Patch Changes
-
#3897
6b0c118b3
Thanks @mperrotti! - When passing anid
prop to ActionMenu.Button, it will be passed as the rendered button element'sid
attribute instead of being set as an automatically generated ID. -
#3960
ec8a2cadd
Thanks @pksjce! - Update to @primer/behaviors v1.5.1 -
#3945
40b29787e
Thanks @siddharthkp! - ActionList: Fix bug that did not allow both inline and block description at the same time -
#3903
f62ec728a
Thanks @pksjce! - Make resize vertical splitter keyboard accessible -
#3946
e08432d54
Thanks @siddharthkp! - Link: Addinline
prop to tag links inside a text block, underlined with accessibility setting[data-a11y-link-underlines]
-
#3983
43d1dce4a
Thanks @TylerJDev! - Readjust order ofPageLayout.Pane
contents -
#3972
87028d2b9
Thanks @iulia-b! - Update MarkdownEditor to correctly identify non-standard formatted tasklist items
v36.2.0
Permalink to documentation
Minor Changes
-
#3900
2f9b5869
Thanks @broccolinisoup! - ActionList: Add ActionList.GroupHeading component to label the group lists and update labelling semantics for accessibility -
#3143
cc0c16e9
Thanks @green6erry! - Adjusts position of children withinPageLayout.Pane
to live above adjustable resize form.
Patch Changes
-
#3935
89702725
Thanks @broccolinisoup! - Dialog: Add sx back to dialog footer -
#3918
e8d0c15f
Thanks @dylanatsmith! - Update the spacing for buttons in the footer of a Dialog. -
#3893
a4006e2f
Thanks @stkao05! - Fix MarkdownEditor fullHeight support -
#3895
9daea96b
Thanks @cs25-esc! - AvatarStack: BothdisableExpand
andrightAlign
can be passed together now -
#3667
791c9838
Thanks @six7! - Changes visual appearance of MarkdownEditor -
#3910
988b297d
Thanks @broccolinisoup! - Tooltip (draft): Do not expose the tooltip text to AT when it is not visible -
#3924
e512c049
Thanks @thyeggman! - Fix issue in DataTable so that sort order is determined after column headers are created -
#3916
c2f81b3c
Thanks @strackoverflow! - Fix inconsistent border treatment when there is one avatar in an AvatarStack -
#3925
6b362b2a
Thanks @broccolinisoup! - Tooltip2: make the text prop required
v36.1.0
Minor Changes
- #3843
4ea8bcf7
Thanks @thyeggman! - Vertically align cell contents inDataTable
Patch Changes
-
#3866
22fa0928
Thanks @strackoverflow! - DataTable: fix incorrect pagination steps when defaultPageIndex is provided -
#3888
3e20ab1f
Thanks @strackoverflow! - Select: Add support forsx
prop -
#3870
2c24d6a8
Thanks @siddharthkp! - ActionList: Checkbox inside a disabled item should havenot-allowed
cusor
v36.0.0
Permalink to documentation
We're excited to announce the next major release of Primer React! 🥳 Starting in v36, you'll see changes to @primer/react
that make it even easier to build consistent, accessible experiences that feel right at home at GitHub.
New components ✨
The following components have been moved from @primer/react/drafts
to @primer/react
:
Breaking changes ⚠️
The v36 release of @primer/react
introduces several breaking changes to components and changes to the package itself. To understand how to migrate between v35 and v36 of @primer/react
, review the sections below to understand how your project may be impacted by these changes.
Components
The following list of components have breaking changes to their API or availability in @primer/react
. For a list of deprecated components that have been removed, visit the Removed components section below.
AvatarToken
Button
Checkbox
FilterList
FilterSearch
FormControl
Radio
Textarea
TextInputWithTokens
UnderlineNav
AvatarToken
The size
prop for AvatarToken
has been updated in v36 to only accept "large"
and "xlarge"
.
v35 | v36 |
---|---|
<AvatarToken size="small">
<AvatarToken size="medium">
<AvatarToken size="large">
<AvatarToken size="xlarge">
<AvatarToken size="extralarge"> |
<AvatarToken size="large">
<AvatarToken size="xlarge"> |
Button
The API for the Button
component has been updated to match the specification for this component and align with other implementations like in Primer View Components.
-
The
leadingIcon
prop has been renamed toleadingVisual
v35 v36 <Button leadingIcon={TrashIcon}>Delete</Button>
<Button leadingVisual={TrashIcon}>Delete</Button>
-
The
trailingIcon
prop has been renamed totrailingVisual
v35 v36 <Button trailingIcon={EyeIcon}>Delete</Button>
<Button trailingVisual={EyeIcon}>Delete</Button>
-
The
Button.Counter
component has been removed, use thecount
prop insteadv35 v36 <Button> Watch <Button.Counter>5</Button.Counter> </Button>
<Button count={5}>Watch</Button>
-
The
outline
variant has been removed, instead usevariant="invisible"
v35 v36 <Button variant="outline">Example</Button>
<Button variant="invisible">Example</Button>
Checkbox
The validationStatus
prop has been updated and no longer supports the 'warning'
value. Instead, only 'error'
and 'success'
are supported.
FilterList
The FilterList
component has been deprecated in v36 in favor of the ActionList
component. To continue using this component, update your imports for FilterList
to import from the deprecated
entrypoint.
v35 | v36 |
---|---|
import { FilterList } from '@primer/react'; |
import { FilterList } from '@primer/react/deprecated'; |
FilterSearch
The FilterSearch
component has been deprecated in v36. A new filter component is currently in progress but is not yet available. Until a new component is ready, use a combination of Button
, TextInput
, and ActionList
to reproduce this component. To continue using this component, update your imports for FilterSearch
to import from the deprecated
entrypoint.
v35 | v36 |
---|---|
import { FilterSearch } from '@primer/react'; |
import { FilterSearch } from '@primer/react/deprecated'; |
FormControl
The variant
prop for the FormControl.Validation
component has been updated to no longer support the 'warning'
value. Instead, only 'error'
and 'success'
are supported.
Radio
The validationStatus
prop has been updated and no longer supports the 'warning'
value. Instead, only 'error'
and 'success'
are supported.
Textarea
The validationStatus
prop has been updated and no longer supports the 'warning'
value. Instead, only 'error'
and 'success'
are supported.
TextInputWithTokens
The size
prop has been updated to no longer accept the extralarge
value. Use xlarge
instead.
v35 | v36 |
---|---|
<TextInputWithTokens size="extralarge"> |
<TextInputWithTokens size="xlarge"> |
UnderlineNav
The implementation for UnderlineNav
has been updated in v36. Certain props
for UnderlineNav have been removed and the UnderlineNav.Link
component has been replaced by UnderlineNav.Item
.
Component | v35 | v36 |
---|---|---|
UnderlineNav | actions |
This prop has been removed |
align |
This prop has been removed | |
full |
This prop has been removed | |
UnderlineNav.Link | Use the UnderlineNav.Item component |
|
UnderlineNav.Link | selected |
Use the aria-current prop |
v35 | v36 |
---|---|
<UnderlineNav aria-label="Main">
<UnderlineNav.Link href="#home" selected>
Home
</UnderlineNav.Link>
<UnderlineNav.Link href="#documentation">
Documentation
</UnderlineNav.Link>
<UnderlineNav.Link href="#support">
Support
</UnderlineNav.Link>
</UnderlineNav> |
<UnderlineNav aria-label="Main">
<UnderlineNav.Item href="#home" aria-current="page">
Home
</UnderlineNav.Item>
<UnderlineNav.Item href="#documentation">
Documentation
</UnderlineNav.Item>
<UnderlineNav.Item href="#support">
Support
</UnderlineNav.Item>
</UnderlineNav> |
To continue using the implementation for UnderlineNav
from v35
, import the component from @primer/react/deprecated
.
v35 | v36 |
---|---|
import { UnderlineNav } from '@primer/react'; |
import { UnderlineNav } from '@primer/react/deprecated'; |
Removed components
The following deprecated components have been removed from @primer/react/deprecated
and are no longer be available.
Name | Migration |
---|---|
BorderBox |
Use the Box component, <BorderBox> → <Box borderWidth='1px' borderStyle='solid' borderColor='border.primary' borderRadius={2}> |
ChoiceFieldset |
Use the CheckboxGroup or RadioGroup component |
Item |
Use CheckboxGroup or RadioGroup component |
ChoiceInputField |
Use the FormControl component |
Flex |
Use the Box component, <Flex> → <Box display="flex"> |
Grid |
Use the Box component, <Grid> → <Box display="grid"> |
Position |
Use the Box component, <Position> → <Box> |
Absolute |
Use the [Box ](https://... |
v35.32.2
Permalink to documentation
Patch Changes
-
#3861
85d9e515
Thanks @langermank! - Usebutton
CSS vars for border-color to support a feature flag -
#3862
8cd6007e
Thanks @TylerJDev! - Addsaria-disabled
to inactive pagination buttons.
v35.32.1
Permalink to documentation
Patch Changes
-
#3839
d463d547
Thanks @joshblack! - Restore Link underline preference to original behavior -
#3836
038a7899
Thanks @xiaolou86! - docs: fix typo
v35.32.0
Permalink to documentation
Minor Changes
-
#3720
521b02f4
Thanks @mperrotti! - Updates link styles to support underline link preferences. -
#3813
1fcfc478
Thanks @joshblack! - Add support for aref
on the inner in ToggleSwitch
Patch Changes
-
#3815
794a477c
Thanks @pksjce! - Update hover styles for ActionList item -
#3691
f4648b19
Thanks @joshblack! - Update ActionList to placeid
on item with an ARIA role -
#3809
6b18eaec
Thanks @gr2m! - exportSelectPanel
from@primer/react/drafts
-
#3683
a84a1498
Thanks @broccolinisoup! - Button: Allow leadingIcon, trailingIcon, trailingAction to be overridable with sx -
#3784
6f4fe7d2
Thanks @radglob! - Revert "Add aria-selected value to ActionList.Item."