Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: instance form and other ui update (#21526)

ecmadao1517bc4ce4d9
diff --git a/docs/agents/frontend-ux.md b/docs/agents/frontend-ux.md
index b0b309ac3e..7977e392c7 100644
--- a/docs/agents/frontend-ux.md
+++ b/docs/agents/frontend-ux.md
@@ -138,8 +138,9 @@ Use semantic utilities backed by CSS custom properties:
### Borders, Corners, Focus, And Layers
-- Use `rounded-xs` for compact controls, `rounded-sm` for ordinary framed
- surfaces, and `rounded-full` only for circular controls, avatars, and pills.
+- Use `rounded-xs` for compact controls and textual labels, including status
+ badges, tags, and selected tokens. Use `rounded-sm` for ordinary framed
+ surfaces, and `rounded-full` only for circular controls and avatars.
- Use `border-control-border` for controls and `border-block-border` for region
boundaries.
- Interactive elements MUST have a visible keyboard focus state. Prefer the
@@ -238,11 +239,16 @@ third column for section titles.
- Stack labels based on available form width, independently of the navigation
sidebar breakpoint. Compound controls MAY wrap within the control column
before the field itself stacks.
-- Keep concise descriptions and validation beside the control they explain.
- Long secondary guidance that would make a dense form harder to scan MAY use
- a focusable info tooltip beside the field title; validation and essential
- status remain visible beside the control. Associate labels and choice controls
- with accessible names in both layouts.
+- Decide responsive breakpoints once at the form root. A dependent
+ configuration group inside a field's control area MUST inherit the parent
+ field's resolved layout instead of measuring its own container or
+ introducing another label column. Render it as a vertical group within its
+ fieldset boundary, with compact label typography.
+- Keep concise operational descriptions directly below the field title.
+ Longer secondary guidance that would make a dense form harder to
+ scan MAY use a focusable info tooltip beside the field title; validation and
+ essential status remain visible beside the control. Associate labels and
+ choice controls with accessible names in both layouts.
- Put choices that determine subsequent fields first. Use one `Select` dropdown
combining authentication methods and password sources. Do not add a separate
password-source selector. Use a `Switch` for binary choices such as syncing
@@ -251,7 +257,8 @@ third column for section titles.
External sources reveal their configuration there. Preserve separate drafts
while switching sources, and submit only the active source. Reveal dependent
TLS, SSH, IAM, and external-source configuration below its controlling
- choice, using nested flow rather than a framed surface inside another frame.
+ choice, using nested flow and at most one fieldset boundary rather than a
+ framed surface inside another frame.
- Keep security modes visible; reveal their dependent fields when selected.
Switches, select triggers, and radio groups align to the start of their
control column. Keep ordinary connection rows on the 16px rhythm using
diff --git a/frontend/scripts/check-ui-guideline.mjs b/frontend/scripts/check-ui-guideline.mjs
index 8d5a48186b..7bd58d071a 100644
--- a/frontend/scripts/check-ui-guideline.mjs
+++ b/frontend/scripts/check-ui-guideline.mjs
@@ -239,6 +239,23 @@ const scanButtonDimensions = (node, path, counts) => {
}
};
+const scanTextPill = (node, path, counts) => {
+ const tagName = getTagName(node.tagName);
+ if (tagName !== "Badge" && tagName !== "span") return;
+ const tokens = attributeTokens(node, new Set(["className"])).map(
+ tailwindUtility
+ );
+ if (
+ tokens.includes("rounded-full") &&
+ tokens.some((token) => /^(?:px|py)-/.test(token)) &&
+ tokens.some((token) => /^text-(?:xs|sm)$/.test(token)) &&
+ (tagName === "Badge" ||
+ tokens.some((token) => /^(?:bg|border)(?:-|$)/.test(token)))
+ ) {
+ addViolation(counts, path, "no-text-pill", "rounded-full");
+ }
+};
+
const scanLiteralColor = (node, path, counts) => {
if (!ts.isPropertyAssignment(node)) return;
const propertyName = ts.isIdentifier(node.name) || ts.isStringLiteral(node.name)
@@ -310,6 +327,7 @@ export function scanSource(source, path) {
}
scanSheetWidth(node, path, counts);
scanButtonDimensions(node, path, counts);
+ scanTextPill(node, path, counts);
}
scanLiteralColor(node, path, counts);
scanInlineRadius(node, path, counts);
diff --git a/frontend/src/apps/explain-visualizer/QueryPlanDiagram.tsx b/frontend/src/apps/explain-visualizer/QueryPlanDiagram.tsx
index bd193aee92..839f6661cb 100644
--- a/frontend/src/apps/explain-visualizer/QueryPlanDiagram.tsx
+++ b/frontend/src/apps/explain-visualizer/QueryPlanDiagram.tsx
@@ -189,7 +189,7 @@ function PlanCollapseToggle({
onClick={onToggle}
// Half of the control hangs below the card so it reads as the seam the
// subtree folds into, rather than as part of the card's own content.
- className="absolute -bottom-3 left-1/2 -translate-x-1/2 rounded-full bg-background px-1.5"
+ className="absolute -bottom-3 left-1/2 -translate-x-1/2 rounded-xs bg-background px-1.5"
>
{collapsed ? (
<ChevronsUpDown aria-hidden="true" className="size-3" />
diff --git a/frontend/src/components/EnvironmentLabel.test.tsx b/frontend/src/components/EnvironmentLabel.test.tsx
index 3b4164d47c..eabd0e4065 100644
--- a/frontend/src/components/EnvironmentLabel.test.tsx
+++ b/frontend/src/components/EnvironmentLabel.test.tsx
@@ -101,6 +101,21 @@ describe("EnvironmentBadge", () => {
expect(badge?.style.color).toBe("rgb(129, 140, 248)");
});
+ test("uses the shared compact label geometry", async () => {
+ const rendered = await render(
+ <EnvironmentBadge
+ environment={environment}
+ hasEnvTierFeature={false}
+ />
+ );
+ root = rendered.root;
+
+ const badge = rendered.container.querySelector("span");
+ expect(badge?.className).toContain("py-0.5");
+ expect(badge?.className).toContain("text-xs");
+ expect(badge?.className).toContain("font-medium");
+ });
+
test("highlights the environment title", async () => {
const rendered = await render(
<EnvironmentBadge
diff --git a/frontend/src/components/EnvironmentLabel.tsx b/frontend/src/components/EnvironmentLabel.tsx
index 48faa74a29..713a3595ac 100644
--- a/frontend/src/components/EnvironmentLabel.tsx
+++ b/frontend/src/components/EnvironmentLabel.tsx
@@ -3,6 +3,7 @@ import { memo } from "react";
import { useTranslation } from "react-i18next";
import { HighlightLabelText } from "@/components/HighlightLabelText";
import { RouterLink } from "@/components/RouterLink";
+import { Badge } from "@/components/ui/badge";
import { useEnvironment, usePlanFeature } from "@/hooks/useAppState";
import { cn } from "@/lib/utils";
import type { Environment } from "@/types";
@@ -68,11 +69,8 @@ export const EnvironmentBadge = memo(function EnvironmentBadge({
: undefined;
const badge = (
- <span
- className={cn(
- "inline-flex items-center gap-x-1 px-1.5 rounded-xs truncate",
- className
- )}
+ <Badge
+ className={cn("min-w-0 truncate", isUnset && "bg-transparent", className)}
style={badgeStyle}
>
<span className="truncate">
@@ -87,7 +85,7 @@ export const EnvironmentBadge = memo(function EnvironmentBadge({
{isProtected && !isUnset && (
<ShieldAlert className="w-3.5 h-3.5 shrink-0 text-current" />
)}
- </span>
+ </Badge>
);
if (!link || isUnset) {
diff --git a/frontend/src/components/InstanceAssignmentSheet.tsx b/frontend/src/components/InstanceAssignmentSheet.tsx
index e8ae7bee39..f4f501e959 100644
--- a/frontend/src/components/InstanceAssignmentSheet.tsx
+++ b/frontend/src/components/InstanceAssignmentSheet.tsx
@@ -230,14 +230,11 @@ export function InstanceAssignmentSheet({
</SheetHeader>
<SheetBody className="gap-y-6">
<div>
- <div className="flex gap-x-2 text-control-light">
+ <div className="flex gap-x-2 text-sm text-control-light">
<span>
{t("subscription.instance-assignment.used-and-total-license")}
</span>
- <LearnMoreLink
- href="https://docs.bytebase.com/administration/license?source=console"
- className="text-sm"
- />
+ <LearnMoreLink href="https://docs.bytebase.com/administration/license?source=console" />
</div>
<div className="mt-1 flex items-center gap-x-2 text-4xl">
<span>{activatedInstanceCount}</span>
diff --git a/frontend/src/components/IssueTable.tsx b/frontend/src/components/IssueTable.tsx
index 34f3900ed7..c6eebbff15 100644
--- a/frontend/src/components/IssueTable.tsx
+++ b/frontend/src/components/IssueTable.tsx
@@ -877,7 +877,7 @@ function IssueApprovalStatusTag({ issue }: { issue: Issue }) {
if (issue.approvalStatus === ApprovalStatus.CHECKING) {
return (
- <span className="shrink-0 mt-1 inline-flex items-center rounded-full bg-control-bg px-2 py-0.5 text-xs text-control-light">
+ <span className="shrink-0 mt-1 inline-flex items-center rounded-xs border border-transparent bg-control-bg px-1.5 py-0.5 text-xs text-control-light">
{t("custom-approval.issue-review.generating-approval-flow")}
</span>
);
@@ -893,7 +893,7 @@ function IssueApprovalStatusTag({ issue }: { issue: Issue }) {
if (status === ApprovalStatus.APPROVED) {
return (
<div className="shrink-0 flex flex-row sm:flex-col items-center sm:items-end gap-x-1.5 sm:gap-x-0 mt-1">
- <span className="inline-flex items-center rounded-full bg-success/10 text-success px-2 py-0.5 text-xs">
+ <span className="inline-flex items-center rounded-xs border border-transparent bg-success/10 px-1.5 py-0.5 text-xs text-success">
{t("issue.table.approved")}
</span>
<span className="text-xs text-control-light whitespace-nowrap sm:mt-1">
@@ -905,7 +905,7 @@ function IssueApprovalStatusTag({ issue }: { issue: Issue }) {
if (status === ApprovalStatus.REJECTED) {
return (
<div className="shrink-0 flex flex-row sm:flex-col items-center sm:items-end gap-x-1.5 sm:gap-x-0 mt-1">
- <span className="inline-flex items-center rounded-full bg-warning/10 text-warning px-2 py-0.5 text-xs">
+ <span className="inline-flex items-center rounded-xs border border-transparent bg-warning/10 px-1.5 py-0.5 text-xs text-warning">
{t("common.rejected")}
</span>
<span className="text-xs text-control-light whitespace-nowrap sm:mt-1">
@@ -920,7 +920,7 @@ function IssueApprovalStatusTag({ issue }: { issue: Issue }) {
const roleName = role ? displayRoleTitleFromList(role, roleList) : "";
return (
<div className="shrink-0 flex flex-row sm:flex-col items-center sm:items-end gap-x-1.5 sm:gap-x-0 mt-1">
- <span className="inline-flex items-center rounded-full bg-control-bg px-2 py-0.5 text-xs text-control-light">
+ <span className="inline-flex items-center rounded-xs border border-transparent bg-control-bg px-1.5 py-0.5 text-xs text-control-light">
{progressText}
</span>
{roleName && (
@@ -934,7 +934,7 @@ function IssueApprovalStatusTag({ issue }: { issue: Issue }) {
}
return (
- <span className="shrink-0 mt-1 inline-flex items-center rounded-full bg-control-bg px-2 py-0.5 text-xs text-control-light">
+ <span className="shrink-0 mt-1 inline-flex items-center rounded-xs border border-transparent bg-control-bg px-1.5 py-0.5 text-xs text-control-light">
{t("custom-approval.approval-flow.skip")}
</span>
);
diff --git a/frontend/src/components/LearnMoreLink.test.tsx b/frontend/src/components/LearnMoreLink.test.tsx
new file mode 100644
index 0000000000..38e3eda0a1
--- /dev/null
+++ b/frontend/src/components/LearnMoreLink.test.tsx
@@ -0,0 +1,22 @@
+import { render, screen } from "@testing-library/react";
+import { describe, expect, test, vi } from "vitest";
+import { LearnMoreLink } from "./LearnMoreLink";
+
+vi.mock("react-i18next", () => ({
+ useTranslation: () => ({
+ t: (key: string) =>
+ ({
+ "common.learn-more": "Learn more",
+ })[key] ?? key,
+ }),
+}));
+
+describe("LearnMoreLink", () => {
+ test("renders an underlined link", () => {
+ render(<LearnMoreLink href="https://docs.bytebase.com" />);
+
+ expect(screen.getByRole("link", { name: /learn more/i })).toHaveClass(
+ "underline"
+ );
+ });
+});
diff --git a/frontend/src/components/LearnMoreLink.tsx b/frontend/src/components/LearnMoreLink.tsx
index 64e482fe2b..c03aeb6df6 100644
--- a/frontend/src/components/LearnMoreLink.tsx
+++ b/frontend/src/components/LearnMoreLink.tsx
@@ -1,23 +1,18 @@
import { ExternalLink } from "lucide-react";
import { useTranslation } from "react-i18next";
-import { cn } from "@/lib/utils";
interface LearnMoreLinkProps {
href: string;
- className?: string;
}
-export function LearnMoreLink({ href, className }: LearnMoreLinkProps) {
+export function LearnMoreLink({ href }: LearnMoreLinkProps) {
const { t } = useTranslation();
return (
<a
href={href}
target="_blank"
rel="noopener noreferrer"
- className={cn(
- "inline-flex items-center gap-x-1 hover:underline",
- className
- )}
+ className="inline-flex items-center gap-x-1 underline"
>
{t("common.learn-more")}
<ExternalLink className="w-3 h-3" />
diff --git a/frontend/src/components/instance/CredentialSourceForm.test.tsx b/frontend/src/components/instance/CredentialSourceForm.test.tsx
index 553c95f774..5ac9516330 100644
--- a/frontend/src/components/instance/CredentialSourceForm.test.tsx
+++ b/frontend/src/components/instance/CredentialSourceForm.test.tsx
@@ -10,6 +10,7 @@ import {
DataSource_GCPCredentialSchema,
DataSourceSchema,
} from "@/types/proto-es/v1/instance_service_pb";
+import { FormField, ResponsiveFormLayout } from "../ui/form";
import {
CredentialSourceForm,
offeredCloudSQLIPTypes,
@@ -105,6 +106,42 @@ describe("CredentialSourceForm", () => {
}
);
+ test("keeps default credential help below the title in a compact dependent group", () => {
+ const { container, unmount } = render(
+ <ResponsiveFormLayout layout="horizontal">
+ <FormField title="Authentication">
+ <ResponsiveFormLayout layout="inherit" density="compact">
+ <CredentialSourceForm
+ dataSource={makeDataSource(
+ DataSource_AuthenticationType.GOOGLE_CLOUD_SQL_IAM
+ )}
+ engine={Engine.POSTGRES}
+ allowEdit={true}
+ onDataSourceChange={vi.fn()}
+ />
+ </ResponsiveFormLayout>
+ </FormField>
+ </ResponsiveFormLayout>
+ );
+
+ const credentialSource = container.querySelectorAll(
+ '[data-slot="form-field"]'
+ )[1];
+ const description = credentialSource?.querySelector(
+ '[data-slot="form-field-description"]'
+ );
+
+ expect(
+ credentialSource?.querySelector('[data-slot="form-field-control"]')
+ ).toBeNull();
+ expect(
+ credentialSource?.querySelector('[data-slot="form-field-header"]')
+ ?.lastElementChild
+ ).toBe(description);
+
+ unmount();
+ });
+
test("shows the Cloud SQL IP selector only for Cloud SQL MySQL/Postgres IAM", () => {
const { GOOGLE_CLOUD_SQL_IAM, PASSWORD } = DataSource_AuthenticationType;
expect(showsCloudSQLIPType(Engine.MYSQL, GOOGLE_CLOUD_SQL_IAM)).toBe(true);
@@ -194,6 +231,11 @@ describe("CredentialSourceForm", () => {
expect(
container.querySelector("textarea")?.getAttribute("placeholder")
).toBe("instance.type-or-paste-credentials-write-only");
+ expect(
+ container.querySelector("textarea")
+ ?.closest('[data-slot="form-field"]')
+ ?.querySelector('[data-slot="form-field-description"]')?.textContent
+ ).toContain("instance.create-gcp-credentials");
unmount();
});
diff --git a/frontend/src/components/instance/CredentialSourceForm.tsx b/frontend/src/components/instance/CredentialSourceForm.tsx
index b3aba4647d..a26c54a4a2 100644
--- a/frontend/src/components/instance/CredentialSourceForm.tsx
+++ b/frontend/src/components/instance/CredentialSourceForm.tsx
@@ -57,6 +57,11 @@ function CredentialSourceForm({
DataSource_AuthenticationType.AWS_RDS_IAM ||
dataSource.authenticationType === DataSource_AuthenticationType.AZURE_IAM;
+ const usesCompactFieldTitles =
+ dataSource.authenticationType ===
+ DataSource_AuthenticationType.GOOGLE_CLOUD_SQL_IAM ||
+ dataSource.authenticationType === DataSource_AuthenticationType.AWS_RDS_IAM;
+
const isDefaultCredentialDisabled = isSaaSMode && isIAMAuthentication;
const expectedCredentialCase = useMemo(() => {
@@ -216,7 +221,22 @@ function CredentialSourceForm({
<div className="flex flex-col gap-4 sm:col-span-3 sm:col-start-1">
<FormField
validationField="iamExtension"
- title={t("instance.iam-extension.credential-source")}
+ title={
+ usesCompactFieldTitles ? (
+ <span className="textlabel">
+ {t("instance.iam-extension.credential-source")}
+ </span>
+ ) : (
+ t("instance.iam-extension.credential-source")
+ )
+ }
+ description={
+ credentialSource === "default" ? (
+ <DefaultCredentialInfo
+ authenticationType={dataSource.authenticationType}
+ />
+ ) : undefined
+ }
>
<div className="flex flex-col gap-y-1">
<div className="flex items-center gap-x-3">
@@ -241,12 +261,6 @@ function CredentialSourceForm({
</p>
)}
</div>
-
- {credentialSource === "default" && (
- <DefaultCredentialInfo
- authenticationType={dataSource.authenticationType}
- />
- )}
</FormField>
{credentialSource === "specific-credential" && (
@@ -353,7 +367,14 @@ function CloudSQLIPTypeField({
}));
return (
- <FormField title={t("instance.cloud-sql-ip-type.label")}>
+ <FormField
+ title={
+ <span className="textlabel">
+ {t("instance.cloud-sql-ip-type.label")}
+ </span>
+ }
+ description={t("instance.cloud-sql-ip-type.description")}
+ >
{options.length === 2 ? (
<RadioGroup
className="gap-x-4"
@@ -396,9 +417,6 @@ function CloudSQLIPTypeField({
</SelectContent>
</Select>
)}
- <p className="text-sm text-control-light">
- {t("instance.cloud-sql-ip-type.description")}
- </p>
</FormField>
);
}
@@ -492,7 +510,7 @@ function AwsCredentialFields({
<div className="flex flex-col gap-4">
<FormField
validationField="iamExtension.accessKeyId"
- title={"Access Key ID"}
+ title={<span className="textlabel">Access Key ID</span>}
>
<Input
aria-label={"Access Key ID"}
@@ -503,7 +521,7 @@ function AwsCredentialFields({
onChange={(e) => onFieldChange("accessKeyId", e.target.value)}
/>
</FormField>
- <FormField title={"Secret Access Key"}>
+ <FormField title={<span className="textlabel">Secret Access Key</span>}>
<Input
aria-label={"Secret Access Key"}
className="w-full"
@@ -513,7 +531,7 @@ function AwsCredentialFields({
onChange={(e) => onFieldChange("secretAccessKey", e.target.value)}
/>
</FormField>
- <FormField title={"Session Token"}>
+ <FormField title={<span className="textlabel">Session Token</span>}>
<Input
aria-label={"Session Token"}
className="w-full"
@@ -525,7 +543,7 @@ function AwsCredentialFields({
</FormField>
<FormField
validationField="iamExtension.roleArn"
- title={t("instance.role-arn")}
+ title={<span className="textlabel">{t("instance.role-arn")}</span>}
>
<Input
aria-label={t("instance.role-arn")}
@@ -540,7 +558,9 @@ function AwsCredentialFields({
</div>
</FormField>
- <FormField title={t("instance.external-id")}>
+ <FormField
+ title={<span className="textlabel">{t("instance.external-id")}</span>}
+ >
<Input
aria-label={t("instance.external-id")}
className="w-full"
@@ -596,10 +616,13 @@ function GcpCredentialField({
return (
<FormField
validationField="iamExtension.content"
- title={t("instance.iam-extension.specific-credential")}
- >
- <div className="flex flex-col gap-y-1 w-full">
- <p className="textinfolabel">
+ title={
+ <span className="textlabel">
+ {t("instance.iam-extension.specific-credential")}
+ </span>
+ }
+ description={
+ <>
<span>{t("instance.create-gcp-credentials")}</span>
<a
href="https://docs.bytebase.com/get-started/connect/gcp?source=console"
@@ -623,7 +646,10 @@ function GcpCredentialField({
/>
</svg>
</a>
- </p>
+ </>
+ }
+ >
+ <div className="flex flex-col gap-y-1 w-full">
<Textarea
aria-label={t("instance.iam-extension.specific-credential")}
value={value}
@@ -647,7 +673,7 @@ function DefaultCredentialInfo({
const { t } = useTranslation();
return (
- <div className="text-sm leading-5 text-control-light">
+ <div className="text-sm leading-5 text-control-placeholder">
{authenticationType === DataSource_AuthenticationType.AZURE_IAM && (
<Trans
t={t}
diff --git a/frontend/src/components/instance/DataSourceForm.tsx b/frontend/src/components/instance/DataSourceForm.tsx
index 65b449aae9..1bf73392f5 100644
--- a/frontend/src/components/instance/DataSourceForm.tsx
+++ b/frontend/src/components/instance/DataSourceForm.tsx
@@ -1,5 +1,5 @@
import { create } from "@bufbuild/protobuf";
-import { Info } from "lucide-react";
+import { Info, Plus } from "lucide-react";
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
import { useTranslation } from "react-i18next";
import { LearnMoreLink } from "@/components/LearnMoreLink";
@@ -704,7 +704,7 @@ export function DataSourceForm({
{item.value !==
DataSourceExternalSecret_SecretType.SECRET_TYPE_UNSPECIFIED &&
currentPlan === PlanType.FREE && (
- <span className="rounded-full border border-current px-1.5 py-0.5 text-xs">
+ <span className="rounded-xs border border-current px-1.5 py-0.5 text-xs">
Pro
</span>
)}
@@ -802,7 +802,10 @@ export function DataSourceForm({
{/* Kerberos config */}
{dataSource.saslConfig?.mechanism?.case === "krbConfig" && (
<FormField title="Kerberos">
- <ResponsiveFormLayout>
+ <ResponsiveFormLayout
+ layout="inherit"
+ density="compact"
+ >
<fieldset
aria-label="Kerberos"
className="flex flex-col gap-4 rounded-xs border border-control-border px-3 py-2"
@@ -1101,7 +1104,10 @@ export function DataSourceForm({
)?.label
}
>
- <ResponsiveFormLayout>
+ <ResponsiveFormLayout
+ layout="inherit"
+ density="compact"
+ >
<fieldset
aria-label={t(
"instance.iam-extension.credential-source"
@@ -1184,13 +1190,14 @@ export function DataSourceForm({
)?.label
}
description={
- <LearnMoreLink
- href="https://docs.bytebase.com/get-started/connect/overview#secret-manager-integration"
- className="text-sm text-accent"
- />
+ <LearnMoreLink href="https://docs.bytebase.com/get-started/connect/overview#secret-manager-integration" />
}
>
- <ResponsiveFormLayout className="mt-2">
+ <ResponsiveFormLayout
+ layout="inherit"
+ density="compact"
+ className="mt-2"
+ >
<fieldset
className="flex flex-col gap-4 rounded-xs border border-control-border px-3 py-2"
aria-label={t(
@@ -1610,6 +1617,8 @@ export function DataSourceForm({
}
>
<SslCertificateForm
+ layout="inherit"
+ verifyControlLayout="inline"
verify={
!dataSource.externalSecret
.skipVaultTlsVerification
@@ -1912,10 +1921,7 @@ export function DataSourceForm({
<span className="text-control-light">
{t("data-source.snowflake-keypair-tip")}
</span>
- <LearnMoreLink
- href="https://docs.snowflake.com/en/user-guide/key-pair-auth"
- className="text-sm text-accent"
- />
+ <LearnMoreLink href="https://docs.snowflake.com/en/user-guide/key-pair-auth" />
</div>
</FormField>
<FormField
@@ -2319,12 +2325,13 @@ export function DataSourceForm({
</>
) : (
<Button
- appearance="link"
+ appearance="outline"
size="sm"
className="self-start"
onClick={() => setShowExtraParameters(true)}
disabled={!allowEdit}
>
+ <Plus className="h-4 w-4" />
{t("instance.add-parameter")}
</Button>
)}
@@ -2353,10 +2360,10 @@ function AwsRegionField({
<FormField
validationField="region"
title={
- <>
+ <span className="textlabel">
{t("instance.database-region")}
{required && <span className="text-error"> *</span>}
- </>
+ </span>
}
>
<Input
diff --git a/frontend/src/components/instance/InstanceFormBody.test.tsx b/frontend/src/components/instance/InstanceFormBody.test.tsx
index 2ffa202fc0..73d7099696 100644
--- a/frontend/src/components/instance/InstanceFormBody.test.tsx
+++ b/frontend/src/components/instance/InstanceFormBody.test.tsx
@@ -283,6 +283,27 @@ test("uses a switch for synchronization scope", () => {
);
});
+test("hides database-selection guidance while syncing all databases", () => {
+ render(
+ <InstanceFormProvider>
+ <SyncDatabases
+ isCreating
+ showLabel
+ allowEdit
+ disabledReason="Enter a hostname to choose which databases to sync."
+ onSyncDatabasesChange={() => undefined}
+ />
+ </InstanceFormProvider>
+ );
+
+ expect(
+ screen.queryByText(
+ "Enter a hostname to choose which databases to sync."
+ )
+ ).not.toBeInTheDocument();
+ expect(screen.getByRole("switch")).not.toHaveAttribute("aria-describedby");
+});
+
test("keeps newly loaded selections in the database preview", async () => {
mocks.listInstanceDatabases.mockResolvedValue({ databases: ["analytics"] });
const instance = create(InstanceSchema, {
diff --git a/frontend/src/components/instance/InstanceFormBody.tsx b/frontend/src/components/instance/InstanceFormBody.tsx
index 86a2e7ed5e..06abda7b21 100644
--- a/frontend/src/components/instance/InstanceFormBody.tsx
+++ b/frontend/src/components/instance/InstanceFormBody.tsx
@@ -370,7 +370,7 @@ function InstanceEngineRadioGrid({
<EngineIcon engine={eng} className="size-5" />
<span className="truncate">{engineNameV1(eng)}</span>
{isEngineBeta(eng) && (
- <span className="ml-auto shrink-0 rounded-full bg-accent/10 px-2 py-0.5 text-xs text-accent">
+ <span className="ml-auto shrink-0 rounded-xs border border-transparent bg-accent/10 px-1.5 py-0.5 text-xs text-accent">
Beta
</span>
)}
@@ -675,6 +675,7 @@ export function SyncDatabases({
const visibleDatabases = filteredDatabases.slice(0, visibleDatabaseCount);
const hasMore = filteredDatabases.length > visibleDatabaseCount;
const hasProjectContext = !!projectName && isCreatingProp;
+ const showDisabledReason = !!disabledReason && !syncAll;
const handleKeyDown = (e: React.KeyboardEvent) => {
if (e.nativeEvent.isComposing) return;
@@ -741,7 +742,7 @@ export function SyncDatabases({
? t("instance.sync-databases.project-sync-all")
: t("instance.sync-databases.self")
}
- aria-describedby={disabledReason ? disabledReasonId : undefined}
+ aria-describedby={showDisabledReason ? disabledReasonId : undefined}
/>
<span
className={cn("text-sm", disabledReason && "text-control-light")}
@@ -751,7 +752,7 @@ export function SyncDatabases({
: t("instance.sync-databases.selected-databases")}
</span>
</FormControlRow>
- {disabledReason && (
+ {showDisabledReason && (
<p
id={disabledReasonId}
className="text-xs leading-4 text-control-light"
@@ -1669,10 +1670,7 @@ export function InstanceFormBody({ onOpenInfoPanel }: InstanceFormBodyProps) {
<span className="text-control-light">
{t("instance.account-locator-description")}
</span>
- <LearnMoreLink
- href="https://docs.snowflake.com/en/user-guide/admin-account-identifier#using-an-account-locator-as-an-identifier"
- className="text-sm text-accent"
- />
+ <LearnMoreLink href="https://docs.snowflake.com/en/user-guide/admin-account-identifier#using-an-account-locator-as-an-identifier" />
</div>
)}
</FormField>
@@ -1705,7 +1703,11 @@ export function InstanceFormBody({ onOpenInfoPanel }: InstanceFormBodyProps) {
))}
</RadioGroup>
{!connectionDataSource.srv && (
- <ResponsiveFormLayout className="mt-2">
+ <ResponsiveFormLayout
+ layout="inherit"
+ density="compact"
+ className="mt-2"
+ >
<fieldset
aria-label={t("data-source.connection-string-schema")}
className="flex flex-col gap-4 rounded-xs border border-control-border px-3 py-2"
@@ -1805,7 +1807,11 @@ export function InstanceFormBody({ onOpenInfoPanel }: InstanceFormBodyProps) {
</SelectContent>
</Select>
{showAdditionalAddresses && (
- <ResponsiveFormLayout className="mt-2">
+ <ResponsiveFormLayout
+ layout="inherit"
+ density="compact"
+ className="mt-2"
+ >
<fieldset
aria-label={currentRedisConnectionType}
className="flex flex-col gap-4 rounded-xs border border-control-border px-3 py-2"
@@ -1825,7 +1831,11 @@ export function InstanceFormBody({ onOpenInfoPanel }: InstanceFormBodyProps) {
)}
{editingDataSource?.redisType ===
DataSource_RedisType.SENTINEL && (
- <ResponsiveFormLayout className="mt-2">
+ <ResponsiveFormLayout
+ layout="inherit"
+ density="compact"
+ className="mt-2"
+ >
<RedisSentinelFields
dataSource={editingDataSource}
isCreating={isCreating}
diff --git a/frontend/src/components/instance/InstanceFormContext.test.tsx b/frontend/src/components/instance/InstanceFormContext.test.tsx
index 54a21c3eb1..dbf446384d 100644
--- a/frontend/src/components/instance/InstanceFormContext.test.tsx
+++ b/frontend/src/components/instance/InstanceFormContext.test.tsx
@@ -1208,7 +1208,9 @@ describe("InstanceFormProvider", () => {
field?.querySelector('[data-slot="form-field-title"]')?.textContent
).toBe("data-source.extra-params.self");
expect(addParameter?.className).toContain("h-7");
+ expect(addParameter?.className).toContain("border-control-border");
expect(addParameter?.className).toContain("self-start");
+ expect(addParameter?.querySelector("svg")).not.toBeNull();
} finally {
harness.unmount();
}
diff --git a/frontend/src/components/instance/SshConnectionForm.tsx b/frontend/src/components/instance/SshConnectionForm.tsx
index 0102bd6878..09d5c71070 100644
--- a/frontend/src/components/instance/SshConnectionForm.tsx
+++ b/frontend/src/components/instance/SshConnectionForm.tsx
@@ -94,7 +94,7 @@ export function SshConnectionForm({
<span className="text-sm">{t("data-source.ssh-connection")}</span>
</FormControlRow>
{sshType !== "NONE" && (
- <ResponsiveFormLayout>
+ <ResponsiveFormLayout layout="inherit" density="compact">
<fieldset className="flex flex-col gap-4 rounded-xs border border-control-border px-3 py-2">
<legend className="px-1 textlabel">
{t("data-source.ssh-connection")}
diff --git a/frontend/src/components/instance/SslCertificateForm.test.tsx b/frontend/src/components/instance/SslCertificateForm.test.tsx
index 800c5c6603..0c475f7ef6 100644
--- a/frontend/src/components/instance/SslCertificateForm.test.tsx
+++ b/frontend/src/components/instance/SslCertificateForm.test.tsx
@@ -61,6 +61,38 @@ describe("SslCertificateForm", () => {
});
});
+ test("renders the verification switch before its label in an inline row", () => {
+ const container = document.createElement("div");
+ document.body.appendChild(container);
+ const root = createRoot(container);
+
+ act(() => {
+ root.render(
+ <SslCertificateForm
+ layout="vertical"
+ verifyControlLayout="inline"
+ verify={true}
+ onVerifyChange={() => {}}
+ />
+ );
+ });
+
+ const verifySwitch = screen.getByRole("switch", {
+ name: "data-source.ssl.verify-certificate",
+ });
+ expect(verifySwitch.parentElement).toHaveAttribute(
+ "data-slot",
+ "form-control-row"
+ );
+ expect(verifySwitch.parentElement?.lastElementChild?.textContent).toBe(
+ "data-source.ssl.verify-certificate"
+ );
+
+ act(() => {
+ root.unmount();
+ });
+ });
+
test("renders posture-first connection security controls", async () => {
const container = document.createElement("div");
document.body.appendChild(container);
diff --git a/frontend/src/components/instance/SslCertificateForm.tsx b/frontend/src/components/instance/SslCertificateForm.tsx
index 5190ae211e..a1485469d7 100644
--- a/frontend/src/components/instance/SslCertificateForm.tsx
+++ b/frontend/src/components/instance/SslCertificateForm.tsx
@@ -1,7 +1,7 @@
import { type DragEvent, useCallback } from "react";
import { useTranslation } from "react-i18next";
import { Badge } from "@/components/ui/badge";
-import { ResponsiveFormLayout } from "@/components/ui/form";
+import { FormControlRow, ResponsiveFormLayout } from "@/components/ui/form";
import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";
import {
Select,
@@ -37,6 +37,7 @@ import {
} from "./ValidationField";
interface SslCertificateFormProps {
+ layout?: "responsive" | "inherit" | "vertical" | "horizontal";
useSsl?: boolean;
onUseSslChange?: (val: boolean) => void;
caSource?: LocalTlsCaSource;
@@ -66,6 +67,7 @@ interface SslCertificateFormProps {
onKeyPathChange?: (val: string) => void;
disabled?: boolean;
showVerify?: boolean;
+ verifyControlLayout?: "field" | "inline";
showKeyAndCert?: boolean;
verifyLabel?: string;
caLabel?: string;
@@ -278,6 +280,7 @@ function ClientCertSourceSelector({
}
export function SslCertificateForm({
+ layout = "responsive",
useSsl,
onUseSslChange,
caSource,
@@ -307,6 +310,7 @@ export function SslCertificateForm({
onKeyPathChange,
disabled = false,
showVerify = true,
+ verifyControlLayout = "field",
showKeyAndCert = false,
verifyLabel,
caLabel,
@@ -729,6 +733,35 @@ export function SslCertificateForm({
return null;
}
+ const verifySwitch = (
+ <Switch
+ className="self-start"
+ aria-label={resolvedVerifyLabel}
+ checked={verify}
+ onCheckedChange={(val) => onVerifyChange?.(val)}
+ disabled={disabled}
+ />
+ );
+ const disabledDescription = !verify && (
+ <p className="text-xs leading-4 text-control-light">
+ {t("data-source.ssl.verification-disabled-description")}
+ </p>
+ );
+
+ if (verifyControlLayout === "inline") {
+ return (
+ <div className="flex flex-col gap-y-1">
+ <FormControlRow className="w-fit">
+ {verifySwitch}
+ <span className="text-sm font-normal leading-5 text-control">
+ {resolvedVerifyLabel}
+ </span>
+ </FormControlRow>
+ {disabledDescription}
+ </div>
+ );
+ }
+
return (
<FormField
title={
@@ -737,18 +770,8 @@ export function SslCertificateForm({
</span>
}
>
- <Switch
- className="self-start"
- aria-label={resolvedVerifyLabel}
- checked={verify}
- onCheckedChange={(val) => onVerifyChange?.(val)}
- disabled={disabled}
- />
- {!verify && (
- <p className="text-xs leading-4 text-control-light">
- {t("data-source.ssl.verification-disabled-description")}
- </p>
- )}
+ {verifySwitch}
+ {disabledDescription}
</FormField>
);
};
@@ -824,7 +847,7 @@ export function SslCertificateForm({
};
return (
- <ResponsiveFormLayout className="flex flex-col gap-4">
+ <ResponsiveFormLayout layout={layout} className="flex flex-col gap-4">
{showPostureUi && (
<>
{renderPostureControl()}
diff --git a/frontend/src/components/issue-activity/IssueCommentActivity.tsx b/frontend/src/components/issue-activity/IssueCommentActivity.tsx
index ae0347e084..e0f8febb68 100644
--- a/frontend/src/components/issue-activity/IssueCommentActivity.tsx
+++ b/frontend/src/components/issue-activity/IssueCommentActivity.tsx
@@ -818,14 +818,14 @@ function SpecChangeRow({
);
} else if (showIndex) {
chipSuffix = (
- <span className="rounded-full bg-control-bg px-1.5 py-0.5 text-xs text-main">
+ <span className="rounded-xs border border-transparent bg-control-bg px-1.5 py-0.5 text-xs text-main">
{specInfo.displayIndex}
</span>
);
}
} else if (specIdShort !== "") {
chipSuffix = (
- <span className="rounded-full bg-control-bg px-1.5 py-0.5 text-xs text-main">
+ <span className="rounded-xs border border-transparent bg-control-bg px-1.5 py-0.5 text-xs text-main">
{specIdShort}
</span>
);
diff --git a/frontend/src/components/plan-check/PlanCheckSection.tsx b/frontend/src/components/plan-check/PlanCheckSection.tsx
index 7adaeae575..4580994098 100644
--- a/frontend/src/components/plan-check/PlanCheckSection.tsx
+++ b/frontend/src/components/plan-check/PlanCheckSection.tsx
@@ -448,7 +448,7 @@ export function PlanCheckResultCard({
)}
{affectedRows !== undefined && (
<div className="mt-1 flex items-center gap-1 text-sm">
- <span className="inline-flex items-center rounded-full bg-background px-2 py-0.5 text-xs text-control">
+ <span className="inline-flex items-center rounded-xs border border-transparent bg-background px-1.5 py-0.5 text-xs text-control">
{t("task.check-type.affected-rows.self")}
</span>
<span>{String(affectedRows)}</span>
diff --git a/frontend/src/components/sql-review/TabsByEngine.tsx b/frontend/src/components/sql-review/TabsByEngine.tsx
index 2472421b0f..75192843b1 100644
--- a/frontend/src/components/sql-review/TabsByEngine.tsx
+++ b/frontend/src/components/sql-review/TabsByEngine.tsx
@@ -93,7 +93,7 @@ export function TabsByEngine({
{engineParts(engine).subtitle}
</span>
)}
- <span className="text-xs px-1 py-0.5 rounded-full bg-control-bg-hover text-main ml-1">
+ <span className="text-xs px-1 py-0.5 rounded-xs bg-control-bg-hover text-main ml-1">
{ruleMap.size}
</span>
</div>
diff --git a/frontend/src/components/ui/badge.test.tsx b/frontend/src/components/ui/badge.test.tsx
new file mode 100644
index 0000000000..97c3e0b84f
--- /dev/null
+++ b/frontend/src/components/ui/badge.test.tsx
@@ -0,0 +1,54 @@
+import { act } from "react";
+import { createRoot } from "react-dom/client";
+import { afterEach, describe, expect, test } from "vitest";
+import { Badge } from "./badge";
+
+(
+ globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }
+).IS_REACT_ACT_ENVIRONMENT = true;
+
+describe("Badge", () => {
+ let root: ReturnType<typeof createRoot> | undefined;
+
+ afterEach(() => {
+ act(() => root?.unmount());
+ root = undefined;
+ document.body.innerHTML = "";
+ });
+
+ test("uses the compact label geometry by default", () => {
+ const container = document.createElement("div");
+ document.body.appendChild(container);
+ root = createRoot(container);
+
+ act(() => {
+ root?.render(<Badge variant="success">Active</Badge>);
+ });
+
+ const badge = container.querySelector("span");
+ expect(badge?.className).toContain("rounded-xs");
+ expect(badge?.className).toContain("px-1.5");
+ expect(badge?.className).toContain("py-0.5");
+ expect(badge?.className).toContain("text-xs");
+ expect(badge?.className).toContain("border-transparent");
+ });
+
+ test("supports the roomier form-token density", () => {
+ const container = document.createElement("div");
+ document.body.appendChild(container);
+ root = createRoot(container);
+
+ act(() => {
+ root?.render(
+ <Badge variant="default" size="sm">
+ Workspace Admin
+ </Badge>
+ );
+ });
+
+ const badge = container.querySelector("span");
+ expect(badge?.className).toContain("h-7");
+ expect(badge?.className).toContain("px-2");
+ expect(badge?.className).toContain("text-sm");
+ });
+});
diff --git a/frontend/src/components/ui/badge.tsx b/frontend/src/components/ui/badge.tsx
index b8dd2382a2..741f8860ae 100644
--- a/frontend/src/components/ui/badge.tsx
+++ b/frontend/src/components/ui/badge.tsx
@@ -3,9 +3,13 @@ import type { ComponentProps } from "react";
import { cn } from "@/lib/utils";
const badgeVariants = cva(
- "inline-flex items-center rounded-full px-3 py-0.5 text-sm font-medium",
+ "inline-flex items-center gap-x-1 rounded-xs border border-transparent font-medium",
{
variants: {
+ size: {
+ xs: "px-1.5 py-0.5 text-xs",
+ sm: "h-7 px-2 text-sm",
+ },
variant: {
default: "bg-control-bg text-control",
secondary: "bg-accent/10 text-accent",
@@ -15,6 +19,7 @@ const badgeVariants = cva(
},
},
defaultVariants: {
+ size: "xs",
variant: "default",
},
}
@@ -22,9 +27,12 @@ const badgeVariants = cva(
type BadgeProps = ComponentProps<"span"> & VariantProps<typeof badgeVariants>;
-function Badge({ className, variant, ...props }: BadgeProps) {
+function Badge({ className, size, variant, ...props }: BadgeProps) {
return (
- <span className={cn(badgeVariants({ variant, className }))} {...props} />
+ <span
+ className={cn(badgeVariants({ size, variant, className }))}
+ {...props}
+ />
);
}
diff --git a/frontend/src/components/ui/form.test.tsx b/frontend/src/components/ui/form.test.tsx
index 42ba97b0ff..0251fa9942 100644
--- a/frontend/src/components/ui/form.test.tsx
+++ b/frontend/src/components/ui/form.test.tsx
@@ -19,6 +19,7 @@ import {
formErrorStyle,
formFieldGroupStyle,
formFieldTitleStyle,
+ formLabelStyle,
formSectionStyle,
} from "./styles.stylex";
@@ -225,6 +226,48 @@ describe("Form section layouts", () => {
});
describe("responsive form fields", () => {
+ test("keeps dependent fields compact and vertical inside a horizontal form", () => {
+ const { container, unmount } = renderIntoContainer(
+ <ResponsiveFormLayout layout="horizontal">
+ <FormField title="Authentication">
+ <ResponsiveFormLayout layout="inherit" density="compact">
+ <FormField
+ title="Vault URL"
+ description="Use the public endpoint."
+ >
+ <input aria-label="Vault URL" />
+ </FormField>
+ </ResponsiveFormLayout>
+ </FormField>
+ </ResponsiveFormLayout>
+ );
+
+ const dependentField = container.querySelectorAll(
+ '[data-slot="form-field"]'
+ )[1];
+ const title = dependentField?.querySelector(
+ '[data-slot="form-field-title"]'
+ );
+ const input = dependentField?.querySelector("input");
+ const description = dependentField?.querySelector(
+ '[data-slot="form-field-description"]'
+ );
+ const header = dependentField?.querySelector(
+ '[data-slot="form-field-header"]'
+ );
+
+ expect(
+ dependentField?.querySelector('[data-slot="form-field-control"]')
+ ).toBeNull();
+ expect(title?.className).toContain(
+ stylex.props(formLabelStyle()).className ?? ""
+ );
+ expect(header?.lastElementChild).toBe(description);
+ expect(input?.nextElementSibling).not.toBe(description);
+
+ unmount();
+ });
+
test("preserves vertical consumers and associates labels after horizontal reflow", () => {
const container = document.createElement("div");
document.body.append(container);
diff --git a/frontend/src/components/ui/form.tsx b/frontend/src/components/ui/form.tsx
index a56f441b6f..bea5d93a8f 100644
--- a/frontend/src/components/ui/form.tsx
+++ b/frontend/src/components/ui/form.tsx
@@ -34,16 +34,31 @@ import {
} from "./styles.stylex";
type FormLayout = "vertical" | "horizontal";
+type FormDensity = "default" | "compact";
-const FormLayoutContext = createContext<FormLayout>("vertical");
+interface FormLayoutContextValue {
+ layout: FormLayout;
+ density: FormDensity;
+}
+
+const FormLayoutContext = createContext<FormLayoutContextValue>({
+ layout: "vertical",
+ density: "default",
+});
interface ResponsiveFormLayoutProps extends Omit<ComponentProps<"div">, "ref"> {
/**
* Uses label/control rows when this layout region has enough room. This is
* intentionally based on the region width, so a docked side panel does not
* leave fields stranded in a viewport-sized two-column layout.
+ * Dependent groups use `inherit` to avoid making another breakpoint decision.
+ */
+ layout?: "responsive" | "inherit" | FormLayout;
+ /**
+ * Keeps dependent fields at label hierarchy when they stack inside a dense
+ * form control area.
*/
- layout?: "responsive" | FormLayout;
+ density?: FormDensity;
horizontalMinWidth?: number;
}
@@ -51,13 +66,28 @@ const ResponsiveFormLayout = forwardRef<
HTMLDivElement,
ResponsiveFormLayoutProps
>(function ResponsiveFormLayout(
- { children, horizontalMinWidth = 560, layout = "responsive", ...props },
+ {
+ children,
+ density: densityOverride,
+ horizontalMinWidth = 560,
+ layout = "responsive",
+ ...props
+ },
ref
) {
+ const inherited = useContext(FormLayoutContext);
+ const density = densityOverride ?? inherited.density;
const layoutRef = useRef<HTMLDivElement>(null);
- const [isHorizontal, setIsHorizontal] = useState(layout === "horizontal");
+ const [isHorizontal, setIsHorizontal] = useState(
+ layout === "horizontal" ||
+ (layout === "inherit" && inherited.layout === "horizontal")
+ );
useEffect(() => {
+ if (layout === "inherit") {
+ setIsHorizontal(inherited.layout === "horizontal");
+ return;
+ }
if (layout !== "responsive") {
setIsHorizontal(layout === "horizontal");
return;
@@ -72,11 +102,14 @@ const ResponsiveFormLayout = forwardRef<
});
observer.observe(element);
return () => observer.disconnect();
- }, [horizontalMinWidth, layout]);
+ }, [horizontalMinWidth, inherited.layout, layout]);
return (
<FormLayoutContext.Provider
- value={isHorizontal ? "horizontal" : "vertical"}
+ value={{
+ layout: isHorizontal ? "horizontal" : "vertical",
+ density,
+ }}
>
<div
ref={(element) => {
@@ -123,8 +156,8 @@ function FormField({
layout: layoutOverride,
...props
}: FormFieldProps) {
- const inheritedLayout = useContext(FormLayoutContext);
- const layout = layoutOverride ?? inheritedLayout;
+ const inherited = useContext(FormLayoutContext);
+ const layout = layoutOverride ?? inherited.layout;
const fieldStylexProps = stylex.props(
formFieldStyle(),
(title !== undefined ||
@@ -187,7 +220,9 @@ function FormField({
className={controlStylexProps.className}
style={controlStylexProps.style}
>
- <FormLayoutContext.Provider value="vertical">
+ <FormLayoutContext.Provider
+ value={{ ...inherited, layout: "vertical" }}
+ >
{controlChildren}
</FormLayoutContext.Provider>
</div>
@@ -212,9 +247,11 @@ function FormField({
* ```
*/
function FormTitle({ className, ref, style, ...props }: ComponentProps<"div">) {
- const layout = useContext(FormLayoutContext);
+ const { density, layout } = useContext(FormLayoutContext);
const stylexProps = stylex.props(
- layout === "horizontal" ? formLabelStyle() : formFieldTitleStyle()
+ layout === "horizontal" || density === "compact"
+ ? formLabelStyle()
+ : formFieldTitleStyle()
);
return (
<div
diff --git a/frontend/src/modules/sql-editor/components/AccessGrantItem.tsx b/frontend/src/modules/sql-editor/components/AccessGrantItem.tsx
index ef04fa2b08..0b7a6ae7a7 100644
--- a/frontend/src/modules/sql-editor/components/AccessGrantItem.tsx
+++ b/frontend/src/modules/sql-editor/components/AccessGrantItem.tsx
@@ -123,8 +123,8 @@ export function AccessGrantItem({
* `flex-wrap` + `justify-between` keeps the original "badges left,
* expiration right" layout when both fit on the row, but lets the
* row wrap when the panel is narrow. Pairing it with `shrink-0`
- * on the badges container preserves each pill at its natural size
- * so the label never wraps inside the pill (`脱敏豁免` → "脱敏豁
+ * on the badges container preserves each label at its natural size
+ * so the label never wraps inside the badge (`脱敏豁免` → "脱敏豁
* \n免"). When the expiration wraps to a second row it falls back
* to the row's start alignment (justify-between has no effect on
* a single-item row), so it reads naturally left-to-right under
@@ -132,27 +132,14 @@ export function AccessGrantItem({
*/}
<div className="w-full flex flex-wrap items-center justify-between gap-x-2 gap-y-1">
<div className="flex items-center gap-x-1 shrink-0">
- <Badge
- variant={badgeVariant}
- className="text-xs px-1.5 py-0 rounded-full"
- >
+ <Badge variant={badgeVariant} className="px-1.5 py-0.5">
{statusLabel}
</Badge>
{grant.unmask && (
- <Badge
- variant="default"
- className="text-xs px-1.5 py-0 rounded-full"
- >
- {t("sql-editor.grant-type-unmask")}
- </Badge>
+ <Badge variant="default">{t("sql-editor.grant-type-unmask")}</Badge>
)}
{grant.export && (
- <Badge
- variant="default"
- className="text-xs px-1.5 py-0 rounded-full"
- >
- {t("sql-editor.grant-type-export")}
- </Badge>
+ <Badge variant="default">{t("sql-editor.grant-type-export")}</Badge>
)}
</div>
{expiration && (
diff --git a/frontend/src/routes/project/ProjectAccessGrantsPage.tsx b/frontend/src/routes/project/ProjectAccessGrantsPage.tsx
index 4008700406..42042ef01e 100644
--- a/frontend/src/routes/project/ProjectAccessGrantsPage.tsx
+++ b/frontend/src/routes/project/ProjectAccessGrantsPage.tsx
@@ -322,7 +322,7 @@ export function ProjectAccessGrantsPage({ projectId }: { projectId: string }) {
</span>
<span>{u.title}</span>
{currentUser && u.name === currentUser.name && (
- <span className="text-xs bg-success/10 text-success rounded-full px-1.5">
+ <span className="inline-flex items-center rounded-xs border border-transparent bg-success/10 px-1.5 py-0.5 text-xs text-success">
{t("common.you")}
</span>
)}
diff --git a/frontend/src/routes/project/ProjectMaskingExemptionPage.tsx b/frontend/src/routes/project/ProjectMaskingExemptionPage.tsx
index b7f657b3f5..d5f576fd59 100644
--- a/frontend/src/routes/project/ProjectMaskingExemptionPage.tsx
+++ b/frontend/src/routes/project/ProjectMaskingExemptionPage.tsx
@@ -316,7 +316,7 @@ export function ProjectMaskingExemptionPage({
</span>
<span>{u.title}</span>
{currentUser && u.name === currentUser.name && (
- <span className="text-xs bg-success/10 text-success rounded-full px-1.5">
+ <span className="inline-flex items-center rounded-xs border border-transparent bg-success/10 px-1.5 py-0.5 text-xs text-success">
{t("common.you")}
</span>
)}
@@ -948,17 +948,17 @@ function ExemptionMemberItem({
<div className="flex items-center gap-x-1.5">
<span className="font-medium text-sm truncate">{displayName}</span>
{member.type === "group" && (
- <span className="inline-flex items-center rounded-full px-2 py-0.5 text-xs border border-control-border bg-background">
+ <span className="inline-flex items-center rounded-xs border border-control-border bg-background px-1.5 py-0.5 text-xs">
{t("common.groups")}
</span>
)}
{isServiceAccount && (
- <span className="inline-flex items-center rounded-full px-2 py-0.5 text-xs border border-accent/30 bg-accent/5 text-accent whitespace-nowrap shrink-0">
+ <span className="inline-flex items-center rounded-xs border border-accent/30 bg-accent/5 px-1.5 py-0.5 text-xs text-accent whitespace-nowrap shrink-0">
{t("settings.members.service-account")}
</span>
)}
{isWorkloadIdentity && (
- <span className="inline-flex items-center rounded-full px-2 py-0.5 text-xs border border-accent/30 bg-accent/5 text-accent whitespace-nowrap shrink-0">
+ <span className="inline-flex items-center rounded-xs border border-accent/30 bg-accent/5 px-1.5 py-0.5 text-xs text-accent whitespace-nowrap shrink-0">
{t("settings.members.workload-identity")}
</span>
)}
@@ -1303,7 +1303,7 @@ function ExemptionLevelCard({
<span className="textinfolabel font-medium uppercase text-xs">
{t("common.scope")}
</span>
- <span className="rounded-xs border border-success/20 bg-success/10 px-2 py-0.5 text-xs text-success">
+ <span className="rounded-xs border border-success/20 bg-success/10 px-1.5 py-0.5 text-xs text-success">
{t("database.all")}
</span>
</div>
diff --git a/frontend/src/routes/project/ProjectPlanDashboardPage.tsx b/frontend/src/routes/project/ProjectPlanDashboardPage.tsx
index 391fd28ac2..da88b859b6 100644
--- a/frontend/src/routes/project/ProjectPlanDashboardPage.tsx
+++ b/frontend/src/routes/project/ProjectPlanDashboardPage.tsx
@@ -420,12 +420,12 @@ function PlanTable({
<span className="opacity-60 italic">{t("common.untitled")}</span>
)}
{ctx.isDeleted && (
- <span className="inline-flex items-center rounded-full bg-warning/10 text-warning px-2 py-0.5 text-xs shrink-0">
+ <span className="inline-flex items-center rounded-xs border border-transparent bg-warning/10 px-1.5 py-0.5 text-xs text-warning shrink-0">
{t("common.closed")}
</span>
)}
{ctx.draftState === "draft" && !ctx.isDeleted && (
- <span className="inline-flex items-center rounded-full bg-control-bg text-control-light px-2 py-0.5 text-xs shrink-0">
+ <span className="inline-flex items-center rounded-xs border border-transparent bg-control-bg px-1.5 py-0.5 text-xs text-control-light shrink-0">
{t("common.draft")}
</span>
)}
diff --git a/frontend/src/routes/project/ProjectReleaseDashboardPage.tsx b/frontend/src/routes/project/ProjectReleaseDashboardPage.tsx
index c01ccdfbd2..49cc80869e 100644
--- a/frontend/src/routes/project/ProjectReleaseDashboardPage.tsx
+++ b/frontend/src/routes/project/ProjectReleaseDashboardPage.tsx
@@ -105,11 +105,8 @@ export function ProjectReleaseDashboardPage({
<ProjectPageInfo
description={
<>
- <span>{t("release.usage-description")}</span>
- <LearnMoreLink
- href="https://docs.bytebase.com/gitops/migration-based-workflow/release/?source=console"
- className="ml-1"
- />
+ <span>{t("release.usage-description")}</span>{" "}
+ <LearnMoreLink href="https://docs.bytebase.com/gitops/migration-based-workflow/release/?source=console" />
</>
}
/>
@@ -278,7 +275,7 @@ function ReleaseRow({ release }: { release: Release }) {
{showFiles.map((file, idx) => (
<p key={idx} className="w-full truncate">
{file.version && (
- <span className="mr-2 inline-flex items-center rounded-full bg-control-bg px-2 py-0.5 text-xs">
+ <span className="mr-2 inline-flex items-center rounded-xs border border-transparent bg-control-bg px-1.5 py-0.5 text-xs">
{file.version}
</span>
)}
diff --git a/frontend/src/routes/project/ProjectSyncSchemaPage.tsx b/frontend/src/routes/project/ProjectSyncSchemaPage.tsx
index 63a208ef5a..01057c6eb3 100644
--- a/frontend/src/routes/project/ProjectSyncSchemaPage.tsx
+++ b/frontend/src/routes/project/ProjectSyncSchemaPage.tsx
@@ -434,10 +434,7 @@ export function ProjectSyncSchemaPage({ projectId }: { projectId: string }) {
description={
<>
{t("database.sync-schema.description")}{" "}
- <LearnMoreLink
- href="https://docs.bytebase.com/change-database/synchronize-schema?source=console"
- className="text-accent"
- />
+ <LearnMoreLink href="https://docs.bytebase.com/change-database/synchronize-schema?source=console" />
</>
}
/>
@@ -890,7 +887,7 @@ function ChangelogLabel({ entry }: { entry: ChangelogEntry }) {
)}
</span>
{entry.planTitle && (
- <span className="inline-flex items-center px-1.5 py-0 rounded-full bg-control-bg text-xs">
+ <span className="inline-flex items-center rounded-xs border border-transparent bg-control-bg px-1.5 py-0.5 text-xs">
{entry.planTitle}
</span>
)}
@@ -1076,7 +1073,7 @@ function SourceSchemaInfo({
<Button
appearance="secondary"
size="md"
- className="h-auto inline-flex items-center gap-x-1 px-2.5 py-0.5 rounded-full bg-control-bg text-sm transition-colors hover:bg-control-bg-hover"
+ className="h-auto inline-flex items-center gap-x-1 px-2.5 py-0.5 rounded-xs bg-control-bg text-sm transition-colors hover:bg-control-bg-hover"
onClick={gotoDatabase}
>
<span className="opacity-60">{t("common.database")}</span>
@@ -1091,7 +1088,7 @@ function SourceSchemaInfo({
<Button
appearance="secondary"
size="md"
- className="h-auto inline-flex items-center gap-x-1 px-2.5 py-0.5 rounded-full bg-control-bg text-sm transition-colors hover:bg-control-bg-hover"
+ className="h-auto inline-flex items-center gap-x-1 px-2.5 py-0.5 rounded-xs bg-control-bg text-sm transition-colors hover:bg-control-bg-hover"
onClick={gotoChangelog}
>
<span className="opacity-60 mr-1">{t("common.changelog")}</span>
@@ -1100,10 +1097,10 @@ function SourceSchemaInfo({
</>
) : (
<>
- <span className="inline-flex items-center px-2.5 py-0.5 rounded-full bg-control-bg text-sm">
+ <span className="inline-flex items-center px-2.5 py-0.5 rounded-xs bg-control-bg text-sm">
{t("schema-editor.raw-sql")}
</span>
- <span className="inline-flex items-center gap-x-1 px-2.5 py-0.5 rounded-full bg-control-bg text-sm">
+ <span className="inline-flex items-center gap-x-1 px-2.5 py-0.5 rounded-xs bg-control-bg text-sm">
<span className="opacity-60 mr-1">{t("database.engine")}</span>
<EngineIcon engine={sourceEngine} className="w-4 h-4" />
<span>{engineNameV1(sourceEngine)}</span>
diff --git a/frontend/src/routes/project/issue-detail/components/IssueDetailApprovalFlow.tsx b/frontend/src/routes/project/issue-detail/components/IssueDetailApprovalFlow.tsx
index cefb3b1e45..7d379e4a00 100644
--- a/frontend/src/routes/project/issue-detail/components/IssueDetailApprovalFlow.tsx
+++ b/frontend/src/routes/project/issue-detail/components/IssueDetailApprovalFlow.tsx
@@ -79,7 +79,7 @@ export function IssueDetailApprovalFlow() {
{statusTag && (
<span
className={cn(
- "inline-flex items-center rounded-full px-2 py-0.5 text-xs",
+ "inline-flex items-center rounded-xs border border-transparent px-1.5 py-0.5 text-xs",
statusTag.className
)}
>
@@ -386,7 +386,7 @@ function ApprovalCandidateRow({
<div className="inline-flex items-start gap-1.5">
<ApproverIdentity email={user.email} name={principalLabel(user)} />
{isCurrentUser && (
- <span className="rounded-full bg-success/10 px-1.5 py-0.5 text-xs text-success">
+ <span className="rounded-xs border border-transparent bg-success/10 px-1.5 py-0.5 text-xs text-success">
{t("common.you")}
</span>
)}
diff --git a/frontend/src/routes/project/issue-detail/components/IssueDetailDatabaseChangeView.tsx b/frontend/src/routes/project/issue-detail/components/IssueDetailDatabaseChangeView.tsx
index 7baa7c8696..36c2bff2eb 100644
--- a/frontend/src/routes/project/issue-detail/components/IssueDetailDatabaseChangeView.tsx
+++ b/frontend/src/routes/project/issue-detail/components/IssueDetailDatabaseChangeView.tsx
@@ -815,7 +815,7 @@ function IssueDetailDatabaseGroupTarget({
<div className={cn("flex w-full flex-col gap-2", className)}>
<div className="flex items-center gap-x-2">
<FolderTree className="h-5 w-5 shrink-0 text-control" />
- <span className="inline-flex items-center rounded-full border px-2 py-0.5 text-xs">
+ <span className="inline-flex items-center rounded-xs border px-1.5 py-0.5 text-xs">
{t("common.database-group")}
</span>
<span className="min-w-0 truncate text-sm text-main">
diff --git a/frontend/src/routes/project/issue-detail/components/IssueDetailHeader.tsx b/frontend/src/routes/project/issue-detail/components/IssueDetailHeader.tsx
index f6b8d26d09..40895d82df 100644
--- a/frontend/src/routes/project/issue-detail/components/IssueDetailHeader.tsx
+++ b/frontend/src/routes/project/issue-detail/components/IssueDetailHeader.tsx
@@ -26,17 +26,15 @@ export function IssueDetailHeader() {
<div className="px-2 py-2 sm:px-4">
<div className="flex flex-row items-center justify-between gap-2">
{showClosedTag && (
- <Badge
- className="shrink-0 gap-x-1.5 rounded-full px-3 py-1"
- variant="default"
- >
+ <Badge className="shrink-0 gap-x-1.5" size="sm" variant="default">
<Ban className="h-4 w-4" />
{t("common.closed")}
</Badge>
)}
{showDoneTag && !showClosedTag && (
<Badge
- className="shrink-0 gap-x-1.5 rounded-full px-3 py-1"
+ className="shrink-0 gap-x-1.5"
+ size="sm"
variant={doneTagVariant}
>
<CheckCircle2 className="h-4 w-4" />
diff --git a/frontend/src/routes/project/plan-detail/components/deploy/DeployTaskFilter.tsx b/frontend/src/routes/project/plan-detail/components/deploy/DeployTaskFilter.tsx
index a253dcfcb6..97e3706382 100644
--- a/frontend/src/routes/project/plan-detail/components/deploy/DeployTaskFilter.tsx
+++ b/frontend/src/routes/project/plan-detail/components/deploy/DeployTaskFilter.tsx
@@ -30,7 +30,7 @@ export function DeployTaskFilter({
size="md"
key={status}
className={[
- "h-auto inline-flex items-center gap-1 rounded-full border px-2 py-1",
+ "h-auto inline-flex items-center gap-1 rounded-xs border px-2 py-1",
checked
? "border-accent bg-accent/10"
: "border-control-border bg-background",
diff --git a/frontend/src/routes/project/plan-detail/components/deploy/DeployTaskHeader.tsx b/frontend/src/routes/project/plan-detail/components/deploy/DeployTaskHeader.tsx
index a63d65782f..e252201d4c 100644
--- a/frontend/src/routes/project/plan-detail/components/deploy/DeployTaskHeader.tsx
+++ b/frontend/src/routes/project/plan-detail/components/deploy/DeployTaskHeader.tsx
@@ -85,7 +85,7 @@ export function DeployTaskHeader({
<div className="flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1">
<PlanTargetDisplay size="md" target={task.target} />
{isExpanded && scheduledTimeMs !== undefined && (
- <span className="flex shrink-0 items-center gap-x-1 rounded-full bg-info/10 px-2 py-0.5 text-xs text-info">
+ <span className="flex shrink-0 items-center gap-x-1 rounded-xs border border-transparent bg-info/10 px-1.5 py-0.5 text-xs text-info">
<LoaderCircle className="size-3 animate-spin motion-reduce:animate-none" />
<HumanizeTs mode="operational" tsMs={scheduledTimeMs} />
</span>
@@ -160,7 +160,7 @@ export function DeployTaskHeader({
{!isExpanded && collapsedStatusText && (
<div className="mt-1 flex items-center gap-x-2 text-xs">
{latestTaskRun?.createTime && (
- <span className="rounded-full border bg-control-bg px-2 py-0.5 text-control-light">
+ <span className="rounded-xs border bg-control-bg px-1.5 py-0.5 text-control-light">
<HumanizeTs
tsMs={getTimeForPbTimestampProtoEs(latestTaskRun.createTime)}
/>
diff --git a/frontend/src/routes/project/plan-detail/components/lifecycle/LifecycleStamp.tsx b/frontend/src/routes/project/plan-detail/components/lifecycle/LifecycleStamp.tsx
index e1f27a052c..668f73c1d9 100644
--- a/frontend/src/routes/project/plan-detail/components/lifecycle/LifecycleStamp.tsx
+++ b/frontend/src/routes/project/plan-detail/components/lifecycle/LifecycleStamp.tsx
@@ -21,7 +21,7 @@ export function LifecycleStamp({
return (
<span
className={cn(
- "inline-flex shrink-0 items-center rounded-full border text-sm",
+ "inline-flex shrink-0 items-center rounded-xs border text-sm",
size === "sm" && "gap-x-1 px-2 py-0.5",
size === "md" && "h-9 gap-x-1.5 px-3",
tone === "success" && "border-success/40 text-success",
diff --git a/frontend/src/routes/project/plan-detail/components/review/ReviewSectionHeader.tsx b/frontend/src/routes/project/plan-detail/components/review/ReviewSectionHeader.tsx
index 70b241b744..20ed11bf47 100644
--- a/frontend/src/routes/project/plan-detail/components/review/ReviewSectionHeader.tsx
+++ b/frontend/src/routes/project/plan-detail/components/review/ReviewSectionHeader.tsx
@@ -28,7 +28,7 @@ export function PlanReviewSectionHeader({ issue }: { issue: Issue }) {
<RiskChip riskLevel={issue.riskLevel} />
{/* Static label, not a link: for change plans the issue route redirects
back to this Plan Detail page (BYT-9721), so a link would be a no-op. */}
- <span className="inline-flex shrink-0 items-center rounded-full border px-2 py-0.5 text-xs text-control">
+ <span className="inline-flex shrink-0 items-center rounded-xs border px-1.5 py-0.5 text-xs text-control">
{t("common.issue")} #{issueUID}
</span>
</div>
@@ -47,7 +47,7 @@ function RiskChip({ riskLevel }: { riskLevel: RiskLevel }) {
: t("issue.risk-level.high");
const Icon = riskLevel === RiskLevel.LOW ? ShieldCheck : ShieldAlert;
return (
- <span className="inline-flex shrink-0 items-center gap-x-1 rounded-full border px-2 py-0.5 text-xs text-control">
+ <span className="inline-flex shrink-0 items-center gap-x-1 rounded-xs border px-1.5 py-0.5 text-xs text-control">
<Icon
className={
riskLevel === RiskLevel.LOW
diff --git a/frontend/src/routes/workspace/DataClassificationPage.tsx b/frontend/src/routes/workspace/DataClassificationPage.tsx
index f4a3a1096d..2bec55ec4b 100644
--- a/frontend/src/routes/workspace/DataClassificationPage.tsx
+++ b/frontend/src/routes/workspace/DataClassificationPage.tsx
@@ -298,10 +298,7 @@ export function DataClassificationPage() {
description={
<>
{t("database.classification.description")}{" "}
- <LearnMoreLink
- href="https://docs.bytebase.com/security/data-masking/data-classification?source=console"
- className="text-accent"
- />
+ <LearnMoreLink href="https://docs.bytebase.com/security/data-masking/data-classification?source=console" />
</>
}
/>
diff --git a/frontend/src/routes/workspace/EnvironmentsPage.tsx b/frontend/src/routes/workspace/EnvironmentsPage.tsx
index ba61d17b86..2d4576f9b6 100644
--- a/frontend/src/routes/workspace/EnvironmentsPage.tsx
+++ b/frontend/src/routes/workspace/EnvironmentsPage.tsx
@@ -764,11 +764,8 @@ function EnvironmentDetail({
}
description={
<>
- {t("policy.environment-tier.description", { newline: "\n" })}
- <LearnMoreLink
- href="https://docs.bytebase.com/change-database/environment-policy/overview/?source=console#environment-tier"
- className="ml-1 text-accent"
- />
+ {t("policy.environment-tier.description", { newline: "\n" })}{" "}
+ <LearnMoreLink href="https://docs.bytebase.com/change-database/environment-policy/overview/?source=console#environment-tier" />
</>
}
>
@@ -806,11 +803,8 @@ function EnvironmentDetail({
<>
{t("policy.rollout.info", {
permission: "bb.taskRuns.create",
- })}
- <LearnMoreLink
- href="https://docs.bytebase.com/change-database/environment-policy/rollout-policy/?source=console"
- className="ml-1 text-accent"
- />
+ })}{" "}
+ <LearnMoreLink href="https://docs.bytebase.com/change-database/environment-policy/rollout-policy/?source=console" />
</>
}
>
@@ -1071,11 +1065,8 @@ function CreateSheet({
}
description={
<>
- {t("policy.environment-tier.description", { newline: "\n" })}
- <LearnMoreLink
- href="https://docs.bytebase.com/change-database/environment-policy/overview/?source=console#environment-tier"
- className="ml-1 text-accent"
- />
+ {t("policy.environment-tier.description", { newline: "\n" })}{" "}
+ <LearnMoreLink href="https://docs.bytebase.com/change-database/environment-policy/overview/?source=console#environment-tier" />
</>
}
>
@@ -1102,11 +1093,8 @@ function CreateSheet({
<>
{t("policy.rollout.info", {
permission: "bb.taskRuns.create",
- })}
- <LearnMoreLink
- href="https://docs.bytebase.com/change-database/environment-policy/rollout-policy/?source=console"
- className="ml-1 text-accent"
- />
+ })}{" "}
+ <LearnMoreLink href="https://docs.bytebase.com/change-database/environment-policy/rollout-policy/?source=console" />
</>
}
>
diff --git a/frontend/src/routes/workspace/GlobalMaskingPage.tsx b/frontend/src/routes/workspace/GlobalMaskingPage.tsx
index 3f11047e69..f25e3d904b 100644
--- a/frontend/src/routes/workspace/GlobalMaskingPage.tsx
+++ b/frontend/src/routes/workspace/GlobalMaskingPage.tsx
@@ -537,10 +537,7 @@ export function GlobalMaskingPage() {
<>{t("custom-approval.rule.first-match-wins")} </>
)}
{t("settings.sensitive-data.global-rules.description")}{" "}
- <LearnMoreLink
- href="https://docs.bytebase.com/security/data-masking/overview/?source=console"
- className="text-accent"
- />
+ <LearnMoreLink href="https://docs.bytebase.com/security/data-masking/overview/?source=console" />
</>
}
/>
diff --git a/frontend/src/routes/workspace/IDPDetailPage.tsx b/frontend/src/routes/workspace/IDPDetailPage.tsx
index 7e647f08d2..5c2f71de28 100644
--- a/frontend/src/routes/workspace/IDPDetailPage.tsx
+++ b/frontend/src/routes/workspace/IDPDetailPage.tsx
@@ -1174,10 +1174,7 @@ export function IDPDetailPage() {
description={
<>
{t("settings.sso.description")}{" "}
- <LearnMoreLink
- href="https://docs.bytebase.com/administration/sso/overview?source=console"
- className="text-accent"
- />
+ <LearnMoreLink href="https://docs.bytebase.com/administration/sso/overview?source=console" />
</>
}
/>
diff --git a/frontend/src/routes/workspace/IDPsPage.tsx b/frontend/src/routes/workspace/IDPsPage.tsx
index d00d45da98..9b689419f4 100644
--- a/frontend/src/routes/workspace/IDPsPage.tsx
+++ b/frontend/src/routes/workspace/IDPsPage.tsx
@@ -1624,10 +1624,7 @@ function CreateWizardDrawer({
{t(
"settings.sso.form.user-information-mapping-description"
)}{" "}
- <LearnMoreLink
- href="https://docs.bytebase.com/administration/sso/oauth2#user-information-field-mapping?source=console"
- className="text-accent ml-1"
- />
+ <LearnMoreLink href="https://docs.bytebase.com/administration/sso/oauth2#user-information-field-mapping?source=console" />
</p>
</div>
<div className="max-w-2xl mx-auto flex flex-col gap-y-6 w-full">
@@ -1739,10 +1736,7 @@ export function IDPsPage() {
description={
<>
{t("settings.sso.description")}{" "}
- <LearnMoreLink
- href="https://docs.bytebase.com/administration/sso/overview?source=console"
- className="text-accent"
- />
+ <LearnMoreLink href="https://docs.bytebase.com/administration/sso/overview?source=console" />
</>
}
/>
diff --git a/frontend/src/routes/workspace/IMPage.tsx b/frontend/src/routes/workspace/IMPage.tsx
index fb1f809bbb..dafd0721bf 100644
--- a/frontend/src/routes/workspace/IMPage.tsx
+++ b/frontend/src/routes/workspace/IMPage.tsx
@@ -531,10 +531,7 @@ function Description() {
description={
<>
{t("settings.im-integration.description")}{" "}
- <LearnMoreLink
- href="https://docs.bytebase.com/change-database/webhook?source=console"
- className="text-accent"
- />
+ <LearnMoreLink href="https://docs.bytebase.com/change-database/webhook?source=console" />
</>
}
/>
diff --git a/frontend/src/routes/workspace/MembersPage.tsx b/frontend/src/routes/workspace/MembersPage.tsx
index ddd5d4b424..ee3ba5ea79 100644
--- a/frontend/src/routes/workspace/MembersPage.tsx
+++ b/frontend/src/routes/workspace/MembersPage.tsx
@@ -2290,10 +2290,7 @@ export function MembersPage({ projectId }: { projectId?: string }) {
description={
<>
{t("project.members.description")}{" "}
- <LearnMoreLink
- href="https://docs.bytebase.com/administration/roles/?source=console#project-roles"
- className="text-accent"
- />
+ <LearnMoreLink href="https://docs.bytebase.com/administration/roles/?source=console#project-roles" />
</>
}
/>
diff --git a/frontend/src/routes/workspace/RolesPage.tsx b/frontend/src/routes/workspace/RolesPage.tsx
index 4075781862..3cd86f8bbd 100644
--- a/frontend/src/routes/workspace/RolesPage.tsx
+++ b/frontend/src/routes/workspace/RolesPage.tsx
@@ -787,10 +787,7 @@ export function RolesPage() {
description={
<>
{t("role.setting.description")}{" "}
- <LearnMoreLink
- href="https://docs.bytebase.com/administration/roles?source=console"
- className="text-accent"
- />
+ <LearnMoreLink href="https://docs.bytebase.com/administration/roles?source=console" />
</>
}
/>
diff --git a/frontend/src/routes/workspace/SQLReviewPage.tsx b/frontend/src/routes/workspace/SQLReviewPage.tsx
index 276a32093a..41e9989e82 100644
--- a/frontend/src/routes/workspace/SQLReviewPage.tsx
+++ b/frontend/src/routes/workspace/SQLReviewPage.tsx
@@ -310,10 +310,7 @@ export function SQLReviewPage() {
description={
<>
{t("sql-review.description")}{" "}
- <LearnMoreLink
- href="https://docs.bytebase.com/sql-review/review-rules?source=console"
- className="text-accent"
- />
+ <LearnMoreLink href="https://docs.bytebase.com/sql-review/review-rules?source=console" />
</>
}
/>
diff --git a/frontend/src/routes/workspace/SubscriptionPage.tsx b/frontend/src/routes/workspace/SubscriptionPage.tsx
index 2297a9ab31..4d07188558 100644
--- a/frontend/src/routes/workspace/SubscriptionPage.tsx
+++ b/frontend/src/routes/workspace/SubscriptionPage.tsx
@@ -328,10 +328,7 @@ export function SubscriptionPage({
description={
<>
{t("subscription.description")} {t("subscription.plan-compare")}{" "}
- <LearnMoreLink
- href="https://www.bytebase.com/pricing?source=console"
- className="text-accent"
- />
+ <LearnMoreLink href="https://www.bytebase.com/pricing?source=console" />
{showTrial && allowManage && (
<Button
appearance="link"
diff --git a/frontend/src/routes/workspace/general/AIAugmentationSection.tsx b/frontend/src/routes/workspace/general/AIAugmentationSection.tsx
index 5c169822a2..8d36da4d10 100644
--- a/frontend/src/routes/workspace/general/AIAugmentationSection.tsx
+++ b/frontend/src/routes/workspace/general/AIAugmentationSection.tsx
@@ -309,10 +309,7 @@ export const AIAugmentationSection = forwardRef<
description={
<>
{t("settings.general.workspace.ai-assistant.description")}{" "}
- <LearnMoreLink
- href="https://docs.bytebase.com/ai-assistant?source=console"
- className="text-accent text-sm ml-1"
- />
+ <LearnMoreLink href="https://docs.bytebase.com/ai-assistant?source=console" />
</>
}
/>
diff --git a/frontend/src/routes/workspace/general/GeneralSection.tsx b/frontend/src/routes/workspace/general/GeneralSection.tsx
index 6c08235450..d7d0c0e88a 100644
--- a/frontend/src/routes/workspace/general/GeneralSection.tsx
+++ b/frontend/src/routes/workspace/general/GeneralSection.tsx
@@ -201,10 +201,7 @@ export const GeneralSection = forwardRef<SectionHandle, GeneralSectionProps>(
description={
<>
{t("settings.general.workspace.external-url.description")}{" "}
- <LearnMoreLink
- href="https://docs.bytebase.com/get-started/self-host/external-url?source=console"
- className="text-accent"
- />
+ <LearnMoreLink href="https://docs.bytebase.com/get-started/self-host/external-url?source=console" />
</>
}
>
diff --git a/frontend/src/routes/workspace/profile/AccountSettingsPage.tsx b/frontend/src/routes/workspace/profile/AccountSettingsPage.tsx
index 65fa88223f..23385daf1a 100644
--- a/frontend/src/routes/workspace/profile/AccountSettingsPage.tsx
+++ b/frontend/src/routes/workspace/profile/AccountSettingsPage.tsx
@@ -380,10 +380,7 @@ export function AccountSettingsPage() {
description={
<>
{t("two-factor.description")}{" "}
- <LearnMoreLink
- href="https://docs.bytebase.com/administration/2fa?source=console"
- className="ml-1 text-accent"
- />
+ <LearnMoreLink href="https://docs.bytebase.com/administration/2fa?source=console" />
</>
}
>
diff --git a/frontend/src/routes/workspace/shared/AADSyncSheet.tsx b/frontend/src/routes/workspace/shared/AADSyncSheet.tsx
index 4fd640b359..b5d9e12c16 100644
--- a/frontend/src/routes/workspace/shared/AADSyncSheet.tsx
+++ b/frontend/src/routes/workspace/shared/AADSyncSheet.tsx
@@ -113,10 +113,7 @@ export function AADSyncSheet({
{/* Description */}
<p className="text-sm text-control-light">
{t("settings.members.entra-sync.description")}{" "}
- <LearnMoreLink
- href="https://docs.bytebase.com/administration/scim/overview?source=console"
- className="text-accent"
- />
+ <LearnMoreLink href="https://docs.bytebase.com/administration/scim/overview?source=console" />
</p>
{/* Missing external URL warning */}
diff --git a/frontend/src/routes/workspace/two-factor/TwoFactorSetupPage.tsx b/frontend/src/routes/workspace/two-factor/TwoFactorSetupPage.tsx
index ea1f013f21..9e6fda6e01 100644
--- a/frontend/src/routes/workspace/two-factor/TwoFactorSetupPage.tsx
+++ b/frontend/src/routes/workspace/two-factor/TwoFactorSetupPage.tsx
@@ -313,11 +313,8 @@ export function TwoFactorSetupPage({ cancelAction }: TwoFactorSetupPageProps) {
return (
<div className="px-4 py-4">
<p className="mb-4 text-sm text-control-light">
- {t("two-factor.description")}
- <LearnMoreLink
- href="https://docs.bytebase.com/administration/2fa?source=console"
- className="ml-1 text-accent"
- />
+ {t("two-factor.description")}{" "}
+ <LearnMoreLink href="https://docs.bytebase.com/administration/2fa?source=console" />
</p>
{/* Step indicator */}