mirror of
https://github.com/supabase/supabase.git
synced 2026-06-15 08:05:21 +08:00
This PR migrates the whole monorepo to use Tailwind v4: - Removed `@tailwindcss/container-queries` plugin since it's included by default in v4, - Bump all instances of Tailwind to v4. Made minimal changes to the shared config to remove non-supported features (`alpha` mentions), - Migrate all apps to be compatible with v4 configs, - Fix the `typography.css` import in 3 apps, - Add missing rules which were included by default in v3, - Run `pnpm dlx @tailwindcss/upgrade` on all apps, which renames a lot of classes - Rename all misnamed classes according to https://tailwindcss.com/docs/upgrade-guide#renamed-utilities in all apps. --------- Co-authored-by: Jordi Enric <jordi.err@gmail.com>
60 lines
2.0 KiB
TypeScript
60 lines
2.0 KiB
TypeScript
import { lintInfoMap } from '../Linter/Linter.utils'
|
|
import { LintException } from '@/data/lint/lint-rules-query'
|
|
import { Member } from '@/data/organizations/organization-members-query'
|
|
|
|
export const generateRuleText = (e: LintException, member?: Member) => {
|
|
const lintName = lintInfoMap.find((x) => x.name === e.lint_name)?.title
|
|
|
|
if (e.is_disabled) {
|
|
return `Ignore "${lintName}" for ${!e.assigned_to ? 'all project members' : `${member?.username ?? member?.primary_email}`}`
|
|
} else {
|
|
return `"${lintName}" is only visible to ${member?.username} `
|
|
}
|
|
}
|
|
|
|
export const generateRuleDescription = ({
|
|
name,
|
|
member,
|
|
disabled,
|
|
}: {
|
|
name?: string
|
|
member?: Member
|
|
disabled: boolean
|
|
}) => {
|
|
const lint = lintInfoMap.find((x) => x.name === name)
|
|
return (
|
|
<>
|
|
<p className="font-mono uppercase text-xs text-foreground-lighter">What this rule means:</p>
|
|
<p className="mb-0!">
|
|
The "{lint?.title}" lint will be{' '}
|
|
{disabled
|
|
? `ignored for ${!!member ? `this user only` : 'this project'}`
|
|
: `visible to ${!!member ? `this user only` : ''}`}
|
|
</p>
|
|
<p className="text-foreground-light">
|
|
{!!member ? (
|
|
disabled ? (
|
|
<>
|
|
Only {member.username ?? member.primary_email} will no longer see this lint in the{' '}
|
|
<span className="capitalize">{lint?.category}</span> Advisor, the lint will still be
|
|
visible to all other project members
|
|
</>
|
|
) : (
|
|
<>
|
|
Only {member.username ?? member.primary_email} will see this lint in the{' '}
|
|
<span className="capitalize">{lint?.category}</span> Advisor, the lint will no longer
|
|
be visible to all other project members
|
|
</>
|
|
)
|
|
) : (
|
|
<>
|
|
All project members will no longer see this lint in the{' '}
|
|
<span className="capitalize">{lint?.category}</span> Advisor, nor receive notifications
|
|
via emails about this lint
|
|
</>
|
|
)}
|
|
</p>
|
|
</>
|
|
)
|
|
}
|