Closed vbabich closed 1 month ago
I believe not having an overlay in this case was intentional - the scrim changes the colour unnecessarily of the panel if it hasn't loaded a widget yet. What ticket are we fixing here? This is for the error covering a dashboard?
This is for DH-16180 where I need a spinner with an overlay while the panel content is updating. I see that we do something like this in a couple of places:
<LoadingOverlay isLoading={showSpinner} isLoaded={!showSpinner} ... />
This displays the spinner without the overlay, then on the fade-out the black overlay is shown for a split second, so there's a bit of a flicker.
I guess the right usage should be just <LoadingOverlay isLoading={showSpinner} />
to show the spinner without the overlay, and <LoadingOverlay isLoaded isLoading={showSpinner} />
to show the spinner with the overlay. In that case, my change isn't needed.
For my use case, Don suggested adding a background-colored overlay immediately with no fade-in, and do a quick fade-out when loaded. I'm going to update the PR to parameterize background color, fade-in, and fade-out duration.
Still, I think flickering the overlay when we change isLoading
to false
and isLoaded
to true
isn't right.
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 46.63%. Comparing base (
a30341a
) to head (8c8de5e
). Report is 16 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Background class wasn't applied when LoadingOverlay has error or is loading