Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

弹出窗口的体验优化 #93

Open
wuyu8512 opened this issue Feb 25, 2022 · 4 comments
Open

弹出窗口的体验优化 #93

wuyu8512 opened this issue Feb 25, 2022 · 4 comments
Labels
enhancement New feature or request 🙋help wanted 就等你一个pr了!

Comments

@wuyu8512
Copy link
Member

wuyu8512 commented Feb 25, 2022

设计一种模式
使弹出窗口后网页跳转到新路由
窗口关闭后路由后退
弹出窗口时,如果检测到后退行为,关闭窗口

不管是用组合式Api还是封装一个新组件都可以

行为上可以参考推特首页的发推功能,微博的图片预览也有类似功能

@wuyu8512 wuyu8512 added enhancement New feature or request 🙋help wanted 就等你一个pr了! labels Feb 25, 2022
@Inori-Lover
Copy link
Contributor

Inori-Lover commented Mar 6, 2022

移动端的发推看起来跟跳转了也没啥区别,节点已经卸载了。

应该是指(PC端的)图片查看的功能?(萌百也有类似体验

  1. 点击图片后,背景列表节点保留
  2. 弹出组件展示对应媒体
  3. 如果在列表点击媒体,弹出后刷新,刷新后的页面背景依然是列表,能自动弹出对应媒体弹层;推文详情同理
  4. 列表触发弹层,刷新后不保证媒体所属对应推文仍在列表
  5. 如果将链接复制到新窗口打开,会跳转到对应的推文详情页,且自动改写路由为详情页面路由、不带图片弹出指令的版本

据此简单做个初步推测:框架以最新两层路由做判断、展示,当且仅当有两层路由且前一层路由是对应的推文详情orhome时,能正常支持刷新、回退,背景组件根据倒数第二个路由做判断展示;否则replace当前路由为常规的推文详情路由

@cyb233
Copy link
Contributor

cyb233 commented Mar 6, 2022

移动端的发推看起来跟跳转了也没啥区别,节点已经卸载了。

应该是指(PC端的)图片查看的功能?(萌百也有类似体验

是指PC端的发推吧
image
image

@wuyu8512
Copy link
Member Author

wuyu8512 commented Mar 7, 2022

是指PC端的发推吧

是的

@wuyu8512
Copy link
Member Author

这个issues在action里自动生成的安卓apk里有提供支持,纯web需要做另外一套方案

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 🙋help wanted 就等你一个pr了!
Projects
None yet
Development

No branches or pull requests

3 participants