Skip to content

[Feature] Snapping support for RangeSelectorΒ #3473

@hansmbakker

Description

@hansmbakker

Use case

I am looking for a way to edit the timing schema of tasks within a project (like a simple version of a Gantt chart). Some tasks should

  • start at the same time as other tasks (parallel execution)
  • start at the time another task ends (dependency on other task)

Describe the problem this feature would solve

I thought to use the multiple RangeSelector instances below each other to configure the TimeSpans of task executions.

In order to express the relations between start / end times of these tasks, I would like to have snapping support for the RangeSelector as in the drawing below:
image

Suggested technical solution

  • Bindable properties:
    • Snapping values should be a bindable list of numerical values.
    • The snapping distance should be a configurable / bindable numerical value.
    • The breaking distance should be a configurable / bindable numerical value.
  • Main behavior
    • When one of the Thumbs comes within the configured distance from one of the snapping values, that Thumb should snap to it (assume the closest snapping value).
    • When the user pulls further and the "dragging force" becomes too large (delta between pointer and Thumb becomes larger higher than the breaking distance), the dragged Thumb should assume the pointer position again
  • Feedback to user: when it snaps,
    • the thumb that is being dragged could blink / become larger shortly
    • the control could emit an event that allows the programmer to give feedback to the user
      • show the user what triggered the snapping / what value was triggered so that the user could see the relation between things
      • sound or vibration implemented in consuming app rather than in control
    • the control could make a snapping sound
    • the control could generate a short vibration if the device supports it

Describe alternatives you've considered

If anybody has a better way of editing the timing schema of tasks within a project, I would be curious to hear about it :)

If there is a way to make a simple, draggable, horizontal bar chart that would also help

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions