Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why loading is always there on buttons and ActionIcon? #5795

Closed
1 of 2 tasks
akashbit opened this issue Feb 20, 2024 · 2 comments
Closed
1 of 2 tasks

Why loading is always there on buttons and ActionIcon? #5795

akashbit opened this issue Feb 20, 2024 · 2 comments
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)

Comments

@akashbit
Copy link

akashbit commented Feb 20, 2024

Dependencies check up

  • I have verified that I use latest version of all @mantine/* packages

What version of @mantine/* packages do you have in package.json?

7.5.3

What package has an issue?

@mantine/core

What framework do you use?

Vite

In which browsers you can reproduce the issue?

All

Describe the bug

Love your library, I think it's the most complete UI library that is there with minimum HTML that you have to write to achieve something. Also loved that you dropped emotion and css-in-jsx approach.

There are a few things that I am concerned about:

  1. If possible, see if something can be done about re-rendering of the components in a future version. Let's just take an example of Menu upon hovering change the entire menu re-renders. Although not sure how much you can fix that, it's the React zone, but still if somethings can be achieved with just css only.

  2. Seond thing I am not sure about is that why Button and ActionIcon are always rendered with Loader component, will it not be better if the loader component always renders after the loading is true. If your app has 20-30 icons and 10 buttons on a single page. All those unnecessary Loaders are all there just spinning. I can understand that it gives an animated look on those buttons and icons but at what cost.

I am dropping Material UI from my project and moving to Mantine. Just wanted to ask that you have nothing planned to shift to another system except css-modules in Mantine 8. 😄

If possible, include a link to a codesandbox with a minimal reproduction

No response

Possible fix

Possible fix for second point could be just having a loading state and renders <Loader .... /> only on loading state change.

Self-service

  • I would be willing to implement a fix for this issue
@petermanders89
Copy link

The loading icon is not only there. But it is also floating above the actual button. This can also be clicked. This is I think introduced in 7.5.0.

See example below. There are two buttons with an icon. The blue square is the selected loader with the devtools. Clicking on this, triggers the bottom action.
image

rtivital added a commit that referenced this issue Feb 26, 2024
@rtivital rtivital added the Fixed patch Completed issues that will be published with next patch (1.0.X) label Feb 26, 2024
@rtivital
Copy link
Member

Fixed in 7.6.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)
Projects
None yet
Development

No branches or pull requests

3 participants