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

fix: fix columns width on long rowset #1384

Merged
merged 9 commits into from
Oct 2, 2024

Conversation

astandrik
Copy link
Contributor

@astandrik astandrik commented Oct 1, 2024

Closes #1340
Closes #1386
Closes #1387

Stand

CI Results

Test Status: ⚠️ FLAKY

📊 Full Report

Total Passed Failed Flaky Skipped
124 123 0 1 0

Bundle Size: ✅

Current: 79.13 MB | Main: 79.13 MB
Diff: +0.00 MB (0.00%)

✅ Bundle size unchanged.

ℹ️ CI Information
  • Test recordings for failed tests are available in the full report.
  • Bundle size is measured for the entire 'dist' directory.
  • 📊 indicates links to detailed reports.
  • 🔺 indicates increase, 🔽 decrease, and ✅ no change in bundle size.

@astandrik
Copy link
Contributor Author

Had a discussion with @adameat to analyze first 100 rows in order to calculate predicted width

@astandrik astandrik marked this pull request as draft October 2, 2024 09:03
@astandrik astandrik force-pushed the astandrik.fix-columns-width-on-long-rowset-1340 branch from 4a123ee to 81874d6 Compare October 2, 2024 10:24
@astandrik astandrik marked this pull request as ready for review October 2, 2024 10:35
columnType?: string;
}) => {
let maxColumnContentLength = name.length;
const headerPadding = columnType === 'number' ? 40 : 20;
Copy link
Member

Choose a reason for hiding this comment

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

What is headerPadding? Why it's different for numbers and other types?

}
}

return Math.min(maxColumnContentLength * 10 + HEADER_PADDING, MAX_COLUMN_WIDTH);
Copy link
Contributor

Choose a reason for hiding this comment

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

@astandrik astandrik added this pull request to the merge queue Oct 2, 2024
Merged via the queue into main with commit f30a38f Oct 2, 2024
6 checks passed
@astandrik astandrik deleted the astandrik.fix-columns-width-on-long-rowset-1340 branch October 2, 2024 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants