Button
A button triggers an event or action. They let users know what will happen next.
yarn add @atlaskit/button
21.1.3
Patch Changes
- Updated dependencies
A button triggers an event or action. They let users know what will happen next.
yarn add @atlaskit/button
6a1bfec451e30
-
[ux] color
and text-decoration
style specificity have been increased to reduce the probability
of global <a>
tag styles interfering with button styles.78292160a22d6
-
Updated styles for new button to use rem
unit for width and height instead of em
with
fractional units. This change is no longer behind a feature flag.#117363
10a0f7f6c2027
-
This package's peerDependencies
have been adjusted for react
and/or react-dom
to reflect the
status of only supporting React 18 going forward. No explicit breaking change to React support has
been made in this release, but this is to signify going forward, breaking changes for React 16 or
React 17 may come via non-major semver releases.
Please refer this community post for more details: https://community.developer.atlassian.com/t/rfc-78-dropping-support-for-react-16-and-rendering-in-a-react-18-concurrent-root-in-jira-and-confluence/87026
9856bf5d3faeb
-
Updated styles for new button to use rem
unit for width and height instead of em
with
fractional units.f13dc94ee78bb
-
Remove codemod for deprecated exports and remove now unused dev dependencies.4660ec858a305
-
Update React
from v16 to v18b5716d4ae35de
-
Unsets internal SplitButton
context to fix an edge-case where appearances of deeply nested
Button components were being overridden.520c68d91d401
-
Updated dividers in Visually refreshed split button to use color.borderbe58e4bb2e387
-
Migrating usages of UNSAFE types and entrypoints that have been renamed in @atlaskit/icon
and
@atlaskit/icon-lab
.962b5e77810fb
-
Adds side-effect config to support Compiled css extraction in third-party apps8aebfeb14d89a
-
[ux] Removed feature flag platform.design-system-team.button-tokenised-typography-styles
resulting in fully tokenised typography styles.c75edf6df890b
-
Updated icon types usage since there are now NewCoreIconProps
and NewUtilityIconProps
.3c4de48168ffe
-
Update the import path of useId*
from @atlaskit/ds-lib
8ae1e110621b7
-
Internal changes to feature flag used to toggle new icons2071254d3ad65
-
IconButton now passes through the tooltip ignoreTooltipPointerEvents override propdebc522e68817
-
Remove react-router-dom from devDependencies as it is incompatible with React 18.1e6883fdd5111
-
Change react-uid
to use ID generator that is compatible with React16 and React 18; Strict React
18 behind a flag.eb643a54fc192
-
Removed link
and subtle-link
options in the appearance
prop for the LinkButton. Removed
none
option in the spacing
prop for the new Buttons.#127511
db30e29344013
-
Widening range of react
and react-dom
peer dependencies from ^16.8.0 || ^17.0.0 || ~18.2.0
to the wider range of ``^16.8.0 || ^17.0.0 || ^18.0.0` (where applicable).
This change has been done to enable usage of react@18.3
as well as to have a consistent peer
dependency range for react
and react-dom
for /platform
packages.
#120669
9e1c531090ea4
-
Removed these deprecated props for overriding icon sizes:
UNSAFE_size
UNSAFE_iconBefore_size
UNSAFE_iconAfter_size
See the examples for overriding icon props for the new method of customizing icon sizes in buttons. To automate migration of these props, use the button codemod.
#121331
a8c984f9b3956
-
ButtonGroup's deprecated appearance
prop has been removed. Apply the appearance
prop on each
button instead.
Before:
<ButtonGroup appearance="primary">
<Button>First button</Button>
<Button>Second button</Button>
<Button>Third button</Button>
</ButtonGroup>
After:
<ButtonGroup>
<Button appearance="primary">First button</Button>
<Button appearance="primary">Second button</Button>
<Button appearance="primary">Third button</Button>
</ButtonGroup>
0efaab9cca145
-
ButtonGroup's appearance
prop has been deprecated and will be removed in a future release. Apply
the appearance
prop on each button instead.89ed46b28e349
-
[ux] Updates the old-button component behind a feature flag with new visual changes as per the
JIRA visual refresh project.6eabeed917202
-
Fix dividers being under selected button when the new visual appearance feature gate is enabled.aa0094627549a
-
Removed feature flag for render prop fix introduced in 17.22.0.49ea6581aea88
-
The overlay
prop has been removed in new buttons. It only existed in legacy buttons to support
loading spinners, which can be achieved in the new button using the isLoading
prop.#112945
d7af9e23536c0
-
New button prevents unintended spread props being passed to children. The following props will now
be ignored:
Note: These props were already excluded via types. The API has not changed.
f2f51e7a24d00
-
Internal change only. Remove references to deprecated @atlaskit/theme constants and replace with
hard-coded values.5081c9ca53507
-
Correctly handle render props for icons in order to prevent unintentional renders.60baf23d5f27d
-
Testing a new visual appearance behind a feature flag. If successful it'll be released at a later
date.f6f2f96728bc0
-
Marking the overlay
prop on new Buttons as deprecated.223959ef57c80
-
Explicitly set jsxRuntime to classic via pragma comments in order to avoid issues where jsxRuntime
is implicitly set to automatic.#111486
f848f651ef678
-
Accessibility improvement
New buttons now adds ", Loading" to the accessible name of loading buttons regardless of how they
are labelled. This supports labelling by text content (children
), aria-label
, and
aria-labelledby
.
The ", Loading" label was previously part of the loading spinner <svg>
, which has been relocated
because this does not support aria-label
or aria-labelledby
. Any test locators for loading
buttons may need to be updated.
The most robust way to find loading buttons is by role and accessible name. This accounts for label precedence. For example:
screen.findByRole("button", {
name: /, Loading/,
});
To validate a loading button that is already located, use toHaveAccessibleName()
:
render(<Button testId="foo" isLoading>My label</Button>);
const button = screen.getByTestId("foo");
expect(button).toHaveAccessibleName(`My label , Loading`);
For locating loading spinners, a test ID has been added that is based on the button testId
. For
example:
render(<Button isLoading testId="bar">My label</Button>);
const spinner = screen.getByTestId("bar--loading-spinner-wrapper");
expect(spinner).toBeInTheDocument();
dc7e72da70ef7
-
Migrating instances of UNSAFE_ANCHOR
primitive imports to the new safe import Anchor
, in
preparation of Anchor open beta and removal of the unsafe export from @atlaskit/primitives
53958b31d2e7
-
Legacy buttons are now marked with intent to deprecate in favor of new buttons36d7498311be
-
We are testing an internal change to typography behind a feature flag. If this change is
successful it will be available in a later release.bd83d4aea949
-
Icon and link icon button types no longer support the isLoading
prop. Internally isLoading
was
already being ignored. This change only affects types.99bd29123e13
-
Internal change to support experimental icon components35fd5ed8e1d7
-
Upgrading internal dependency bind-event-listener
to @^3.0.0
0437b8b3c791
-
Updated imports of UNSAFE_PRESSABLE
primitive to new Pressable
exportf38506801b8f
-
Added a purple discovery
appearance to new Buttons to be used to communicate change or new
features.612718d81d68
-
Prevent new buttons from shrinking inside flex containers0af5682714ea
-
Refactors internal styling logic of the new button to align to our upcoming styling standards.aa76565f1f5b
-
New buttons now accept render props for icon properties. This can be useful when setting props on
icons directly.3f4e688ce636
-
Tooltips are now included within icon buttons. They are disabled by default. To enable set
isTooltipDisabled
to false.c1d62ce0679e
- -
Fixed a bug in new loading buttons where the spinner color was incorrect in selected state.
isLoading
prop on new buttons was mistakenly added to unsupported link
buttons.cursor: progress
), rather than a disabled
cursor (cursor: not-allowed
).4bb74bb023d4
-
Added explicit text-decoration
styles to new button focus states. This ensures button styles are
not interfered with by global styles.b779928f2d49
-
[ux] New buttons now have hovered and pressed interaction states when they are selected
(isSelected
)9564de632638
-
Introduces isLoading prop to the new Button and IconButton components. When set to true a
traditional loading spinner will be shown.#73843
9a090e6e7733
-
The new icon button incorrectly supported spacing="none"
. This release removes support for this,
leaving "default"
and "compact"
as the only two options.
The icon button docs have also been updated to better reflect the intended use of the label
prop
instead of aria-label
. The label
prop is designed to abstract the technical implementation for
accessibility requirements. The new icon button does not use the aria-label
attribute under the
hood, rather it relys on visually hidden text instead. This is done for accessibility reasons as
aria-label
is not always translated whereas visually hidden text will be.
cce378569da1
-
Migration documentation for changing from old to new button components. Documentation-only change.75b2ade8b254
-
New buttons no longer directly emit analytics tracking events to prevent duplicate events, as the
underlying primitive components already have tracking. Any analytics context set on new buttons
are retained through forwarding to the primitivesba18e89df3d9
-
Icon buttons no longer accept aria-label
attributes to prevent possible duplicate labels being
applied (the dedicated label
prop handles this)b037e5451037
-
Update new button text color fallback for default theme (non-token) to match that of old button
current text colore55d8295c1c1
-
Changes to add a page and more specific information in link button documentation.9e9847bebdbe
-
Fix aria-disabled not being passed to custom theme buttond18ec4d7ce20
-
[ux] Tidy up of the platform.design-system-team.icon-button-spacing-fix_o1zc5
Platform Feature
Flag which applies a small adjustment to icon spacing for buttons using iconBefore
and
iconAfter
props. Small visual adjustment is to be expected — keep this in mind when reviewing
any VR tests breaking. The spacing around the icons will be reduced.d8f830e29011
-
[ux] Assistive technologies now define ButtonGroup as a group. Additionally label
and titleId
props introduced to label the current group.c6418d429d47
-
New Button goes open beta!Removed all UNSAFE_
exports and /unsafe
entrypoint.
import { UNSAFE_BUTTON } from '@atlaskit/button' ❌
import Button from '@atlaskit/button/new' âś…
import { UNSAFE_BUTTON } from '@atlaskit/button/unsafe' ❌
import Button from '@atlaskit/button/new' âś…
See new features for new exports and entrypoint ⤵
New Button goes open beta!
Check out the exports under @atlaskit/button/new
and the docs for
our new approach.
import Button from '@atlaskit/button/new';
import { LinkButton } from '@atlaskit/button/new';
import { IconButton } from '@atlaskit/button/new';
import { LinkIconButton } from '@atlaskit/button/new';
import { SplitButton } from '@atlaskit/button/new';
23a1d31d3c09
-
Add entrypoint for new button work heading to open beta at @atlaskit/button/new
67c05dbef826
-
Exclude medium from UNSAFE_iconBefore_size and UNSAFE_iconAfter_size types.f12e489f23b0
-
Re-build and deploy packages to NPM to resolve React/Compiled not found error (HOT-106483).b99d50f91202
-
Internal changes to styling on SplitButton (closed beta) to fix issues with border radius when
wrapper elements are used.a3fc003a2d20
-
[ux] Fixes a bug in LinkIconButton
(in closed beta) where the UNSAFE_size
prop did not applydd91461d616d
-
[ux] Fixes a bug in new Buttons (in closed beta) that affected text alignmentd100ca42f46
- Push
model consumption configuration done for these packageseba86990eef
- Update
new Button (in closed beta) API for iconBefore
and iconAfter
to be bounded with unsafe
fallbacks for icon sizingd4c4a73a30a
- [ux]
Updates supported SplitButton (closed beta) appearances to be 'default' or 'primary'. Makes
dividers full height to match existing uses outside of navigation contexts.09f29df6245
- Update
IconButton (in closed beta) API to be bounded with unsafe fallback for icon sizingdf138bd3900
- [ux]
Update to divider colors and height in SplitButton (alpha)8764ee956ae
- [ux]
Remove appearance
prop options link
and subtle-link
from the new Button (in Alpha). They are
now reserved for the new LinkButton component0fe0a5121a7
- Add
missing testId
prop to <ButtonGroup>
to enable testing9691abc55ce
-
Restructure new Button (in Alpha) types for documentation purposesf858870ae90
- Added
new Button variants (in Alpha) unsafe exports to root entrypoint for documentation purposes48423992847
- Add new
Link Button variants to unsafe entrypoint for internal testing purposes.4c9d4a7be34
- - Link
button variants (still in Alpha) <LinkButton>
and <LinkIconButton>
now support router link
components through use of an app provider7c662f243b9
- Expose
more UNSAFE exports from UNSAFE entry point for internal work. PLEASE DO NO USE ANYTHING FROM
"UNSAFE" ENTRY POINT WITH "UNSAFE" PREFIX.6900f89eb0e
- Internal
changes to use space tokens. There is no expected visual or behaviour change.8c6ebfca290
- Expose
temporary "unsafe" entry point for internal work. It will be removed soon. PLEASE DO NOT USE.234448e5bb3
- [ux]
Updated inner space fix values to be -2px to cover up for 2px margins.696e8c196a3
- Update
our documentation of our CustomThemeButton export to note the impending deprecation that we have
planned.f4aff27416d
- [ux] We
are testing icon button internal spacing fix behind a feature flag. Now the space between icons
and right or left edge of the button will be optically perceived as even. If this fix is
successful it will be available in a later release.54b69a2fc03
- Refactor
out rest props from button and make props more explicit.4b3cfb2276b
- Refactor
button base to remove rest props and make props more explicit.11cd2f83450
- Refactor
loading button to use less rest props to pass props more explicitly.4ae083a7e66
- Use
@af/accessibility-testing
for default jest-axe config and jest-axe import in accessibility
testing.ba43427b3e8
- Internal
changes to account for introduction of shape/radius tokens.5104149700b
- Button
no longer unnecessarily sets tabindex
as 0
for focus when using default <button>
or <a>
elements, as they are already focusable. This is still set when using the component
prop so
other elements can still be be focused. (This change is feature flagged)49b08bfdf5f
- Migrated
use of gridSize
to space tokens where possible. There is no expected visual or behaviour change.56507598609
- Skip
minor dependency bump3367210dce8
- [ux]
Internal change to the way focus is rendered for buttons. Focus states now apply a 2px offset to
the focus ring to aid the contrast of the focus state when applied on the 'primary' and 'selected'
buttons. As part of this change, and to settle on a more systemic approach to focus, button also
no longer applies a different colored shadow per appearance.729e45efa7f
- [ux] Fix
a bug where the incorrect design tokens were used for the color of spinners in warning, disabled
and selected buttons18aeca8c199
- Internal
change to update token references. There is no expected behaviour or visual change.f96f3ebd861
- [ux] Use
color.background.neutral.subtle token to represent transparent background.71799e16ae6
-
Introduce InteractionContext to @atlaskit/button3c76f243e7f
-
InteractionContext is nullable9f6369f5505
- Updates
@emotion/core
to @emotion/react
; v10 to v11. There is no expected behaviour change.bc989043572
- Internal
changes to apply spacing tokens. This should be a no-op change.1f4dba8f1a5
- [ux]
DSP-6696: prevent ButtonGroup items from being squished14d635468f6
- [ux]
DSP-6696: prevent empty ButtonGroup items from showing spacing by switching to flexbox gape09f1576233
- Internal
code change turning on new linting rules.8a5bdb3c844
-
Upgrading internal dependency (bind-event-listener) for improved internal typescb2392f6d33
- Export
BaseProps type to prevent it being referenced via deep import path in d.ts filescb2392f6d33
- Upgrade
to TypeScript 4.2.462edf20ab1e
- Migrates
all usage of brand tokens to either selected or information tokens. This change is purely for
semantic reasons, there are no visual or behavioural changes.dde969b6ef5
- Fix type
error with missing 'css' prop when importing Buttons directly from
"@atlaskit/button/standard-button"19d72473dfb
-
Performance optimisations (reduce tree size and improve style building)19d72473dfb
- Updates
usage of deprecated token names so they're aligned with the latest naming conventions. No UI or
visual changesf460cc7c411
- Builds
for this package now pass through a tokens babel plugin, removing runtime invocations of the
tokens() function and improving bundle size.c3b0a17a96c
- Fix
spinner colours for disabled, warning and selected states when using tokense267e790d38
- [ux]
Colors are now sourced through tokens.2d7cc544696
- Updates
token usage to match the latest token setd6f7ff383cf
- Updates
to development dependency storybook-addon-performance
49961803553
- Now
utlises the auto focus hook from ds-lib
.79c23df6340
- Use
injected package name and version for analytics instead of version.json.9f733e3f59
- Fixes
inlined inferred types in @atlaskit/button/loading-button - no material change#5860
d7540c04cd
- Before
15.x
it was possible for you to pass in data-testid
and for that to be applied. In 15.x
we
changed how props are spread so that is no longer possible. Please use the public API prop
testId
to control data-testid
We have:
data-testid
or data-has-overlay
you will
get a type warningdata-testid
to testId
on any of our buttons
(CustomThemeButton
, LoadingButton
or StandardButton
)You first need to have the latest button installed before you can run the codemod
yarn upgrade @atlaskit/button@^15.1.1
Then you can use our cli tool to run the codemod
npx @atlaskit/codemod-cli /path/to/target/directory --parser [tsx | flow | babel]
5f58283e1f
- Export
types using Typescript's new "export type" syntax to satisfy Typescript's --isolatedModules
compiler option. This requires version 3.8 of Typescript, read more about how we handle Typescript
versions here: https://atlaskit.atlassian.com/get-started Also add typescript
to
devDependencies
to denote version that the package was built with.1944b0b626
- Export
BaseOwnProps type to prevent it being referenced via deep import path in declaration files of
dependendentsf75fedbf16
- In this
version we made button dramatically faster and lighter and improved buttons internal spacing 🤩There are now 3 button variants. We highly recommend you only install button through entry points to ensure minimum kbs. Our codemod will automatically shift you over to the entry point format
// button variants
import Button from '@atlaskit/button/standard-button';
import LoadingButton from '@atlaskit/button/loading-button';
import CustomThemeButton from '@atlaskit/button/custom-theme-button';
// other entry points
import ButtonGroup from '@atlaskit/button/button-group';
import { CustomThemeButtonProps } from '@atlaskit/button/types';
We have made some intentional changes to button spacing:
8px
→ 4px
). This makes a buttons
text and icon feel more connected36px
x 32px
→ 32px
x
32px
)<Button/>
as we know and love it today, has been split into three variants so that consumers only
pay for the features that they use
<Button/>
): The standard button that is as fast as possible which is for
most usagesGlobalTheme
dark mode pattern<LoadingButton/>
): A small wrapper around <Button/>
that allows you to
show a @atlaskit/spinner
as an overlay on the button when you set an isLoading
prop to true
GlobalTheme
dark mode pattern<CustomThemeButton/>
): This is a 1:1 of what <Button/>
was
previouslyisLoading
behavior as <LoadingButton/>
GlobalTheme
dark mode patternAll of the variants are all available through separate entry points to ensure minimum bundle size
import Button from '@atlaskit/button/standard-button';
import LoadingButton from '@atlaskit/button/loading-button';
import CustomThemeButton from '@atlaskit/button/custom-theme-button';
You can also import them all from the root entry point if you like! Heads up though, if your bundler does not support tree shaking then you will not get the minimum possible bundle size
Previously the default export of the button package was a button that supported theme
import Button from '@atlaskit/button';
Now the default export is our 'standard button' which does not support the theme
prop.
Don't worry if you do use the theming API – our codemods will help move your usages to the correct version.
// before codemod
import Button from '@atlaskit/button';
// after codemod
import Button from '@atlaskit/button/custom-theme-button';
Previously disabled buttons had fairly simple behaviour. They would call event.stopPropagation()
on an inner element in the bubble phase. This would prevent onClick
handlers from being called,
but not other event types.
We have invested a lot of effort to make a more robust disabled button experience regardless of element type.
A disabled <button>
is a native HTML concept, but disabled is not a native concept for other
element types such as <a>
and <span>
.
The behavior of a disabled <button>
is imitated as much as possible regardless of element type.
A disabled <button>
will not fire any user events. We imitate this by:
pointer-events: none
to all children elements of the button element. This prevents
inner elements publishing events.event.preventDefault()
and event.stopPropagation()
in the
capture phase for the following events:
'mousedown'
,'mouseup'
, 'keydown'
, 'keyup'
, 'touchstart'
, 'touchend'
, 'pointerdown'
, 'pointerup'
, and
'click
'. This prevents the event performing its default browser behavior and stops the event
from proceeding to the bubble phase.For a disabled button we also set tabIndex={-1}
, and if the element has focus, we call
element.blur()
.
overlay
(Standard button only)The overlay
prop allows you to render a React.ReactNode
over the top of the content inside of a
button. This prop is only available for the standard button. LoadingButton
and CustomThemeButton
use the overlay
prop for displaying a @atlaskit/spinner
as needed.
When an overlay is being used (such as for a @atlaskit/spinner
for LoadingButton
), then these
changes are applied:
:active
and :hover
styles (otherwise keeps the same visual and cursor experience as
if it did not have an overlay)Previously, when an overlay was used, the button simply applied pointer-events: none
to the button
content. This approach had a number of shortcomings.
font-family: inherit
style rule. Recently, Chrome decided to add font-family: arial
to
the default <button>
style rules. We fixed this issue by releasing a patch version of
@atlaskit/css-reset
. We have now added the fix into this package as wellButtonAppearance
type
to Appearance
(the codemod will safely upgrade usages)83e32fa998
- Now uses
useAnalyticsEventHandler
in @atlaskit/analytics-next rather than its own version of the hooke45be534ce
- [ux]
Unwinding anchor style change in AltaskitThemeProvider. Restoring color: !important to button to
deal with specificity wars6ea0de1281
- [ux] Not
allowing anchors to have :visited styles. This restores previous behaviour642a8a7735
- [ux]
AtlaskitThemeProvider
(deprecated) applies a colour reset to anchor tags. This was impacting the
colouring of @atlaskit/button
. To go around specificity issues caused by AtlaskitThemeProvider
in the past @atlaskit/button
would apply a !important
to it's color
values. We have changed
AtlaskitThemeProvider
so that it will no longer impact the color
values of @atlaskit/button
#3885
6c525a8229
- Upgraded
to TypeScript 3.9.6 and tslib to 2.0.0
Since tslib is a dependency for all our packages we recommend that products also follow this tslib upgrade to prevent duplicates of tslib being bundled.
954cc87b62
- The readme
and package information has been updated to point to the new design system website.87f4720f27
- Officially
dropping IE11 support, from this version onwards there are no warranties of the package working in
IE11. For more information see:
https://community.developer.atlassian.com/t/atlaskit-to-drop-support-for-internet-explorer-11-from-1st-july-2020/3953454a9514fcf
- Build and
supporting files will no longer be published to npmafc842d132
- FIX: Buton
text font-weight changed from normal to medium as per ADG spec98f462e2aa
- Bumping
use the latest version of @atlaskit/spinner[patch]6b8e60827e:
Change imports to comply with Atlassian conventions- [patch]57c0487a02:
FIX: Button focus ring color changed to B100- Updated dependencies 449ef134b3:
Updated dependencies f6667f2909:
Updated dependencies 68ff159118:
Updated dependencies 6efb12e06d:
Updated dependencies fd41d77c29:
[patch]109004a98e:
Deletes internal package @atlaskit/type-helpers and removes all usages. @atlaskit/type-helpers has been superseded by native typescript helper utilities.- Updated dependencies 168b5f90e5:
Updated dependencies 0c270847cb:
Updated dependencies 109004a98e:
Updated dependencies b9903e773a:
[patch]6548261c9a:
Remove namespace imports from React, ReactDom, and PropTypes- Updated dependencies 6548261c9a:
[patch]4a223473c5:
Removes babel/runtime from dependencies. Users should see a smaller bundlesize as a result- Updated dependencies 28f8f0e089:
Updated dependencies 82747f2922:
Updated dependencies 4a223473c5:
Updated dependencies 6a8bc6f866:
[patch]30acc30979:
@atlaskit/select has been converted to Typescript. Typescript consumers will now get static type safety. Flow types are no longer provided. No API or behavioural changes.
[patch]35d2229b2a:
Adding missing license to packages and update to Copyright 2019 Atlassian Pty Ltd.
[patch]a2d0043716:
Updated version of analytics-next to fix potential incompatibilities with TS 3.6
[minor]66e147e6a1:
Adding an optional prop testId
that will set the attribute value data-testid
. It will help
products to write better integration and end to end tests.
[minor]93022be303:
Align button and subtle button text colour with ADG guidelines (improved contrast)
[patch]097b696613:
Components now depend on TS 3.6 internally, in order to fix an issue with TS resolving non-relative imports as relative imports
[patch]abee1a5f4f:
Bumping internal dependency (memoize-one) to latest version (5.1.0). memoize-one@5.1.0 has full typescript support so it is recommended that typescript consumers use it also.
[patch]926b43142b:
Analytics-next has been converted to Typescript. Typescript consumers will now get static type safety. Flow types are no longer provided. No behavioural changes.
Breaking changes
withAnalyticsForSumTypeProps
alias has been removed, please use withAnalyticsEvents
AnalyticsContextWrappedComp
alias has been removed, please use withAnalyticsContext
Breaking changes to TypeScript annotations
withAnalyticsEvents
now infers proptypes automatically, consumers no longer need to provide
props as a generic type.withAnalyticsContext
now infers proptypes automatically, consumers no longer need to provide
props as a generic type.WithAnalyticsEventProps
has been renamed to WithAnalyticsEventsProps
to match source
codeCreateUIAnalyticsEventSignature
has been renamed to CreateUIAnalyticsEvent
to match
source codeUIAnalyticsEventHandlerSignature
has been renamed to UIAnalyticsEventHandler
to match
source codeAnalyticsEventsPayload
has been renamed to AnalyticsEventPayload
ObjectType
has been removed, please use Record<string, any>
or [key: string]: any
UIAnalyticsEventInterface
has been removed, please use UIAnalyticsEvent
AnalyticsEventInterface
has been removed, please use AnalyticsEvent
CreateAndFireEventFunction
removed and should now be inferred by TypeScriptAnalyticsEventUpdater
removed and should now be inferred by TypeScript[patch]688f2957ca:
Fixes various TypeScript errors which were previously failing silently
[minor]8fcbe23ec6:
Updated types for analytics-next and buttons to make them easier to consume
[patch]9f8ab1084b:
Consume analytics-next ts type definitions as an ambient declaration.
[patch]d0db01b410:
TypeScript users of withAnalyticsEvents and withAnalyticsContext are now required to provide props as a generic type. This is so that TypeScript can correctly calculate the props and defaultProps of the returned component.
Before:
withAnalyticsEvents()(Button) as ComponentClass<Props>;
After:
withAnalyticsEvents<Props>()(Button);
[patch]b0ef06c685:
[patch]2a2d2060ae:
[patch]754f83b6f0:
[major]7c17b35107:
[patch]e0e3fabf8e:
[patch]d3cad2622e:
[patch]0a4ccaafae:
[patch]3f28e6443c:
[major]1e826b2966:
Highlights
Breaking Changes:
See the upgrade guide for more details
[patch]f8d92ffc5e:
[patch]5e3ad7f751:
[patch]872b3b905a:
[patch]22ce87801e:
[patch]d13fad66df:
[patch]98e11001ff:
[patch]59d4ab031b:
[patch]1bcaa1b991:
[patch]90a14be594:
[major]9d5cc39394:
[minor]36929ef:
[patch]76a8f1c:
import '@atlaskit/button/dist/es5/components/ButtonGroup'
[patch]8f89287:
[major]6998f11:
import '@atlaskit/button/dist/cjs/components/ButtonGroup';
would need to be updated
to import '@atlaskit/button/dist/es5/components/ButtonGroup'
Updated dependencies bfac186:
autoFocus
to button, allowing button to be automatically focused on first render.
bf36eb6