Skip to content

Conversation

@dgdavid
Copy link
Contributor

@dgdavid dgdavid commented Apr 9, 2025

Problem

The interface experiences flickering when transitioning between loading states or from one substep to another within a progress stepper. This causes a noticeable "dancing" effect, disrupting the user experience.

Solution

To mitigate the flickering effect, improvements have been made to the involved components, bearing in mind that more significant updates or a full redesign may be necessary in the future.

In brief, the ProgressStepper now has a fixed full width and also sets a fixed height for its steps, reducing layout shifts. The loading indicator has been centered more effectively, and the default text has been removed to minimize the perception of movement. This change addresses the issue of three distinct loading states in the application, triggered at different stages (without layout, with layout but no header/sidebar, and within a layout that includes both the header and possibly a sidebar, depending on the available width).

Additionally, removing the default text helps prevent its misuse. For example, the text "Loading installation environment" was displayed even after the environment was set up and the application was actually waiting for installation settings.

Testing

  • Updated affected and existing unit tests.
  • Tested manually.

Screenshots

N/A

It is better to test manually to see changes in action.

Documentation

N/A


Related to https://trello.com/c/nvTb8WwM (private link) and https://bugzilla.suse.com/show_bug.cgi?id=1239622 (private link)
Fixes #2240

dgdavid added 6 commits April 8, 2025 22:54
Simplified the layout to ensure that, from "md" screen sizes onwards,
the container fills the full width and the step occupies 33% of the
available height.

While the approach for displaying progress is not yet perfect, these
changes help minimize layout shifts and reduce the movement of elements
when steppers are re-rendered with different information.
To help mitigating the "jumping" behavior when transitioning from a
loading state in a container with a short height to one with a larger
height.
And rename the prop from `useLayout` to `listenQuestions` to more
accurately describe its purpose and to avoid the "use" prefix, which
should be reserved for hooks.
This commit introduces a new variant for the Loading component, allowing
it to be used without occupying the full screen or available space. This
should help reduce the sensation of loading messages jumping when
transitioning from a general loader to a more specific one, especially
when the latter is placed inside its container.

Additionally, the "full screen" variant has been re-centered,
effectively reverting commit 0160427. However, this time, it
uses Flexbox with specific styling rather than relying on the Bullseye
component.
The component now expects explicit text to be provided each time it is
mounted, or no text will be shown by default. This helps avoid the
potential misuse of default text and ensures something really generic
when the text props is not given.
And adjusts its tests a little bit.
@dgdavid dgdavid changed the title Fix dancing progress fix(web): mitigate flickering at progress and loaders Apr 9, 2025
@dgdavid dgdavid marked this pull request as ready for review April 9, 2025 12:33
@joseivanlopez
Copy link
Contributor

Approved, but there is a conflict ;-)

@dgdavid
Copy link
Contributor Author

dgdavid commented Apr 10, 2025

Approved, but there is a conflict ;-)

Ah, I see. You were faster 😜

Conflict fixed. Let me know if I can merge it now.

@dgdavid dgdavid merged commit 37803bd into master Apr 10, 2025
15 checks passed
@dgdavid dgdavid deleted the fix-dancing-progress branch April 10, 2025 07:56
@imobachgs imobachgs mentioned this pull request Apr 22, 2025
imobachgs added a commit that referenced this pull request Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dancing components in the screen

3 participants