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(ShemaViewer): show loader correctly #2019

Merged
merged 2 commits into from
Mar 19, 2025
Merged

Conversation

artemmufazalov
Copy link
Member

@artemmufazalov artemmufazalov commented Mar 17, 2025

Closes #1288

CI Results

Test Status: ✅ PASSED

📊 Full Report

Total Passed Failed Flaky Skipped
264 263 0 0 1
Test Changes Summary ⏭️1

⏭️ Skipped Tests (1)

  1. Streaming query shows some results and banner when stop button is clicked (tenant/queryEditor/queryEditor.test.ts)

Bundle Size: ✅

Current: 83.22 MB | Main: 83.22 MB
Diff: +0.25 KB (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.

@artemmufazalov artemmufazalov marked this pull request as ready for review March 17, 2025 15:18
const viewSchemaRequestParams = isViewType(type) ? {path, database: tenantName} : skipToken;

const {data: viewColumnsData, isLoading: isViewSchemaLoading} =
const {currentData: viewColumnsData, isLoading: isViewSchemaLoading} =
Copy link
Collaborator

Choose a reason for hiding this comment

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

actually we can still use data - as it will update as soon as data fetched

Copy link
Member Author

Choose a reason for hiding this comment

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

It is not properly updated when you change objects in schema tree. So you have a chance to see data of a previous object until current object data is loaded

Copy link
Member Author

Choose a reason for hiding this comment

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

You can try it here - change schema object from my_view3 to my_view2 with slowed internet

https://nda.ya.ru/t/rgNzLIaw7CqxSx

Copy link
Collaborator

@astandrik astandrik Mar 18, 2025

Choose a reason for hiding this comment

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

I mean we have

    if (loading || isViewSchemaLoading) {
        return <TableSkeleton />;
    }

I would expect that until data is fully loaded/fetched we would see skeleton?

astandrik
astandrik previously approved these changes Mar 18, 2025
Comment on lines +54 to +56
const loading =
(isViewSchemaFetching && viewColumnsData === undefined) ||
(isTableSchemaFetching && tableSchemaData === undefined);
Copy link
Member Author

Choose a reason for hiding this comment

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

isLoading isn't set to true when path changes, so we don't see loader on schema object change

@artemmufazalov artemmufazalov added this pull request to the merge queue Mar 19, 2025
Merged via the queue into main with commit 29ae340 Mar 19, 2025
7 checks passed
@artemmufazalov artemmufazalov deleted the 1288-schema-loader branch March 19, 2025 15:47
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.

Add missing loader on Schema tab
2 participants