Skip to content

fix: use compact rename popup for folders#1621

Open
zhuamini-alt wants to merge 1 commit intoBoostIO:masterfrom
zhuamini-alt:fix/issue-1148-rename-popup
Open

fix: use compact rename popup for folders#1621
zhuamini-alt wants to merge 1 commit intoBoostIO:masterfrom
zhuamini-alt:fix/issue-1148-rename-popup

Conversation

@zhuamini-alt
Copy link

Background

Fixes #1148.

Current folder rename uses a full modal with a title + explicit update button. The issue asks for a compact popup-style experience (same pattern as doc rename), and saving via Enter or blur/click-away instead of a visible save button.

What changed

  • Updated openRenameFolderForm in useCloudResourceModals.tsx to align with doc rename UX:
    • removed explicit submit button for folder rename popup
    • added onBlur persistence so clicking away saves changes
    • changed modal options to compact popup style:
      • showCloseIcon: false
      • width: 'small'

Why this approach

  • Reuses the existing EmojiInputForm behavior already used by doc rename.
  • Keeps update payload shape unchanged (workspaceId, parentFolderId, folderName, emoji).
  • Minimizes scope/risk by changing only folder rename modal config + save trigger behavior.

Test evidence

  • Static check run locally:
    • npx eslint src/cloud/lib/hooks/useCloudResourceModals.tsx

Edge cases considered

  • Emoji can be unset on blur/submit (emoji normalized to null when non-string).
  • Parent folder and workspace references are preserved in both submit and blur flows.
  • Enter-to-save still works via form submit pathway; click-away save now works via onBlur.

Risk

  • Low/medium: onBlur may trigger an update even if value is unchanged (same as existing doc-rename pattern). This is acceptable and consistent with current UX conventions in this codebase.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve rename popup

2 participants