Scheduling infrastructure for absolutely everyone.
feat: add tooltip to Group Options label in attributes form (#25063)
Hariom Balhara0206b364eee9
diff --git a/apps/web/public/static/locales/en/common.json b/apps/web/public/static/locales/en/common.jsonindex 6940009ca79..b6e675ade17 100644--- a/apps/web/public/static/locales/en/common.json+++ b/apps/web/public/static/locales/en/common.json@@ -3249,6 +3249,8 @@"lock_attribute_for_assignment": "Lock for assignment","lock_attribute_for_assignment_description": "Locking would only allow assignments from Directory Sync","attribute_edited_successfully": "Attribute edited successfully",+ "group_options": "Group Options",+ "group_options_description": "When a group option is assigned to a user, they behave as if all options within that group are assigned to them.","new_group_option": "New group option","attribute_weight_enabled": "Weights enabled","attribute_weight_enabled_description": "By enabling weights, it would be possible to assign higher priority to certain attributes per user. The higher the weight, the higher the priority.",diff --git a/packages/features/ee/organizations/pages/settings/attributes/AttributesForm.tsx b/packages/features/ee/organizations/pages/settings/attributes/AttributesForm.tsxindex 7d9aa70add5..d42834c2b18 100644--- a/packages/features/ee/organizations/pages/settings/attributes/AttributesForm.tsx+++ b/packages/features/ee/organizations/pages/settings/attributes/AttributesForm.tsx@@ -6,6 +6,7 @@ import { z } from "zod";import { Dialog } from "@calcom/features/components/controlled-dialog";import { useLocale } from "@calcom/lib/hooks/useLocale";+import { InfoBadge } from "@calcom/ui/components/badge";import { Button } from "@calcom/ui/components/button";import { ConfirmationDialogContent } from "@calcom/ui/components/dialog";import { SettingsToggle, SelectField, Input, InputField, Form, Label } from "@calcom/ui/components/form";@@ -261,7 +262,10 @@ const GroupOptions = ({const { t } = useLocale();return (<>- <Label>{t("Group Options")}</Label>+ <Label className="flex items-center">+ {t("group_options")}+ <InfoBadge content={t("group_options_description")} />+ </Label><div>{fields.map((option, index) => {const isAGroupOption = option.isGroup;diff --git a/packages/features/ee/organizations/pages/settings/attributes/__tests__/AttributeForm.test.tsx b/packages/features/ee/organizations/pages/settings/attributes/__tests__/AttributeForm.test.tsxindex a0529877c8b..916e7bf9757 100644--- a/packages/features/ee/organizations/pages/settings/attributes/__tests__/AttributeForm.test.tsx+++ b/packages/features/ee/organizations/pages/settings/attributes/__tests__/AttributeForm.test.tsx@@ -1,5 +1,6 @@import { render, screen, waitFor } from "@testing-library/react";import userEvent from "@testing-library/user-event";+import * as Tooltip from "@radix-ui/react-tooltip";import React from "react";import type { Mock } from "vitest";import { vi } from "vitest";@@ -44,6 +45,10 @@ const AttributeFormActions = {},render: (initialOptions: InitialOption[], mockOnSubmit: Mock) => {+ const wrapper = ({ children }: { children: React.ReactNode }) => (+ <Tooltip.Provider>{children}</Tooltip.Provider>+ );+return render(<AttributeFormonSubmit={mockOnSubmit}@@ -53,7 +58,8 @@ const AttributeFormActions = {options: initialOptions,}}header={<Button type="submit">Save</Button>}- />+ />,+ { wrapper });},