Commit 4141851
authored
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
1 parent 7d3d1ec commit 4141851
3 files changed
Lines changed: 97 additions & 41 deletions
File tree
- packages/devtools_app
- release_notes
- test/screens/debugger
Lines changed: 61 additions & 40 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
39 | 63 | | |
40 | 64 | | |
41 | 65 | | |
| |||
46 | 70 | | |
47 | 71 | | |
48 | 72 | | |
49 | | - | |
50 | | - | |
| 73 | + | |
| 74 | + | |
51 | 75 | | |
52 | 76 | | |
53 | 77 | | |
| |||
79 | 103 | | |
80 | 104 | | |
81 | 105 | | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
110 | 130 | | |
111 | 131 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
120 | 140 | | |
121 | 141 | | |
122 | 142 | | |
| |||
248 | 268 | | |
249 | 269 | | |
250 | 270 | | |
251 | | - | |
252 | | - | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
253 | 274 | | |
254 | 275 | | |
255 | 276 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
Lines changed: 35 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
129 | 164 | | |
0 commit comments