Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -129,22 +129,21 @@ exports[`AccessConsoles with preselected SerialConsole 1`] = `
<div
class="pf-c-empty-state__icon"
>
<span
<svg
aria-label="Contents"
aria-valuetext="Loading..."
class="pf-c-spinner pf-m-xl"
role="progressbar"
viewBox="0 0 100 100"
>
<span
class="pf-c-spinner__clipper"
/>
<span
class="pf-c-spinner__lead-ball"
<circle
class="pf-c-spinner__path"
cx="50"
cy="50"
fill="none"
r="45"
/>
<span
class="pf-c-spinner__tail-ball"
/>
</span>
</svg>
</div>
<div
class="pf-c-empty-state__body"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,22 +70,21 @@ exports[`SerialConsole in the LOADING state 1`] = `
<div
class="pf-c-empty-state__icon"
>
<span
<svg
aria-label="Contents"
aria-valuetext="Loading..."
class="pf-c-spinner pf-m-xl"
role="progressbar"
viewBox="0 0 100 100"
>
<span
class="pf-c-spinner__clipper"
/>
<span
class="pf-c-spinner__lead-ball"
/>
<span
class="pf-c-spinner__tail-ball"
/>
</span>
<circle
class="pf-c-spinner__path"
cx="50"
cy="50"
fill="none"
r="45"
/>
</svg>
</div>
<div
class="pf-c-empty-state__body"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,21 @@ exports[`placeholder render test 1`] = `
<div
class="pf-c-empty-state__icon"
>
<span
<svg
aria-label="Contents"
aria-valuetext="Loading..."
class="pf-c-spinner pf-m-xl"
role="progressbar"
viewBox="0 0 100 100"
>
<span
class="pf-c-spinner__clipper"
<circle
class="pf-c-spinner__path"
cx="50"
cy="50"
fill="none"
r="45"
/>
<span
class="pf-c-spinner__lead-ball"
/>
<span
class="pf-c-spinner__tail-ball"
/>
</span>
</svg>
</div>
<div
class="pf-c-empty-state__body"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Backdrop, Spinner, Bullseye } from '@patternfly/react-core';
export const BackdropSpinner: React.FunctionComponent = () => (
<Backdrop>
<Bullseye>
<Spinner aria-label="Backdrop content" aria-valueText="Loading..." />
<Spinner aria-label="Backdrop content" aria-valuetext="Loading..." />
</Bullseye>
</Backdrop>
);
Original file line number Diff line number Diff line change
Expand Up @@ -180,22 +180,21 @@ exports[`Button isLoading 1`] = `
<span
class="pf-c-button__progress"
>
<span
<svg
aria-label="Contents"
aria-valuetext="Loading"
class="pf-c-spinner pf-m-md"
role="progressbar"
viewBox="0 0 100 100"
>
<span
class="pf-c-spinner__clipper"
/>
<span
class="pf-c-spinner__lead-ball"
<circle
class="pf-c-spinner__path"
cx="50"
cy="50"
fill="none"
r="45"
/>
<span
class="pf-c-spinner__tail-ball"
/>
</span>
</svg>
</span>
Loading Button
</button>
Expand All @@ -216,22 +215,21 @@ exports[`Button isLoading icon only 1`] = `
<span
class="pf-c-button__progress"
>
<span
<svg
aria-label="Contents"
aria-valuetext="Loading"
class="pf-c-spinner pf-m-md"
role="progressbar"
viewBox="0 0 100 100"
>
<span
class="pf-c-spinner__clipper"
/>
<span
class="pf-c-spinner__lead-ball"
<circle
class="pf-c-spinner__path"
cx="50"
cy="50"
fill="none"
r="45"
/>
<span
class="pf-c-spinner__tail-ball"
/>
</span>
</svg>
</span>
<div>
ICON
Expand Down
2 changes: 1 addition & 1 deletion packages/react-core/src/components/Spinner/Spinner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const Spinner: React.FunctionComponent<SpinnerProps> = ({
className = '',
size = 'xl',
'aria-valuetext': ariaValueText = 'Loading...',
isSVG = false,
isSVG = true,
diameter,
'aria-label': ariaLabel,
'aria-labelledBy': ariaLabelledBy,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,9 @@ test('extra large spinner', () => {
const { asFragment } = render(<Spinner size="xl" />);
expect(asFragment()).toMatchSnapshot();
});

test('non-SVG spinner', () => {
const { asFragment } = render(<Spinner isSVG={false} />)

expect(asFragment()).toMatchSnapshot();
})
Original file line number Diff line number Diff line change
Expand Up @@ -2,68 +2,65 @@

exports[`extra large spinner 1`] = `
<DocumentFragment>
<span
<svg
aria-label="Contents"
aria-valuetext="Loading..."
class="pf-c-spinner pf-m-xl"
role="progressbar"
viewBox="0 0 100 100"
>
<span
class="pf-c-spinner__clipper"
<circle
class="pf-c-spinner__path"
cx="50"
cy="50"
fill="none"
r="45"
/>
<span
class="pf-c-spinner__lead-ball"
/>
<span
class="pf-c-spinner__tail-ball"
/>
</span>
</svg>
</DocumentFragment>
`;

exports[`large spinner 1`] = `
<DocumentFragment>
<span
<svg
aria-label="Contents"
aria-valuetext="Loading..."
class="pf-c-spinner pf-m-lg"
role="progressbar"
viewBox="0 0 100 100"
>
<span
class="pf-c-spinner__clipper"
<circle
class="pf-c-spinner__path"
cx="50"
cy="50"
fill="none"
r="45"
/>
<span
class="pf-c-spinner__lead-ball"
/>
<span
class="pf-c-spinner__tail-ball"
/>
</span>
</svg>
</DocumentFragment>
`;

exports[`medium spinner 1`] = `
<DocumentFragment>
<span
<svg
aria-label="Contents"
aria-valuetext="Loading..."
class="pf-c-spinner pf-m-md"
role="progressbar"
viewBox="0 0 100 100"
>
<span
class="pf-c-spinner__clipper"
/>
<span
class="pf-c-spinner__lead-ball"
<circle
class="pf-c-spinner__path"
cx="50"
cy="50"
fill="none"
r="45"
/>
<span
class="pf-c-spinner__tail-ball"
/>
</span>
</svg>
</DocumentFragment>
`;

exports[`simple spinner 1`] = `
exports[`non-SVG spinner 1`] = `
<DocumentFragment>
<span
aria-label="Contents"
Expand All @@ -84,23 +81,42 @@ exports[`simple spinner 1`] = `
</DocumentFragment>
`;

exports[`simple spinner 1`] = `
<DocumentFragment>
<svg
aria-label="Contents"
aria-valuetext="Loading..."
class="pf-c-spinner pf-m-xl"
role="progressbar"
viewBox="0 0 100 100"
>
<circle
class="pf-c-spinner__path"
cx="50"
cy="50"
fill="none"
r="45"
/>
</svg>
</DocumentFragment>
`;

exports[`small spinner 1`] = `
<DocumentFragment>
<span
<svg
aria-label="Contents"
aria-valuetext="Loading..."
class="pf-c-spinner pf-m-sm"
role="progressbar"
viewBox="0 0 100 100"
>
<span
class="pf-c-spinner__clipper"
<circle
class="pf-c-spinner__path"
cx="50"
cy="50"
fill="none"
r="45"
/>
<span
class="pf-c-spinner__lead-ball"
/>
<span
class="pf-c-spinner__tail-ball"
/>
</span>
</svg>
</DocumentFragment>
`;