Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Property Editor] Use the widget's starting position to create the key for the Property Editor#9087

Merged
elliette merged 4 commits intoflutter:masterfrom
elliette:issue-9031-2
Apr 2, 2025
Merged

[Property Editor] Use the widget's starting position to create the key for the Property Editor#9087
elliette merged 4 commits intoflutter:masterfrom
elliette:issue-9031-2

Conversation

@elliette
Copy link
Member

@elliette elliette commented Apr 1, 2025

Work towards #9031, #9035, #1948

In #8945, we added a key to the Property Editor inputs to determine whether or not to rebuild them in order to fix text field state retention issues.

The problem with this approach is that the property inputs completely rebuild when the property is edited, which means if you hit "enter" after editing a value in the text field, the focus is lost (see second bullet point in #9031).

This PR instead creates the input key using the location of the widget (along with other information) to determine whether the property is the same or not. The value is then updated with the TextEditingController.

Note: Requires this change in the Analysis Server to have a non-null range and therefore fix the focus issue. I've tested with both the Analysis Server change and without. Without the Analysis Server change the behavior is the same as it currently is (where hitting "enter" causes the input to lose focus). I would like to submit this now since we are close to the stable cut-off, and then once the required change is in the Flutter SDK we can update the Flutter SDK version in DevTools.

@elliette elliette requested a review from a team as a code owner April 1, 2025 20:34
@elliette elliette requested review from bkonyi and kenzieschmoll and removed request for a team and bkonyi April 1, 2025 20:34
@elliette elliette added release-notes-not-required autosubmit Merge PR when tree becomes green via auto submit App labels Apr 1, 2025
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Apr 1, 2025
@auto-submit
Copy link

auto-submit bot commented Apr 1, 2025

autosubmit label was removed for flutter/devtools/9087, because - The status or check suite Verify PR Release Note Requirements has failed. Please fix the issues identified (or deflake) before re-applying this label.

@elliette elliette merged commit a77b33e into flutter:master Apr 2, 2025
67 of 70 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants