Skip to content

Banner action loading state is broken (?) #3967

@ben-che

Description

@ben-che

Issue summary

The loading state in the banner primary action doesn't seem to be working. From the docs it seems to be a valid prop we can pass to the banner component. However, the spinner doesn't seem to appear.

Let me know if this is an issue, or if I just read the docs wrong or did something wrong on my end. I'll be happy to submit a PR if this is a bug!

Expected behavior

A spinner should appear when the loading prop in the banner is set to true.

Actual behavior

There's no spinner 😢

Steps to reproduce the problem

I made a fork from the sandbox you provide us in the Polaris docs, and I just add a loading: true value to the Banner's action prop: https://codesandbox.io/s/bold-keldysh-pcfq0?file=/App.js

Reduced test case

The best way to get your bug fixed is to provide a reduced test case. This CodeSandbox template is a great starting point.

Specifications

  • Are you using the React components? (Y/N): Yes
  • Polaris version number: 5.8
  • Browser: Chrome
  • Device: Macbook pro
  • Operating System: Catalina 10.15.7

Or run npx envinfo --system --binaries --browsers --npmPackages react,react-dom,@shopify/polaris to provide specifications on your environment including version numbers, browser, device, and operating system.

Paste the results here:

Metadata

Metadata

Assignees

Labels

BugSomething is broken and not working as intended in the system.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions