-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show a warning indicator for Tables with unsupported data types (#4462)
* Show a warning indicator for a Table with unsupported data types * Move tooltip to the right * Fix test: move tooltip so it doesn't hide the context button * Move tooltip * Add list of affected columns
- Loading branch information
1 parent
3ccf87a
commit 8eed9c4
Showing
4 changed files
with
72 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
web-common/src/features/tables/UnsupportedTypesIndicator.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<script lang="ts"> | ||
import WarningIcon from "../../components/icons/WarningIcon.svelte"; | ||
import Tooltip from "../../components/tooltip/Tooltip.svelte"; | ||
import TooltipContent from "../../components/tooltip/TooltipContent.svelte"; | ||
import { createQueryServiceTableColumns } from "../../runtime-client"; | ||
export let instanceId: string; | ||
export let connector: string; | ||
export let tableName: string; | ||
$: tableColumns = createQueryServiceTableColumns(instanceId, tableName, { | ||
connector: connector, | ||
}); | ||
$: unsupportedColumnsMap = $tableColumns.data?.unsupportedColumns; | ||
$: unsupportedColumns = unsupportedColumnsMap | ||
? Object.entries(unsupportedColumnsMap).map(([column, type]) => ({ | ||
column, | ||
type, | ||
})) | ||
: []; | ||
</script> | ||
|
||
<Tooltip distance={8} alignment="start"> | ||
<WarningIcon /> | ||
<TooltipContent slot="tooltip-content"> | ||
This table contains columns with unsupported data types: | ||
|
||
<ul class="list-disc pl-4 mt-1"> | ||
{#each unsupportedColumns as { column, type } (column)} | ||
<li>{column}: {type}</li> | ||
{/each} | ||
</ul> | ||
</TooltipContent> | ||
</Tooltip> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8eed9c4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Published on https://ui.rilldata.in as production
🚀 Deployed on https://660693b4b87aa3d1c04346bc--rill-ui-dev.netlify.app