Skip to content

[Feature Request] Reduce height of spinners to match input elements #869

Closed
@orenbenkiki

Description

@orenbenkiki

Problem:

Wrapping a Dropdown in a Loading causes visually jarring page re-layouts:

  • Wrap a Dropdown in a Loading - that is, the list of options is fetched from some slow data source, where this data source is specified by some user input.

  • When the use specifies a new data source, the Dropdown element is temporarily replaced by a CSS spinner. This spinner is taller than the Dropdown, so everything below the Dropdown is moved a few pixels downward. This is visually jarring.

  • When the list of options arrives, the spinner is replaced back by the original Dropdown, which is less tall than the spinner, so everything below the Dropdown is moved a few pixels up. This again is visually jarring.

Solution:

Reduce the height of the spinner to exactly match the height of the input elements (dropdown, button, text, etc.). All these elements have the same height, which is quite sufficient for displaying the spinner (the extra height seems to be just padding - this may depend on the spinner type though).

Alternatives:

It might be possible to override the height of the spinner using CSS but it isn't clear which class name to use, and whether this name is guaranteed to work in future versions.

Edit: Perhaps just document the CSS structure of the spinners so controlling their size would be guaranteed to be stable?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions