coding-blocks / coding-blocks/codingblocks.online.projectx
We need to scroll to the top of the page, when showing pages
- 主要语言
- JavaScript
- 星标
- 31
- 派生
- 102
- PR 合并指标
- 30 天内没有已合并 PR
描述
By Default, the scroll position is preserved while transitioning routes. However, at times this isn't the desired behaviour.
We need to scroll to top for the following pages:
- [ ] Home
- [ ] All Courses
- [ ] My Courses
- [ ] Course Timeline (Course Overview)
- [ ] Course/:id
### How ?
Use [ember-router-scroll](https://github.com/dollarshaveclub/ember-router-scroll) plugin, and use the mixin at the mentioned routes.
Don't `window.scrollTop(0, 0)` in beforeModel or similar hook. This will not preserve scroll position when using browser's back button. #DontBreakTheWeb
贡献指南
这个仓库没有索引到贡献指南
调研方向
首先定位 Home、All Courses、My Courses、Course Timeline 和 Course/:id 的路由定义。阅读 ember-router-scroll 文档,并确定其 mixin 如何应用于这些路由;完成的标准是这些页面滚动到顶部,同时浏览器的后退导航保留之前的位置。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- frontend, web-dev
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100