Yuki Takei 10 месяцев назад
Родитель
Сommit
9ddc6efabc
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      apps/app/src/client/components/PageHeader/PageTitleHeader.tsx

+ 2 - 0
apps/app/src/client/components/PageHeader/PageTitleHeader.tsx

@@ -103,6 +103,7 @@ export const PageTitleHeader = (props: Props): JSX.Element => {
 
 
   const isInvalid = validationResult != null;
   const isInvalid = validationResult != null;
 
 
+  // calculate inputMaxWidth as the maximum width of AutoSizeInput minus the width of WIP badge and CopyDropdown
   const inputMaxWidth = useMemo(() => {
   const inputMaxWidth = useMemo(() => {
     if (maxWidth == null) {
     if (maxWidth == null) {
       return undefined;
       return undefined;
@@ -115,6 +116,7 @@ export const PageTitleHeader = (props: Props): JSX.Element => {
     return getAdjustedMaxWidthForAutosizeInput(maxWidth, 'md', validationResult != null ? false : undefined) - wipBadgeAndCopyDropdownWidth;
     return getAdjustedMaxWidthForAutosizeInput(maxWidth, 'md', validationResult != null ? false : undefined) - wipBadgeAndCopyDropdownWidth;
   }, [currentPage.wip, maxWidth, validationResult]);
   }, [currentPage.wip, maxWidth, validationResult]);
 
 
+  // calculate h1MaxWidth as the inputMaxWidth plus padding
   const h1MaxWidth = useMemo(() => {
   const h1MaxWidth = useMemo(() => {
     if (inputMaxWidth == null) {
     if (inputMaxWidth == null) {
       return undefined;
       return undefined;