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

Alerting: Avoid alert list view component being unmounted every time we fetch new data #77631

Merged
merged 3 commits into from
Nov 6, 2023

Conversation

soniaAguilarPeiron
Copy link
Member

@soniaAguilarPeiron soniaAguilarPeiron commented Nov 3, 2023

What is this feature?

This PR avoids alert list view being unmounted and mounted every time we got new data when fetching rules.
This resolves the issue of the list flickering whenever new data is retrieved (when panel data is refreshed).
Additionally, it relocates the loading indicator below the list to eliminate any further flickering between the list and the loading indicator.

Why do we need this feature?

Panel should not twitch every time panel data is refreshed.

Who is this feature for?

All users.

Which issue(s) does this PR fix?:

Fixes #74971

Special notes for your reviewer:

Before the change:

before-alert-panel-loading.mp4

After the change:

after-alert-panel-loading.mp4

When loading data for the first time:

panelloading.mp4

Please check that:

  • It works as expected from a user's perspective.
  • If this is a pre-GA feature, it is behind a feature toggle.
  • The docs are updated, and if this is a notable improvement, it's added to our What's New doc.

@soniaAguilarPeiron soniaAguilarPeiron added this to the 10.3.x milestone Nov 3, 2023
@soniaAguilarPeiron soniaAguilarPeiron self-assigned this Nov 3, 2023
@soniaAguilarPeiron soniaAguilarPeiron requested a review from a team as a code owner November 3, 2023 15:07
@soniaAguilarPeiron soniaAguilarPeiron requested review from gillesdemey, VikaCep and konrad147 and removed request for a team November 3, 2023 15:07
Copy link
Member

@gillesdemey gillesdemey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes LGTM, no more flickering!

@soniaAguilarPeiron soniaAguilarPeiron merged commit f88a0f3 into main Nov 6, 2023
15 checks passed
@soniaAguilarPeiron soniaAguilarPeiron deleted the alerting/fix-alertlist-twitching branch November 6, 2023 07:35
zserge pushed a commit that referenced this pull request Nov 9, 2023
…we fetch new data (#77631)

* Avoid view component being unmounted any time we fetch new data

* Render loading indicator only when loading data for the first time

* Remove unnecessary useRef
@aangelisc aangelisc modified the milestones: 10.3.x, 10.2.3 Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Alert list twitching when the list is empty
3 participants