Seerden / Rack

Exercise tracking
0 stars 0 forks source link

`Tooltip`: consider connecting elements to handlers #25

Open Seerden opened 2 years ago

Seerden commented 2 years ago

[WIP]

Intent

Currently, the Tooltip component is not inherently connected to anything. We pass it a handler and presume that this handler interacts with the Tooltip.

In the current only use case (see components/Workout/NewWOrkout/sub/NewExercise), the tooltip works as follows:

In this implementation, the trigger button, Tooltip, and render condition, are implemented completely separately.

I'm wondering if there is a way to rework the tooltip functionality so that we can get the necessary state, handlers and element from one place instead of having to manually define these things everywhere.

Trade-offs