Skip to content

fix(ui): 统一 SavedToast 弹框位置与进出方向#505

Merged
appergb merged 1 commit into
betafrom
fix/saved-toast-position
May 20, 2026
Merged

fix(ui): 统一 SavedToast 弹框位置与进出方向#505
appergb merged 1 commit into
betafrom
fix/saved-toast-position

Conversation

@appergb
Copy link
Copy Markdown
Collaborator

@appergb appergb commented May 20, 2026

User description

改动

提示弹框(SavedToast)此前位置 / 动画不统一(页面级左上、风格页右下),本次统一:

  • 默认停靠右上角fixed, top:20 right:28),与页头「风格市场 / 刷新 / 导入 ZIP」按钮同区
  • 新增 slideFrom 属性:'right'(默认,屏幕右侧进出)/ 'top'(上方进出)—— 始终"从哪来回哪去"
  • SettingsModalslideFrom="top" + absolute 锚内容区
  • Style 页移除 bottom-right 的 offsetStyle 覆盖,回归统一默认
  • 淡蓝 pill 样式、0.8s 自动收回

测试

  • tsc + vite build 通过(隔离分支单独验证)
  • typescript-reviewer 交叉审核:H1(motion variant 补全 x/y)已修,其余为既有项 / 非阻塞
  • 手动验证:风格页保存/删除、设置页 Provider 保存的弹框位置与进出动画

PR Type

Enhancement, Bug fix


Description

  • Unify SavedToast default placement

  • Add directional slide-in/out control

  • Auto-dismiss toast after 0.8s

  • Reuse defaults across style and settings


Diagram Walkthrough

flowchart LR
  A["SavedToast component"] -- "default right-top / fixed" --> B["Style page"]
  A -- "top / absolute" --> C["SettingsModal"]
  A -- "framer-motion + auto dismiss" --> D["Toast animation behavior"]
Loading

File Walkthrough

Relevant files
Enhancement
SavedToast.tsx
Add directional animated toast behavior                                   

openless-all/app/src/components/SavedToast.tsx

  • Replaced the static toast with framer-motion enter/exit animations.
  • Added slideFrom to support right and top motion origins.
  • Introduced internal visibility state for automatic 0.8s dismissal.
  • Updated default styling to a unified right-top fixed pill.
+62/-30 
SettingsModal.tsx
Anchor modal toast to content area                                             

openless-all/app/src/components/SettingsModal.tsx

  • Passed slideFrom="top" so the toast animates vertically.
  • Overrode positioning with absolute to anchor inside the modal content.
  • Kept the toast clear of the close button using a right offset.
+4/-1     
Style.tsx
Remove custom toast placement override                                     

openless-all/app/src/pages/Style.tsx

  • Removed the bottom-right offsetStyle override for SavedToast.
  • Let the style page use the shared default right-top placement.
  • Simplified the page-level toast usage to match the new unified
    behavior.
+3/-7     

- 默认停靠右上角(fixed top:20 right:28),与页头「风格市场/刷新/导入ZIP」
  按钮同区;淡蓝 pill、0.8s 自动收回
- 新增 slideFrom 属性:'right'(默认,屏幕右侧进出)/ 'top'(上方进出),
  始终"从哪来回哪去"
- SettingsModal 用 slideFrom="top" + absolute 锚内容区,借 overflow:hidden
  裁边实现"从屏幕外上方进出"
- Style 页移除 bottom-right 的 offsetStyle 覆盖,回归统一默认
@github-actions
Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ No major issues detected

@appergb appergb merged commit e8f8ac0 into beta May 20, 2026
1 of 4 checks passed
@appergb appergb deleted the fix/saved-toast-position branch May 20, 2026 08:29
appergb pushed a commit that referenced this pull request May 20, 2026
…st 统一定位 + Windows 听写后 SendInput 降压

合并 #503(fix(windows): reduce SendInput pressure after dictation):
听写结束后降低 SendInput 调用压力,优化 coordinator/dictation/insertion 路径。

合并 #505(fix(ui): 统一 SavedToast 弹框位置与进出方向):
SavedToast 默认停靠右上角,新增 slideFrom 属性支持 right/top 两种进出方向,
SettingsModal 用 slideFrom="top" + absolute 锚定内容区。

合并 #506(refactor(ui): 精简多语言文案 + 设置/风格/市场界面与图标重构):
精简 en/ja/ko/zh-CN/zh-TW 过长功能描述文案,
风格包卡片与编辑器抽屉改用 framer-motion 进出动效,
Settings/Marketplace/shared/Icon 界面重构。

本次只动版本号,逻辑改动已在 #503 #505 #506 落盘。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant