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

feat(admin-ui): Loader component (CircularProgress) #4508

Open
wants to merge 12 commits into
base: feat/new-admin-ui
Choose a base branch
from

Conversation

leopuleo
Copy link
Contributor

Changes

With this PR we are refactoring the Loader component - previously known as CircularProgress and applying some fixes to Autocomplete and MultiAutocomplete.

Loader

This component, previously known as CircularProgress, has been refactored to receive a controlled value (number) or the indeterminate flag (boolean).

If set to indeterminate (default: true), the component will show a spinning circular progress bar.

Otherwise, the component can accept the controlled value, along with min and max. In this case, the Loader will display the current state while loading.

The component has been styled following the design specifications provided by K.

OverlayLoader

This component is a variant of Loader designed to overlay content, making it ideal for scenarios where we need to indicate that the entire page or a specific section is loading.

It serves as the equivalent of the CircularProgress component from the old UI package.

Autocomplete and MultiAutocomplete

These two components has been improved:

  • displaying the loading status using the Loader component within the input
  • introducing a new prop called initialMessage, which is utilized when the AutoComplete options list is empty and the user has not yet performed a search for an option.
  • removing is prefix to boolean props (isLoading -> loading)
  • improving the selected options state management for MultiAutocomplete
  • handling the icon size by referring to the current input size.

How Has This Been Tested?

Manually + Jest

@leopuleo leopuleo requested a review from adrians5j January 27, 2025 18:13
@leopuleo leopuleo self-assigned this Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants