Hide unused helper marks on selection cards and modal section labels until tooltip behavior ships.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -70,7 +70,7 @@ function ApplicableScopeFieldComponent({
|
||||
|
||||
return (
|
||||
<div className={`flex flex-col gap-2 ${className}`.trim()}>
|
||||
<InputLabel label={label} helpIcon size="s" palette="default" />
|
||||
<InputLabel label={label} size="s" palette="default" />
|
||||
<div className="flex flex-wrap items-center gap-2">
|
||||
{scopes.map((scope) => {
|
||||
const isSelected = selectedScopes.includes(scope);
|
||||
|
||||
+1
-2
@@ -60,7 +60,6 @@ function CustomMethodCardFieldBlocksSummaryViewComponent({
|
||||
<div key={block.id} className="flex flex-col gap-2">
|
||||
<InputLabel
|
||||
label={block.blockTitle}
|
||||
helpIcon
|
||||
size="s"
|
||||
palette="default"
|
||||
/>
|
||||
@@ -123,7 +122,6 @@ function CustomMethodCardFieldBlocksSummaryViewComponent({
|
||||
<div className="flex flex-col gap-2">
|
||||
<InputLabel
|
||||
label={block.blockTitle}
|
||||
helpIcon
|
||||
size="s"
|
||||
palette="default"
|
||||
/>
|
||||
@@ -169,6 +167,7 @@ function CustomMethodCardFieldBlocksSummaryViewComponent({
|
||||
<IncrementerBlock
|
||||
key={block.id}
|
||||
label={block.blockTitle}
|
||||
helpIcon={false}
|
||||
value={block.defaultPercent}
|
||||
min={1}
|
||||
max={100}
|
||||
|
||||
+1
-1
@@ -30,7 +30,6 @@ function CustomMethodCardUploadBlockRowViewComponent({
|
||||
<div className="flex flex-col gap-2">
|
||||
<InputLabel
|
||||
label={block.blockTitle}
|
||||
helpIcon
|
||||
size="s"
|
||||
palette="default"
|
||||
/>
|
||||
@@ -77,6 +76,7 @@ function CustomMethodCardUploadBlockRowViewComponent({
|
||||
) : (
|
||||
<Upload
|
||||
active={!busy}
|
||||
showHelpIcon={false}
|
||||
hintText={busy ? uploadingHint : uploadHint}
|
||||
onClick={onUploadClick}
|
||||
/>
|
||||
|
||||
+2
-5
@@ -51,12 +51,10 @@ function CustomMethodCardWizardFieldBodiesViewComponent({
|
||||
value={textBlockTitle}
|
||||
onChange={onTextBlockTitleChange}
|
||||
maxLength={CUSTOM_METHOD_CARD_WIZARD_MAX_FIELD_CHARS}
|
||||
showHelpIcon
|
||||
/>
|
||||
<div className="flex flex-col gap-2">
|
||||
<InputLabel
|
||||
label={copy.text.placeholderLabel}
|
||||
helpIcon
|
||||
size="s"
|
||||
palette="default"
|
||||
/>
|
||||
@@ -82,7 +80,6 @@ function CustomMethodCardWizardFieldBodiesViewComponent({
|
||||
<div className="flex flex-col gap-2">
|
||||
<InputLabel
|
||||
label={copy.badges.blockTitleLabel}
|
||||
helpIcon
|
||||
helperText={copy.requiredHint}
|
||||
size="s"
|
||||
palette="default"
|
||||
@@ -127,7 +124,6 @@ function CustomMethodCardWizardFieldBodiesViewComponent({
|
||||
value={uploadBlockTitle}
|
||||
onChange={onUploadBlockTitleChange}
|
||||
maxLength={CUSTOM_METHOD_CARD_WIZARD_MAX_FIELD_CHARS}
|
||||
showHelpIcon
|
||||
/>
|
||||
{hasUploadPreview ? (
|
||||
<div className="relative inline-block max-w-full">
|
||||
@@ -158,6 +154,7 @@ function CustomMethodCardWizardFieldBodiesViewComponent({
|
||||
) : (
|
||||
<Upload
|
||||
active={!uploadPersisting}
|
||||
showHelpIcon={false}
|
||||
hintText={
|
||||
uploadPersisting && uploadBusyHint
|
||||
? uploadBusyHint
|
||||
@@ -188,10 +185,10 @@ function CustomMethodCardWizardFieldBodiesViewComponent({
|
||||
value={proportionBlockTitle}
|
||||
onChange={onProportionBlockTitleChange}
|
||||
maxLength={CUSTOM_METHOD_CARD_WIZARD_MAX_FIELD_CHARS}
|
||||
showHelpIcon
|
||||
/>
|
||||
<IncrementerBlock
|
||||
label={copy.proportion.defaultLabel}
|
||||
helpIcon={false}
|
||||
value={proportionDefault}
|
||||
min={1}
|
||||
max={100}
|
||||
|
||||
@@ -38,6 +38,7 @@ export default function MethodCardCustomizeModalHeader({
|
||||
value={titleValue}
|
||||
onChange={(e) => onTitleChange(e.target.value)}
|
||||
inputSize="medium"
|
||||
showHelpIcon={false}
|
||||
/>
|
||||
{showDescription ? (
|
||||
<ModalTextAreaField
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
|
||||
/**
|
||||
* Shared "labelled text area" field used by every create flow modal section.
|
||||
* Pairs an `InputLabel` (with help icon) with a `TextArea` set to the embedded
|
||||
* appearance — matching the Figma "Control / Text Area" pattern.
|
||||
* Pairs an `InputLabel` with a `TextArea` set to the embedded appearance —
|
||||
* matching the Figma "Control / Text Area" pattern. Section help marks stay
|
||||
* off until tooltip behavior ships.
|
||||
*/
|
||||
|
||||
import { memo, useId } from "react";
|
||||
@@ -13,7 +14,7 @@ import InputLabel from "../../../components/type/InputLabel";
|
||||
export interface ModalTextAreaFieldProps {
|
||||
/** Label rendered above the text area. */
|
||||
label: string;
|
||||
/** Show the help "?" icon next to the label (default `true`). */
|
||||
/** Show the help "?" icon next to the label. Off until tooltip behavior ships. */
|
||||
helpIcon?: boolean;
|
||||
/** Current text value. */
|
||||
value: string;
|
||||
@@ -30,7 +31,7 @@ export interface ModalTextAreaFieldProps {
|
||||
|
||||
function ModalTextAreaFieldComponent({
|
||||
label,
|
||||
helpIcon = true,
|
||||
helpIcon = false,
|
||||
value,
|
||||
onChange,
|
||||
rows = 4,
|
||||
|
||||
@@ -76,6 +76,7 @@ function DecisionApproachEditFieldsComponent({
|
||||
/>
|
||||
<IncrementerBlock
|
||||
label={t.sectionHeadings.consensusLevel}
|
||||
helpIcon={false}
|
||||
value={value.consensusLevel}
|
||||
min={CONSENSUS_LEVEL_MIN}
|
||||
max={CONSENSUS_LEVEL_MAX}
|
||||
|
||||
@@ -148,7 +148,7 @@ export function CardStackView({
|
||||
recommended={item.recommended ?? false}
|
||||
selected={isSelected(item.id)}
|
||||
orientation="vertical"
|
||||
showInfoIcon={true}
|
||||
showInfoIcon={false}
|
||||
onClick={() => onCardSelect(item.id)}
|
||||
/>
|
||||
))}
|
||||
@@ -457,7 +457,7 @@ export function CardStackView({
|
||||
recommended={item.recommended ?? false}
|
||||
selected={isSelected(item.id)}
|
||||
orientation="vertical"
|
||||
showInfoIcon={true}
|
||||
showInfoIcon={false}
|
||||
onClick={() => onCardSelect(item.id)}
|
||||
/>
|
||||
))}
|
||||
|
||||
@@ -6,7 +6,7 @@ import type { SelectionProps } from "./Selection.types";
|
||||
|
||||
/**
|
||||
* Figma: "Card / CardSelection" — stacked tile e.g. `16775:28762` (recommended + label + supportText).
|
||||
* `orientation="horizontal"` selects that vertical stack; `"vertical"` is label + optional info icon with tag on the right (CardStack `singleStack` / right-rail).
|
||||
* `orientation="horizontal"` selects that vertical stack; `"vertical"` is label + tag on the right (CardStack `singleStack` / right-rail). Helper `?` stays off until tooltip behavior ships.
|
||||
*/
|
||||
const SelectionContainer = memo<SelectionProps>(
|
||||
({
|
||||
|
||||
@@ -4,6 +4,7 @@ export interface SelectionProps {
|
||||
recommended?: boolean;
|
||||
selected?: boolean;
|
||||
orientation: "horizontal" | "vertical";
|
||||
/** Off in product until tooltip behavior ships. */
|
||||
showInfoIcon?: boolean;
|
||||
/** Optional id for the root (e.g. `data-card-id` for focus after modal close). */
|
||||
id?: string;
|
||||
|
||||
@@ -291,7 +291,7 @@ function ReadOnlyScopeField({
|
||||
}) {
|
||||
return (
|
||||
<div className="flex flex-col gap-2">
|
||||
<InputLabel label={label} helpIcon size="s" palette="default" />
|
||||
<InputLabel label={label} size="s" palette="default" />
|
||||
<div className="flex flex-wrap items-center gap-2">
|
||||
{scopes.map((scope) => (
|
||||
<Chip
|
||||
@@ -317,7 +317,7 @@ function ReadOnlyValueField({
|
||||
}) {
|
||||
return (
|
||||
<div className="flex flex-col gap-2">
|
||||
<InputLabel label={label} helpIcon size="s" palette="default" />
|
||||
<InputLabel label={label} size="s" palette="default" />
|
||||
<span className="text-medium-label text-[color:var(--color-content-default-primary)]">
|
||||
{value}
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user