Repository navigation
fix: 汇总框与表格同宽,重录演示 GIF - #3
Merged
Merged
Conversation
- scan 的 rich 输出里,底部汇总框原来用 Panel.fit 按内容宽度收缩,比上面的 表格窄一截,两段边框看着是错开的。改为按表格宽度对齐(表格比终端宽时取终端宽)。 - 新增回归测试 test_scan_summary_panel_aligns_with_table,直接比较两条底边长度。 - 演示 GIF 用 118 列重录:之前 94 列放不下 4 列表格,证据列折行导致表格错位。 现在每行单行、表格与汇总框左右齐平。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
演示里表格和底部汇总框没对齐,看着不齐整。
两个原因,都修了:
scan的 rich 输出用Panel.fit,宽度按内容收缩,天然比表格窄一截,两段边框左右不齐。改动
cli.py:汇总框宽度改成跟表格一致(表格比终端宽时取终端宽)。test_scan_summary_panel_aligns_with_table:直接比较表格底边和汇总框底边的长度,不一样就失败。docs/demo.gif用 118 列重录,表格每行单行不折。验证
pytest57 passed(新增 1 个),ruff check/format通过。