Skip to content

Conversation

@RafaelSeSouza
Copy link

@RafaelSeSouza RafaelSeSouza commented Jun 13, 2022

Context

Swayze should allow for fill operations:

  • The user can drag a small box on the end of the selection to fill nearby cells based on the selections values.
  • The user may double click on the handler and the app will figure out which cells it should fill based on their own rules.

Approach

  • Added flag to SwayzeConfig to enable the fill operations, if the user so desires.
  • Added a style for the fill operations (drag and drop, handle, etc).
  • Added a new type FillSelectionModel and FillSelectionState to handle the fill selections.
  • Added a fillSelection notified on SwayzeSelectionController to keep track of the current fill selection.
  • Added FillIntoTargetIntent and FillIntoUnknownIntent that can be used by the applications to add the fill logic.
  • Added an evaluateHover method to ViewportContext to 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.
  • Changed TableBodyGestureDetector to 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.
  • Added cursor evaluation to MouseHoverTableBody, so that the cursor can change on top of the drag and fill handle.
  • Added a FillSelection widget to paint the fill selections.

@RafaelSeSouza RafaelSeSouza requested a review from canastro June 14, 2022 17:13
@RafaelSeSouza RafaelSeSouza marked this pull request as ready for review June 17, 2022 18:24
Copy link

@victorbotamedi victorbotamedi left a 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?

@RafaelSeSouza RafaelSeSouza requested review from victorbotamedi and removed request for canastro June 22, 2022 13:56
@RafaelSeSouza RafaelSeSouza merged commit 6928d7d into develop Jun 23, 2022
@RafaelSeSouza RafaelSeSouza deleted the feat/cell-drag-fill branch June 23, 2022 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants