devtools
41418513 - Fix long string overlay in debugger Variables panel (#7112) (#9745)

Commit
22 days ago
Fix long string overlay in debugger Variables panel (#7112) (#9745) this PR fixes issue #7112 In the debugger Variables panel, when a variable's value is a long string (e.g. a URL), it was wrapping to the next line and visually overlaying the next item's controls. The TreeView uses a fixed row height of 20px via itemExtent, but `Text.rich` widgets inside `DisplayProvider` and `DapDisplayProvider` had no single-line constraint. now this issue is fixed by adding `maxLines: 1`, `softWrap: false`, `overflow: TextOverflow.ellipsis` to all relevant `Text.rich` widgets. Literal newlines are replaced with `\\n` for visibility and values are wrapped in DevToolsTooltip so the full value is accessible on hover. A widget test was added in `test/screens/debugger/debugger_screen_dap_variables_test.dart` that pumps a DAP variable node with a 1000-character value and asserts single-line truncation properties and the tooltip carrying the full value. before this fix Long URL wraps to next line, overlaying next item's controls <img width="472" height="124" alt="image" src="https://github.com/user-attachments/assets/abada05b-ccb0-458c-a6b0-26f12c9175ad" /> after this fix Long URL truncated with ... on a single line, hover shows full value screenshot for reference <img width="538" height="590" alt="image" src="https://github.com/user-attachments/assets/c6c3f2ee-efe9-4d7c-afc5-9d7894ca407f" /> ### General checklist ### Issues checklist ### Tests checklist ### AI-tooling checklist * [ ] I read the [AI contributions guidelines] and agree to follow them. * [ ] I reviewed all AI-generated code before opening this PR. * [ ] I understand and am able to discuss the code in this PR. * [ ] I have verifed the accuracy of any AI-generated text included in the PR description. * [ ] I commit to verifying the accuracy of any AI-generated code or text that I upload in response to review comments. ### Feature-change checklist * [ ] I added the `release-notes-not-required` label or left a comment requesting the label be added. * [ ] I added an entry to `packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md`. * [ ] I included before/after screenshots and/or a GIF demo of the new UI to my PR description. * [ ] I ran the DevTools app locally to manually verify my changes. ![build.yaml badge] If you need help, consider asking for help on [Discord]. [`contributions-welcome`]: https://github.com/flutter/devtools/issues?q=state%3Aopen%20label%3Acontributions-welcome [`good-first-issue`]: https://github.com/flutter/devtools/issues?q=state%3Aopen%20label%3Agood-first-issue [build.yaml badge]: https://github.com/flutter/devtools/actions/workflows/build.yaml/badge.svg
Author
Parents
Loading