-
Notifications
You must be signed in to change notification settings - Fork 29.7k
The Draggable able change cursor on dragging #93733
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This PR adds to the Draggable new parameter, the feedbackCursor, which changes a cursor when a pointer over the feedback widget. This is necessary because the feedback becomes invisible to the hit test, which means that the cursor cannot be redefined further down of the widget tree. Fix flutter#92083
|
|
||
| /// The mouse cursor for mouse pointers that are over the [feedback]. | ||
| /// | ||
| /// When a mouse is over the [feedback], its cursor will be changed to the [cursor]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be redundant with the first sentence?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be redundant with the first sentence?
Rewrote, I hope it will be cleaner.
| /// | ||
| /// When a mouse is over the [feedback], its cursor will be changed to the [cursor]. | ||
| /// | ||
| /// The [cursor] defaults to [MouseCursor.defer] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cursor -> feedbackCursor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cursor -> feedbackCursor?
Fixed 😨
|
Looks like the docs check is also unhappy, can you take a look please? |
Now it should be better. I hope. |
| await _testChildAnchorFeedbackPosition(tester: tester, left: 100.0, top: 100.0); | ||
| }); | ||
|
|
||
| testWidgets('Drag feedback change cursor correctly', (WidgetTester tester) async { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small one, but I would say that there is an s missing.
changes should be the correct spelling 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I will be more careful next time. 😓
| /// The data that will be dropped by this draggable. | ||
| final T? data; | ||
|
|
||
| /// The cursor for a mouse pointer when the pointer is over the [feedback]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean when the pointer is hovering over the feedback, the child or both? Or is it specific to when drag is active? Can you add more docs here to explain? Thanks!
|
I see this comment in an email about this change, but not here:
Good point! I don't think it would be wasteful to clarify this is the documentation. Currently, it says:
I think the over part might be what is confusing. If the feedback widget is only visible when drag is active, when would the pointer not be over it? Making this a little clearer and easier to understand is what I was suggesting. :) |
|
@Piinks as discussed in triage, can you pick this up and close it? |
This PR adds to the Draggable new parameter, the feedbackCursor, which changes a cursor when a pointer over the feedback widget. This is necessary because the feedback becomes invisible to the hit test, which means that the cursor cannot be redefined further down of the widget tree.
Fix #92083
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.