mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 09:55:06 +03:00
## Problem six apps had no shared lint checks for invalid tailwind classes, off-scale values, and raw colors. ## Solution add @shadcn/lint warnings with narrow exceptions for existing theme colors and artwork. fix several invalid classes. the existing lint command reports findings without blocking prs on the current warning count. ## Review instructions 1. check the shared rules and app-specific exceptions. 2. run `pnpm --filter design-system lint` and confirm it reports shadcn warnings without errors. ## Checklist Check all before review: - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [x] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which references [WORD_LIST](https://github.com/supabase/supabase/blob/master/apps/docs/WORD_LIST.md) and the docs [CONTRIBUTING](https://github.com/supabase/supabase/blob/master/apps/docs/CONTRIBUTING.md) guide <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved vertical alignment of checkbox labels and supporting text in dialogs, settings, and examples. * Corrected alignment of organization member details and the color styling of deprecated chart text. * Standardized spacing in the date and time editor without changing its appearance or behavior. * **Developer Experience** * Updated linting and UI configuration across several apps to support consistent style checks. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
59 lines
1.7 KiB
TypeScript
59 lines
1.7 KiB
TypeScript
import { useParams } from 'common'
|
|
import { ReactNode } from 'react'
|
|
|
|
import { ReportBlockContainer } from './ReportBlockContainer'
|
|
import { InlineLink } from '@/components/ui/InlineLink'
|
|
import { METRICS } from '@/lib/constants/metrics'
|
|
|
|
interface DeprecatedChartBlockProps {
|
|
label: string
|
|
attribute: string
|
|
actions?: ReactNode
|
|
}
|
|
|
|
export const DeprecatedChartBlock = ({ label, attribute, actions }: DeprecatedChartBlockProps) => {
|
|
const { ref } = useParams()
|
|
const metric = METRICS.find((x) => x.key === attribute)
|
|
|
|
const logsName = metric?.category?.label
|
|
|
|
const getLogsUrl = (logsName?: string) => {
|
|
switch (logsName) {
|
|
case 'Database API':
|
|
return '/logs/postgrest-logs'
|
|
case 'All API usage':
|
|
return '/logs/explorer'
|
|
case 'Realtime':
|
|
return '/logs/realtime-logs'
|
|
case 'Storage':
|
|
return '/logs/storage-logs'
|
|
case 'Authentication':
|
|
return '/logs/auth-logs'
|
|
default:
|
|
return ''
|
|
}
|
|
}
|
|
|
|
return (
|
|
<ReportBlockContainer
|
|
draggable
|
|
showDragHandle
|
|
loading={false}
|
|
icon={metric?.category?.icon('text-foreground-muted')}
|
|
label={label}
|
|
actions={actions}
|
|
>
|
|
<div className="flex flex-col justify-center flex-1">
|
|
<p className="text-xs text-foreground-lighter">
|
|
This chart is not longer available, and can be removed from your report
|
|
</p>
|
|
<p className="text-xs text-foreground-lighter">
|
|
You may view the equivalent of this data from the{' '}
|
|
<InlineLink href={`/project/${ref}/${getLogsUrl(logsName)}`}>{logsName} Logs</InlineLink>{' '}
|
|
instead
|
|
</p>
|
|
</div>
|
|
</ReportBlockContainer>
|
|
)
|
|
}
|