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

chore(ui): alternative table extras show current table name instead of database #259

Merged
merged 1 commit into from
May 28, 2024

Conversation

duyet
Copy link
Owner

@duyet duyet commented May 28, 2024

No description provided.

Copy link

vercel bot commented May 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
clickhouse-monitoring 🔄 Building (Inspect) Visit Preview 💬 Add feedback May 28, 2024 8:04am

@duyet duyet merged commit 8ab132f into main May 28, 2024
11 of 13 checks passed
@duyet duyet deleted the chore/ui branch May 28, 2024 08:04
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @duyet - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 3 issues found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

@@ -41,7 +41,7 @@ export async function AlternativeTables({
className="group flex flex-row gap-2 text-muted-foreground"
>
<CardStackMinusIcon className="size-3" />
{database}
{table}
Copy link
Contributor

Choose a reason for hiding this comment

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

question: Potential variable name confusion

The change from {database} to {table} might be intentional, but it could lead to confusion if the context is not clear. Ensure that this change aligns with the intended logic and that the variable names are consistent and descriptive.

Comment on lines +1 to +2
import { ErrorAlert } from '@/components/error-alert'
import { SingleLineSkeleton, TableSkeleton } from '@/components/skeleton'
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion (performance): Consider lazy loading components

For performance optimization, consider lazy loading the components if they are not immediately needed. This can help reduce the initial load time of the page.

Suggested change
import { ErrorAlert } from '@/components/error-alert'
import { SingleLineSkeleton, TableSkeleton } from '@/components/skeleton'
import dynamic from 'next/dynamic'
const ErrorAlert = dynamic(() => import('@/components/error-alert'))
const SingleLineSkeleton = dynamic(() => import('@/components/skeleton').then(mod => mod.SingleLineSkeleton))
const TableSkeleton = dynamic(() => import('@/components/skeleton').then(mod => mod.TableSkeleton))

<>
<TableSkeleton />
<TableSkeleton cols={5} />
<ErrorAlert message="Error message" query="SELECT 1" />
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: Hardcoded error message and query

Consider making the error message and query dynamic or configurable. Hardcoding these values can limit the reusability and flexibility of the ErrorAlert component.

Suggested change
<ErrorAlert message="Error message" query="SELECT 1" />
const errorMessage = "Error message";
const errorQuery = "SELECT 1";
<ErrorAlert message={errorMessage} query={errorQuery} />

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.

1 participant