Bug - LogViewer - Doesn't maintain scroll position when wrap text prop changes
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- typescript
- 领域
- frontend
调研方向
Start with the LogViewer implementation and reproduce the issue in the PatternFly demo at the linked complex-toolbar URL: scroll to a later line, then toggle Wrap Text. Trace the rerender and confirm that the fix preserves the same log location after wrapping changes, then verify the reproduction no longer returns to line 1.
由索引模型根据 Issue 内容生成。
描述
Describe the problem
A clear and concise description of the problem. Which components are affected?
I'm using the log viewer component. When I scroll to a particular line, say line 100 > then toggle the value of wrap text > the component re-renders and I'm taken to line 1.
You can see this behavior in the demo here: https://www.patternfly.org/v4/extensions/log-viewer#with-complex-toolbar
How do you reproduce the problem?
Provide steps to reproduce. A codepen or codesandbox demonstrating the problem is appreciated.
- Go to this demo: https://www.patternfly.org/v4/extensions/log-viewer#with-complex-toolbar
- Scroll to a line, say line 100
- Toggle the value of the
Wrap Textcheckbox - You are taken to line 1
Expected behavior
A clear and concise description of the expected behavior.
Even after toggling the value of wrap text, the scroll position should be the same.
This is important because if the user arrives at a log line much after line 1, say something like 1000, tries to read the log by wrapping the text, and is taken to the 1st line, it will be very cumbersome for the user to find / arrive to the same line again in case they don't remember the line number.
Is this issue blocking you?
List the workaround if there is one.
I couldn't find a workaround.
Screenshots
If applicable, add screenshots to help explain the issue.
What is your environment?
-
OS: Mac OS
-
Browser: Firefox
What is your product and what release date are you targeting?
I'm not sure I'm at liberty to disclose this information.
Any other information?
Jira Issue: PF-2009
- 主要语言
- TypeScript
- 星标
- 34
- 派生
- 19
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
patternfly/react-log-viewer 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 67/100
patternfly/react-log-viewer#106 ·
-
难度 3/5 1-2 天 新手友好度 45/100
patternfly/react-log-viewer#101 ·
-
难度 3/5 1-2 天 新手友好度 25/100
patternfly/react-log-viewer#98 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 25/100
patternfly/react-log-viewer#95 · 2 条评论 ·
-
难度 3/5 1-2 天 新手友好度 35/100
patternfly/react-log-viewer#91 · 1 条评论 ·
查看 patternfly/react-log-viewer 的全部 Issue
相似的 Issue
-
documentation
难度 2/5 1-3 小时 新手友好度 88/100
inu-appcenter/memorIN-frontend#106 ·
维护者通常 1 天内回复
-
kind/bug
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 7 天内回复
-
[Bug] @deck.gl/arcgis dist import resolves to unpublished @deck.gl/core source path (9.3.11, 9.4.0)未关闭
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
CSCfi/sd-search-ui#145 ·
维护者通常 1 天内回复
-
check:passed streams:add
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复