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

Table: Fixes table panel gauge alignment #64994

Merged
merged 3 commits into from
Mar 22, 2023
Merged

Conversation

torkelo
Copy link
Member

@torkelo torkelo commented Mar 18, 2023

Fixes #40925

This is a pretty tricky problem to solve without impacting table panel performance, but I think I found a pretty good compromise that should not impact performance much. it does not solve the problem completely, it can still happen but should be much more uncommon to occur.

Before:
Screenshot from 2023-03-18 15-27-47

After:
Screenshot from 2023-03-18 15-37-45

@torkelo torkelo requested a review from joshhunt as a code owner March 18, 2023 14:39
@torkelo torkelo requested a review from a team March 18, 2023 14:39
@torkelo torkelo requested review from a team as code owners March 18, 2023 14:39
@torkelo torkelo requested review from oscarkilhed, baldm0mma, ashharrison90 and andresmgot and removed request for a team March 18, 2023 14:39
@torkelo torkelo requested review from codeincarnate and mdvictor and removed request for joshhunt, baldm0mma, ashharrison90 and andresmgot March 18, 2023 14:39
@torkelo torkelo added this to the 9.5.0 milestone Mar 18, 2023
@torkelo torkelo added add to changelog no-backport Skip backport of PR no-changelog Skip including change in changelog/release notes labels Mar 18, 2023
@torkelo torkelo changed the title Table: Fixes table panel gauge alignment issues Table: Fixes table panel gauge alignment Mar 18, 2023
@github-advanced-security
Copy link

You have successfully added a new CodeQL configuration .github/workflows/pr-codeql-analysis-javascript.yml:analyze. As part of the setup process, we have scanned this repository and found 29 existing alerts. Please check the repository Security tab to see all alerts.

// look at the next 100 rows
alignmentFactor = { ...displayValue };

for (let i = rowIndex + 1; i < field.values.length; i++) {
Copy link
Member

Choose a reason for hiding this comment

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

While the comment says to look at the next 100 rows it doesn't. It looks for the whole length. I tried this out with a data that is 200.000 long and I didn't notice performance degradation so maybe we can leave it as it is?

Copy link
Member Author

Choose a reason for hiding this comment

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

@zoltanbedi good catch, will fix it.

Copy link
Member Author

Choose a reason for hiding this comment

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

@zoltanbedi fixed

@torkelo torkelo requested a review from zoltanbedi March 22, 2023 15:21
Copy link
Member

@zoltanbedi zoltanbedi left a comment

Choose a reason for hiding this comment

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

Awesome lgtm!

}
return alignmentFactor;
} else {
// look at the next 100 rows
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// look at the next 100 rows
// look at the next 1000 rows

@torkelo torkelo merged commit a3de3c9 into main Mar 22, 2023
@torkelo torkelo deleted the fix-table-guage-alignment branch March 22, 2023 16:08
gotjosh pushed a commit that referenced this pull request Mar 27, 2023
* Table: Fixes tables guage alignment issues

* Removed console.log

* Fixing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add to changelog area/frontend no-backport Skip backport of PR no-changelog Skip including change in changelog/release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Table panel: Gauges do not perfectly align with values of different lengths
4 participants