Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/web/app/(app)/account/authorize/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const Page = async ({ searchParams }: Readonly<{ searchParams: Promise<TSearchPa
return (
<div className="flex min-h-screen items-center justify-center bg-slate-50 px-4 py-10">
<div className="w-full max-w-xl rounded-lg border border-slate-200 bg-white p-6 shadow-sm">
<Alert variant="error">
<Alert variant="error" role="status">
<AlertTitle>{t("auth.oauth.invalid_oauth_request")}</AlertTitle>
<AlertDescription>{t("auth.oauth.invalid_oauth_request_description")}</AlertDescription>
</Alert>
Expand Down Expand Up @@ -136,7 +136,7 @@ const Page = async ({ searchParams }: Readonly<{ searchParams: Promise<TSearchPa
</dl>

{isLocalhostHost(redirectHost) && (
<Alert variant="warning" size="small" className="mt-6">
<Alert variant="warning" size="small" className="mt-6" role="status">
<AlertTitle>{t("auth.oauth.localhost_redirect_warning")}</AlertTitle>
<AlertDescription>{t("auth.oauth.localhost_redirect_warning_description")}</AlertDescription>
</Alert>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const Page = async (props: Readonly<{ params: Promise<{ organizationId: string }

{!IS_STORAGE_CONFIGURED && (
<div className="max-w-4xl">
<Alert variant="warning">
<Alert variant="warning" role="status">
<AlertDescription>{t("common.storage_not_configured")}</AlertDescription>
</Alert>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const Page = async (props: Readonly<{ params: Promise<{ organizationId: string }
<PageHeader pageTitle={t("workspace.settings.general.organization_settings")} />
{!IS_STORAGE_CONFIGURED && (
<div className="max-w-4xl">
<Alert variant="warning">
<Alert variant="warning" role="status">
<AlertDescription>{t("common.storage_not_configured")}</AlertDescription>
</Alert>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export const EnterpriseLicenseStatus = ({
</Button>
</div>
{status === "unreachable" && gracePeriodEnd && (
<Alert variant="warning" size="small">
<Alert variant="warning" size="small" role="status">
<AlertDescription className="overflow-visible whitespace-normal">
{t("workspace.settings.enterprise.license_unreachable_grace_period", {
gracePeriodEnd: formatDateForDisplay(new Date(gracePeriodEnd), locale, {
Expand All @@ -137,14 +137,14 @@ export const EnterpriseLicenseStatus = ({
</Alert>
)}
{status === "invalid_license" && (
<Alert variant="error" size="small">
<Alert variant="error" size="small" role="status">
<AlertDescription className="overflow-visible whitespace-normal">
{t("workspace.settings.enterprise.license_invalid_description")}
</AlertDescription>
</Alert>
)}
{status === "instance_mismatch" && (
<Alert variant="error" size="small">
<Alert variant="error" size="small" role="status">
<AlertDescription className="overflow-visible whitespace-normal">
{t("workspace.settings.enterprise.license_instance_mismatch_description")}
</AlertDescription>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export const AISettingsToggle = ({
return (
<div className="space-y-4">
{showInstanceConfigWarning && (
<Alert variant="warning">
<Alert variant="warning" role="status">
<AlertDescription>{aiEnablementBlockedMessage}</AlertDescription>
</Alert>
)}
Expand All @@ -117,7 +117,7 @@ export const AISettingsToggle = ({
/>

{!canEdit && (
<Alert variant="warning">
<Alert variant="warning" role="status">
<AlertDescription>
{t("common.only_owners_managers_and_manage_access_members_can_perform_this_action")}
</AlertDescription>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const CreateOrganizationCard = () => {

return (
<div className="max-w-4xl">
<Alert variant="info" size="small">
<Alert variant="info" size="small" role="status">
<AlertDescription>
{t("workspace.settings.general.create_new_organization_description")}
</AlertDescription>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const DeleteOrganization = ({
</div>
)}
{isDeleteDisabled && (
<Alert variant="warning">
<Alert variant="warning" role="status">
<AlertDescription>{deleteDisabledWarning}</AlertDescription>
</Alert>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export const EditOrganizationNameForm = ({ organization, membershipRole }: EditO
</form>
</FormProvider>
{!isOwner && (
<Alert variant="warning" className="mt-4">
<Alert variant="warning" className="mt-4" role="status">
<AlertDescription>
{t("workspace.settings.general.only_org_owner_can_perform_action")}
</AlertDescription>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
const NoBaseFoundError = () => {
const { t } = useTranslation();
return (
<Alert>
<Alert role="status">
<AlertTitle>{t("workspace.integrations.airtable.no_bases_found")}</AlertTitle>
<AlertDescription>{t("workspace.integrations.airtable.please_create_a_base")}</AlertDescription>
</Alert>
Expand Down Expand Up @@ -216,7 +216,7 @@
} else {
reset();
}
}, [isEditMode]);

Check warning on line 219 in apps/web/app/(app)/workspaces/[workspaceId]/settings/workspace/integrations/airtable/components/AddIntegrationModal.tsx

View workflow job for this annotation

GitHub Actions / Run Linters / Linters

React Hook useEffect has missing dependencies: 'defaultData', 'fetchTable', 'reset', and 'setIncludeVariables'. Either include them or remove the dependency array

const survey = watch("survey");
const includeVariables = watch("includeVariables");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export const ManageIntegration = ({
return (
<div className="mt-6 flex w-full flex-col items-center justify-center p-6">
{showReconnectButton && (
<Alert variant="warning" size="small" className="mb-4 w-full">
<Alert variant="warning" size="small" className="mb-4 w-full" role="status">
<AlertDescription>{t("workspace.integrations.reconnect_button_description")}</AlertDescription>
<AlertButton onClick={handleAirtableAuthorization}>
{t("workspace.integrations.reconnect_button")}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ export const AnonymousLinksTab = ({
/>

<div className="w-full">
<Alert variant="info" size="default">
<Alert variant="info" size="default" role="status">
<AlertTitle>
{t("workspace.surveys.share.anonymous_links.multi_use_powers_other_channels_title")}
</AlertTitle>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export const AppTab = () => {
return (
<div className="flex flex-col justify-between gap-y-6 pb-4">
<div className="flex flex-col gap-y-6">
<Alert variant={workspace.appSetupCompleted ? "success" : "warning"} size="default">
<Alert variant={workspace.appSetupCompleted ? "success" : "warning"} size="default" role="status">
<AlertTitle>
{workspace.appSetupCompleted
? t("workspace.surveys.summary.in_app.connection_title")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export const CustomHtmlTab = ({ workspaceCustomScripts, isReadOnly }: CustomHtml
{isSaving ? t("common.saving") : t("common.save")}
</Button>
{/* Security Warning */}
<Alert variant="warning" className="flex items-start gap-2">
<Alert variant="warning" className="flex items-start gap-2" role="status">
<AlertTriangleIcon className="mt-0.5 size-4 shrink-0" />
<AlertDescription>{t("workspace.surveys.share.custom_html.security_warning")}</AlertDescription>
</Alert>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const DocumentationLinksSection = ({ title, links }: DocumentationLinksSe
<div className="flex w-full flex-col gap-y-3">
<H4>{title}</H4>
{links.map((link) => (
<Alert key={link.title} size="small" variant="default">
<Alert key={link.title} size="small" variant="default" role="status">
<ArrowUpRight className="size-4" />
<AlertTitle>{link.title}</AlertTitle>
<AlertButton>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const DocumentationLinks = ({ links }: DocumentationLinksProps) => {
<div className="flex w-full flex-col gap-y-2">
{links.map((link) => (
<div key={link.title} className="flex w-full flex-col gap-3">
<Alert variant="outbound" size="small">
<Alert variant="outbound" size="small" role="status">
<AlertTitle>{link.title}</AlertTitle>
<AlertButton asChild>
<Link
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const DynamicPopupTab = ({ surveyId }: DynamicPopupTabProps) => {

return (
<div className="flex h-full flex-col justify-between gap-y-4" data-testid="dynamic-popup-container">
<Alert variant="info" size="default">
<Alert variant="info" size="default" role="status">
<AlertTitle>{t("workspace.surveys.share.dynamic_popup.alert_title")}</AlertTitle>
<AlertDescription>{t("workspace.surveys.share.dynamic_popup.alert_description")}</AlertDescription>
<AlertButton asChild>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const SocialMediaTab: React.FC<SocialMediaTabProps> = ({ surveyUrl, surve
))}
</div>

<Alert>
<Alert role="status">
<AlertCircleIcon />
<AlertTitle>{t("workspace.surveys.share.social_media.source_tracking_enabled")}</AlertTitle>
<AlertDescription>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/modules/auth/login/components/login-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export const LoginForm = ({
<div className="text-center">
<h1 className="mb-4 text-slate-700">{formLabel}</h1>
{oauthAccountNotLinked && (
<Alert variant="error" className="mb-4 text-left">
<Alert variant="error" className="mb-4 text-left" role="status">
<AlertTitle>{t("auth.login.oauth_account_not_linked_title")}</AlertTitle>
<AlertDescription>
<p>{t("auth.login.oauth_account_not_linked_description")}</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export function AIQuerySection({

if (!isAIAvailable) {
return (
<Alert>
<Alert role="status">
<AlertTitle>{t("workspace.analysis.charts.ai_chart_generation")}</AlertTitle>
<AlertDescription>{aiUnavailableMessage}</AlertDescription>
{aiUnavailableAction && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ export function CreateChartView({
</div>
</div>
) : (
<Alert variant="error" size="small">
<Alert variant="error" size="small" role="status">
<div>
<p>{t("workspace.analysis.charts.no_data_source_available")}</p>
{workspace?.organizationId && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function DimensionsPanel({
onChange={onDimensionsChange}
placeholder={t("workspace.analysis.charts.select_dimensions")}
/>
<Alert variant="info" size="small">
<Alert variant="info" size="small" role="status">
<AlertTitle>{t("workspace.analysis.charts.group_by_description")}</AlertTitle>
</Alert>
</div>
Expand Down
6 changes: 3 additions & 3 deletions apps/web/modules/ee/billing/components/pricing-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1157,7 +1157,7 @@ export const PricingTable = ({
))}

{pendingChange && (
<Alert variant="info" className="max-w-5xl">
<Alert variant="info" className="max-w-5xl" role="status">
<AlertTitle>{t("workspace.settings.billing.pending_plan_change_title")}</AlertTitle>
<AlertDescription>
{t("workspace.settings.billing.pending_plan_change_description", {
Expand All @@ -1179,7 +1179,7 @@ export const PricingTable = ({
)}

{isStripeSetupIncomplete && hasBillingRights && (
<Alert variant="warning" className="max-w-5xl">
<Alert variant="warning" className="max-w-5xl" role="status">
<AlertTitle>{t("workspace.settings.billing.stripe_setup_incomplete")}</AlertTitle>
<AlertDescription>
{t("workspace.settings.billing.stripe_setup_incomplete_description")}
Expand All @@ -1191,7 +1191,7 @@ export const PricingTable = ({
)}

{currentCloudPlan === "custom" && (
<Alert className="max-w-5xl">
<Alert className="max-w-5xl" role="status">
<AlertTitle>{t("workspace.settings.billing.custom_plan_title")}</AlertTitle>
<AlertDescription>{t("workspace.settings.billing.custom_plan_description")}</AlertDescription>
</Alert>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/modules/ee/billing/components/trial-alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const TrialAlert = ({
const variant = hasPaymentMethod ? "success" : getTrialVariant(trialDaysRemaining);

return (
<Alert variant={variant} size={size} className={cn("max-w-4xl", className)}>
<Alert variant={variant} size={size} className={cn("max-w-4xl", className)} role="status">
<AlertTitle>{title}</AlertTitle>
{children}
</Alert>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ export function TargetingCard({
</div>

<div>
<Alert className="flex items-center rounded-none bg-slate-50">
<Alert className="flex items-center rounded-none bg-slate-50" role="status">
<AlertDescription className="ml-2">
<span className="mr-1 text-slate-600">
<Trans
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ export const FeedbackDirectorySettingsModal = ({
containerClassName="focus-within:ring-0 focus-within:ring-offset-0"
/>
{workspaceConflictState.showBlockedExplanation && (
<Alert variant="info" className="items-start">
<Alert variant="info" className="items-start" role="status">
<div className="min-w-0 space-y-1">
<AlertTitle className="truncate">
{t("workspace.settings.feedback_directories.no_unassigned_workspaces_title")}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const FrdPicker = ({ directories, selectedDirectoryId, onChange }: FrdPic

if (directories.length === 0) {
return (
<Alert variant="error" size="small">
<Alert variant="error" size="small" role="status">
<div>
<p>{t("workspace.analysis.charts.no_data_source_available")}</p>
{organizationId && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ interface NoFeedbackDirectoryAlertProps {

const NoFeedbackDirectoryAlert = ({ organizationId, t }: NoFeedbackDirectoryAlertProps) => {
return (
<Alert variant="error" size="small">
<Alert variant="error" size="small" role="status">
<div>
<p>{t("workspace.unify.no_feedback_directory_available")}</p>
{organizationId && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export function FeedbackSourceTypeSelector({
);
})}
</div>
<Alert variant="outbound" size="small">
<Alert variant="outbound" size="small" role="status">
<AlertTitle>{t("workspace.unify.missing_feedback_source_title")}</AlertTitle>
<AlertButton asChild>
<Link
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ export function FeedbackSourcesSection({
isReadOnly={isReadOnly}
/>
{directories.length > 0 && (
<Alert size="small" className="mt-4">
<Alert size="small" className="mt-4" role="status">
<AlertDescription>{feedbackDirectoryAccessText}</AlertDescription>
{!isReadOnly && workspace?.organizationId && (
<AlertButton asChild>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ export const EmailCustomizationSettings = ({
)}

{hasWhiteLabelPermission && isReadOnly && (
<Alert variant="warning" className="mt-4 mb-6">
<Alert variant="warning" className="mt-4 mb-6" role="status">
<AlertDescription>
{t("common.only_owners_managers_and_manage_access_members_can_perform_this_action")}
</AlertDescription>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,12 @@ export const FaviconCustomizationSettings = ({
</Button>
)}

<Alert variant="info">
<Alert variant="info" role="status">
<AlertDescription>{t("workspace.settings.domain.favicon_size_hint")}</AlertDescription>
</Alert>

{isReadOnly && (
<Alert variant="warning">
<Alert variant="warning" role="status">
<AlertDescription>
{t("common.only_owners_managers_and_manage_access_members_can_perform_this_action")}
</AlertDescription>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const BrandingSettingsCard = async ({
noPadding={showLiteLicenseTip}>
{brandingContent}
{isReadOnly && (
<Alert variant="warning" className="mt-4">
<Alert variant="warning" className="mt-4" role="status">
<AlertDescription>
{t("common.only_owners_managers_and_manage_access_members_can_perform_this_action")}
</AlertDescription>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,14 +337,14 @@ export const AddApiKeyModal = ({
</div>
))}
{isFormbricksCloud && (
<Alert variant="info">
<Alert variant="info" role="status">
<AlertDescription>
{t("workspace.api_keys.organization_access_cloud_note")}
</AlertDescription>
</Alert>
)}
</div>
<Alert variant="warning">
<Alert variant="warning" role="status">
<AlertTitle>{t("workspace.api_keys.api_key_security_warning")}</AlertTitle>
</Alert>
</DialogBody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ export const BulkInviteTab = ({
</div>

{!isAccessControlAllowed && (
<Alert variant="default" className="mt-1.5 flex items-start bg-slate-50">
<Alert variant="default" className="mt-1.5 flex items-start bg-slate-50" role="status">
<AlertDescription className="ml-2">
<p className="text-sm">
<strong>{t("common.warning")}: </strong>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export const IndividualInviteTab = ({
)}

{!isAccessControlAllowed && (
<Alert>
<Alert role="status">
<AlertDescription className="flex">
{t("workspace.settings.teams.upgrade_plan_notice_message")}
<Link
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const InviteMembers = ({ IS_SMTP_CONFIGURED, organizationId }: InviteMemb
return (
<FormProvider {...form}>
{!IS_SMTP_CONFIGURED && (
<Alert variant="warning">
<Alert variant="warning" role="status">
<AlertTitle>{t("setup.invite.smtp_not_configured")}</AlertTitle>
<AlertDescription>{t("setup.invite.smtp_not_configured_description")}</AlertDescription>
</Alert>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const RemovedFromOrganization = ({
const [isModalOpen, setIsModalOpen] = useState(false);
return (
<div className="space-y-4">
<Alert variant="warning">
<Alert variant="warning" role="status">
<AlertTitle>{t("setup.organization.create.no_membership_found")}</AlertTitle>
<AlertDescription>{t("setup.organization.create.no_membership_found_description")}</AlertDescription>
</Alert>
Expand Down
Loading
Loading