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

Feat/fullscreen 排行页面全屏模式 #296

Merged
merged 4 commits into from Dec 13, 2021
Merged

Feat/fullscreen 排行页面全屏模式 #296

merged 4 commits into from Dec 13, 2021

Conversation

sheason2019
Copy link
Contributor

@sheason2019 sheason2019 commented Dec 9, 2021

这个PR是为了解决这个issue里提出的问题:issue - #264

具体的操作是在排行的AppBar上增加了一个全屏按钮,如下图所示。

Screenshot_2021-12-09-16-34-24-738_com perol pixez

点击全屏按钮后,Appbar和BottomNavigator将会收起,从而提供更大的内容展示空间。

Screenshot_2021-12-09-16-34-32-375_com perol pixez

此时右下角会浮起一个FAB,用户可以通过点击FAB退出全屏模式。

主要修改就是以上这些。

第一次给别人的仓库提PR,如果有什么做的不对的地方请大佬多多包涵哈,我会积极跟进修改的。

@sheason2019
Copy link
Contributor Author

有个bug:第一次切换全屏的时候会丢失当前浏览进度回到页面顶部,需要修改一下切换全屏时的逻辑

@Notsfsssf
Copy link
Owner

👍看起来很赞,周末我会试试的

@Notsfsssf
Copy link
Owner

效果看起来很不错,但是缺在hello_page上的实现,rankstore我觉得没必要专门搞个单例的写法专门暴露给hello page
fullscreen应该是相对于主页的状态而不是rank的状态
比如用户点了rank 页面的full screen,应当是作为一个event抛给hello page,full screen这个状态是hello page
遵守往下传的是状态,往上传的是事件,目前的解决方法比较暴力,为了方便做的话把所有store都给首页的话就太耦合了

@sheason2019
Copy link
Contributor Author

哦哦,我懂了!按照你说的这个架构实现全屏的话,其实根本就不需要mobX管理状态就可以实现,只需要从hello page传递一个参数和一个事件下去就好了。
这样不仅便于理解,还可以实现单项数据流的结构。
雀食应该这么写,有空的时候我用这个思路实现一下,感觉相比现在master的改动会比现在这种写法少很多。
谢谢指导👍

@sheason2019
Copy link
Contributor Author

已经用Props和事件把功能重构了,现在PR里已经没有对store文件的修改了。

@Notsfsssf Notsfsssf merged commit 596688e into Notsfsssf:master Dec 13, 2021
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.

None yet

2 participants