Scrolling for treetable needs position clamping to prevent overshooting
- 主要语言
- Dart
- 星标
- 1.7k
- 派生
- 404
- 平均合并
- 6 天 17 小时
- 30 天内合并 PR
- 18
描述
https://github.com/flutter/devtools/pull/4226/files#diff-7f63e0b64be4d80b632e5eefe1cac93308dff718f53fc1fe6e1db774ffd4e7a9R198
Current Problem: When autoscrolling for the treetable, if the index is near the maxScrollingExtent, it will overshoot and therefore create a bouncing animation.
Solution: By clamping the position to be between 0.0 - maxScrollExtent, this will make sure the scroll will stay in the appropriate range. However, maxScrollExtent is not updating after parents are expanded and before scrolling happens. Therefore, if an index is greater than the previous maxScrollExtent even if it is in range after parents are expanded, it still believes that the index is not in range and therefore not scroll to the correct position.
贡献指南
调研方向
从链接的 pull request diff 开始,重点查看第 198 行附近,并跟踪 treetable 的 autoscrolling 逻辑及其最大滚动范围的处理。复现接近末尾的滚动场景,并验证展开父节点后滚动仍保持在有效范围内,使用你找到的任何附近测试或现有的 treetable 测试入口。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- dart
- 领域
- frontend
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100