-
Notifications
You must be signed in to change notification settings - Fork 23
Adds support for drag and fill. #16
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
Merged
Merged
Conversation
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
In the future, better to review the user cell model
canastro
reviewed
Jun 14, 2022
canastro
reviewed
Jun 14, 2022
canastro
reviewed
Jun 14, 2022
packages/swayze/lib/src/widgets/table_body/gestures/table_body_gesture_detector.dart
Show resolved
Hide resolved
canastro
reviewed
Jun 14, 2022
packages/swayze/lib/src/widgets/table_body/selections/primary_selection/primary_selection.dart
Outdated
Show resolved
Hide resolved
canastro
reviewed
Jun 14, 2022
packages/swayze/lib/src/widgets/table_body/selections/fill_selections/fill_selection.dart
Show resolved
Hide resolved
canastro
reviewed
Jun 14, 2022
packages/swayze/lib/src/widgets/table_body/selections/fill_selections/fill_selection.dart
Show resolved
Hide resolved
canastro
reviewed
Jun 14, 2022
packages/swayze/lib/src/widgets/table_body/selections/fill_selections/fill_selection.dart
Outdated
Show resolved
Hide resolved
packages/swayze/lib/src/core/controller/selection/selection_controller.dart
Outdated
Show resolved
Hide resolved
packages/swayze/lib/src/core/controller/selection/selection_controller.dart
Show resolved
Hide resolved
packages/swayze/lib/src/core/controller/selection/user_selections/fill_selection_state.dart
Outdated
Show resolved
Hide resolved
packages/swayze/lib/src/core/controller/selection/user_selections/fill_selection_state.dart
Outdated
Show resolved
Hide resolved
8246956 to
41328bf
Compare
1e8e448 to
7296fd7
Compare
nfsxreloader
approved these changes
Jun 21, 2022
packages/swayze/lib/src/widgets/table_body/selections/primary_selection/primary_selection.dart
Outdated
Show resolved
Hide resolved
packages/swayze/lib/src/widgets/table_body/selections/fill_selections/fill_selection.dart
Show resolved
Hide resolved
packages/swayze/lib/src/widgets/table_body/gestures/table_body_gesture_detector.dart
Show resolved
Hide resolved
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.
Whats the expected behavior with frozen panes?
packages/swayze/lib/src/core/controller/selection/user_selections/fill_selection_state.dart
Outdated
Show resolved
Hide resolved
packages/swayze/lib/src/core/controller/selection/user_selections/model.dart
Show resolved
Hide resolved
canastro
approved these changes
Jun 22, 2022
victorbotamedi
approved these changes
Jun 23, 2022
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.
Context
Swayze should allow for fill operations:
Approach
SwayzeConfigto enable the fill operations, if the user so desires.FillSelectionModelandFillSelectionStateto handle the fill selections.fillSelectionnotified onSwayzeSelectionControllerto keep track of the current fill selection.FillIntoTargetIntentandFillIntoUnknownIntentthat can be used by the applications to add the fill logic.evaluateHovermethod toViewportContextto make it easy to locate the handle for the fill operation, and maybe in the future easy the addition of new features. This will be optimized in future PRs.TableBodyGestureDetectorto create the fill selections when needed. Also fixed some bugs with pointer downs and drag starts competing. In the future, it would be nice to refactor this to have a central state that knows about what exactly is being done, so that these competing actions don't happen again.MouseHoverTableBody, so that the cursor can change on top of the drag and fill handle.FillSelectionwidget to paint the fill selections.