Skip to content

Commit a462c8b

Browse files
committed
Merge branch 'main' into layout-rebuild-batch-3
2 parents 34a5c2c + 30cdd2e commit a462c8b

File tree

7 files changed

+939
-894
lines changed

7 files changed

+939
-894
lines changed

.changeset/mean-bananas-drum.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@shopify/polaris': patch
3+
---
4+
5+
Updated `IndexTable` and `ProgressBar` to no longer log errors about deprecated `React.findDOMNode`

.changeset/sixty-squids-promise.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@shopify/polaris': minor
3+
---
4+
5+
Updated `Box` allowable aria roles

polaris-react/src/components/Box/Box.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,10 @@ export interface BoxProps extends React.AriaAttributes {
151151
*/
152152
paddingInlineEnd?: Spacing;
153153
/** Aria role */
154-
role?: Extract<React.AriaRole, 'status' | 'presentation' | 'menu'>;
154+
role?: Extract<
155+
React.AriaRole,
156+
'status' | 'presentation' | 'menu' | 'listbox' | 'combobox'
157+
>;
155158
/** Shadow on box */
156159
shadow?: DepthShadowAlias;
157160
/** Set tab order */

polaris-react/src/components/IndexTable/IndexTable.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ function IndexTableBase({
148148
const scrollableContainerElement = useRef<HTMLDivElement>(null);
149149
const tableElement = useRef<HTMLTableElement>(null);
150150
const condensedListElement = useRef<HTMLUListElement>(null);
151+
const loadingElement = useRef<HTMLDivElement>(null);
151152

152153
const [tableInitialized, setTableInitialized] = useState(false);
153154
const [stickyWrapper, setStickyWrapper] = useState<HTMLElement | null>(null);
@@ -512,10 +513,11 @@ function IndexTableBase({
512513
in={loading}
513514
classNames={loadingTransitionClassNames}
514515
timeout={parseInt(motion['duration-100'], 10)}
516+
nodeRef={loadingElement}
515517
appear
516518
unmountOnExit
517519
>
518-
<div className={styles.LoadingPanel}>
520+
<div className={styles.LoadingPanel} ref={loadingElement}>
519521
<div className={styles.LoadingPanelRow}>
520522
<Spinner size="small" />
521523
<span className={styles.LoadingPanelText}>

polaris-react/src/components/Modal/components/Dialog/Dialog.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import {TrapFocus} from '../../../TrapFocus';
1010

1111
import styles from './Dialog.scss';
1212

13+
type CSSTransitionProps = React.ComponentProps<typeof CSSTransition>;
14+
1315
export interface DialogProps {
1416
labelledBy?: string;
1517
instant?: boolean;
@@ -117,7 +119,7 @@ const fadeUpClasses = {
117119
exitActive: classNames(styles.animateFadeUp, styles.exited),
118120
};
119121

120-
function FadeUp({children, ...props}: any) {
122+
function FadeUp({children, ...props}: CSSTransitionProps) {
121123
return (
122124
<CSSTransition {...props} classNames={fadeUpClasses}>
123125
{children}

polaris-react/src/components/ProgressBar/ProgressBar.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
import React, {useRef} from 'react';
22
import {CSSTransition} from 'react-transition-group';
33
import {motion} from '@shopify/polaris-tokens';
44

@@ -45,6 +45,7 @@ export function ProgressBar({
4545
ariaLabelledBy,
4646
}: ProgressBarProps) {
4747
const i18n = useI18n();
48+
const indicatorRef = useRef<HTMLDivElement>(null);
4849

4950
const className = classNames(
5051
styles.ProgressBar,
@@ -78,12 +79,14 @@ export function ProgressBar({
7879
in
7980
appear
8081
timeout={parseInt(progressBarDuration, 10)}
82+
nodeRef={indicatorRef}
8183
classNames={{
8284
appearActive: styles.IndicatorAppearActive,
8385
appearDone: styles.IndicatorAppearDone,
8486
}}
8587
>
8688
<div
89+
ref={indicatorRef}
8790
className={styles.Indicator}
8891
style={
8992
{

0 commit comments

Comments
 (0)