diff --git a/artifacts/tx-os/src/locales/ar.json b/artifacts/tx-os/src/locales/ar.json index 692943db..cb09559e 100644 --- a/artifacts/tx-os/src/locales/ar.json +++ b/artifacts/tx-os/src/locales/ar.json @@ -964,8 +964,6 @@ "timeOrderError": "وقت النهاية قبل وقت البداية", "addAttendee": "أضف حاضر", "addSubheading": "+ عنوان فرعي", - "addPersonHere": "+ شخص هنا", - "addPersonHereAria": "إضافة شخص في نهاية هذا القسم", "addVirtualAttendee": "+ حاضر عبر الاتصال المرئي", "addInternalAttendee": "+ حاضر داخلي", "addExternalAttendee": "+ حاضر خارجي", @@ -1075,8 +1073,6 @@ "moveUp": "تحريك للأعلى", "moveDown": "تحريك للأسفل", "dragHandle": "اسحب لإعادة الترتيب", - "addPersonHere": "إضافة شخص هنا", - "addPersonHereAria": "إضافة شخص في نهاية هذا القسم", "removeAll": "حذف جميع الحضور", "removeAllConfirm": "حذف جميع الحضور ({{count}})؟\n\nسيتم تطبيق التغيير عند حفظ الاجتماع." }, diff --git a/artifacts/tx-os/src/locales/en.json b/artifacts/tx-os/src/locales/en.json index d0c48439..50b6b8c6 100644 --- a/artifacts/tx-os/src/locales/en.json +++ b/artifacts/tx-os/src/locales/en.json @@ -881,8 +881,6 @@ "timeOrderError": "End time is before start time", "addAttendee": "Add attendee", "addSubheading": "+ subheading", - "addPersonHere": "+ person here", - "addPersonHereAria": "Add a person at the end of this section", "addVirtualAttendee": "+ Virtual", "addInternalAttendee": "+ Internal", "addExternalAttendee": "+ External", @@ -976,8 +974,6 @@ "moveUp": "Move up", "moveDown": "Move down", "dragHandle": "Drag to reorder", - "addPersonHere": "Add person here", - "addPersonHereAria": "Add a person at the end of this section", "removeAll": "Remove all attendees", "removeAllConfirm": "Remove all {{count}} attendees?\n\nThe change applies when you save the meeting." }, diff --git a/artifacts/tx-os/src/pages/executive-meetings.tsx b/artifacts/tx-os/src/pages/executive-meetings.tsx index 870011f2..586b61f6 100644 --- a/artifacts/tx-os/src/pages/executive-meetings.tsx +++ b/artifacts/tx-os/src/pages/executive-meetings.tsx @@ -3208,10 +3208,6 @@ function AttendeesCell({ onCancelAdd: cancelAdd, addLabel: t("executiveMeetings.schedule.addAttendee"), addSubheadingLabel: t("executiveMeetings.schedule.addSubheading"), - addPersonHereLabel: t("executiveMeetings.schedule.addPersonHere"), - addPersonHereAriaLabel: t( - "executiveMeetings.schedule.addPersonHereAria", - ), editAriaLabel: t("executiveMeetings.schedule.editAttendeeAria"), newAriaLabel: t("executiveMeetings.schedule.newAttendeeAria"), editSubheadingAriaLabel: t( @@ -3372,10 +3368,6 @@ type AttendeeFlowSharedProps = { onCancelAdd?: () => void; addLabel: string; addSubheadingLabel: string; - // Inline "+ person here" chip rendered right after each subheading row - // so the user can grow a section without scrolling to the trailing "+". - addPersonHereLabel: string; - addPersonHereAriaLabel: string; editAriaLabel: string; newAriaLabel: string; editSubheadingAriaLabel: string; @@ -3421,8 +3413,6 @@ function AttendeeFlow({ onCancelAdd, addLabel, addSubheadingLabel, - addPersonHereLabel, - addPersonHereAriaLabel, editAriaLabel, newAriaLabel, editSubheadingAriaLabel, @@ -3430,14 +3420,13 @@ function AttendeeFlow({ }: { items: AttendeeWithIndex[] } & AttendeeFlowSharedProps) { const editable = canMutate && !!onSaveAttendeeName; const showAdd = canMutate && !!onStartAdd && !isPending; - // True only when the in-flight ghost is targeted at a specific slot - // (set by clicking a per-subheading "+ person here" chip). When unset - // we fall back to the legacy trailing render so existing screenshots - // and the trailing "+" / "+ subheading" buttons keep working. - const hasInlineInsert = - isPending && - pendingKind === "person" && - pendingInsertAtIndex !== undefined; + // True when the in-flight ghost is targeted at a specific slot — set + // by clicking either the top "+ عنوان فرعي" chip or the after-section + // "+ عنوان فرعي" chip. The same flag drives inline rendering for the + // person ghost (still wired through the manage dialog flow). When + // unset we fall back to the legacy trailing render so the trailing + // "+" / "+ subheading" buttons keep working. + const hasInlineInsert = isPending && pendingInsertAtIndex !== undefined; // Each subheading starts a fresh numbered section. Within a section, // persons are numbered 1..N starting over after every subheading. @@ -3502,6 +3491,41 @@ function AttendeeFlow({ } } + // The pending subheading ghost
  • . Used for inline rendering when + // the user clicks the top "+ عنوان فرعي" chip or an after-section + // chip — the ghost materializes at the requested slot rather than the + // trailing fallback so the user sees their click land where expected. + const renderPendingSubheadingLi = (key: string) => { + if ( + !(canMutate && isPending && pendingKind === "subheading" && onCommitAdd) + ) { + return null; + } + return ( +
  • + + onCommitAdd(addType, html, "subheading", pendingInsertAtIndex) + } + ariaLabel={newSubheadingAriaLabel} + dir="auto" + placeholder="…" + className="inline-block align-baseline min-w-[6rem] min-h-[1.5rem] px-0.5 py-0.5 border-b border-dashed border-blue-500 data-[editing=true]:border-b-0 print:border-b-0 print:py-0 print:min-h-0" + testId={`em-add-subheading-pending-input-${addType}`} + startInEditMode + forceSaveOnBlur + onCancel={onCancelAdd} + /> +
  • + ); + }; + // The pending person ghost
  • . Defined once so we can render it // either inline (at the slot the user clicked) or as a trailing row // (legacy "+" button at the end of the cell). It always shows the next @@ -3564,12 +3588,44 @@ function AttendeeFlow({ return (