mstenta / farm_crop_plan

Crop plan type and related features for farmOS. (ALPHA 3.x IN DEVELOPMENT)
https://drupal.org/project/farm_crop_plan
GNU General Public License v2.0
5 stars 1 forks source link

Render timeline rows as SVGs #7

Closed mstenta closed 4 months ago

jgaehring commented 4 years ago

As I've been prototyping the timeline elements, particularly the drop-down form idea, it occurs to me that another possibility is to just use div's in absolute positioning. Since everything is boxes and right angles, and we shouldn't ever have a need for diagonals or curves or anything like that (as far as I know?), seems like a feasible option.

To my mind, one of the primary benefits of SVG is that it puts everything into a straight-forward coordinate system, with x and y axes, which will make it more flexible and predictable, though perhaps a little more verbose. But if we're just using boxes and rows, I think absolute positioning could achieve the same effect. Or maybe not even absolute positioning, but just nested flexbox divs, or some combination.

The other concern that comes to mind is accessibility, particularly if we're going to embed form elements into the chart. That could be tricky no matter how we do it, but especially with SVG. We'd have to make each row its own <svg> element, perhaps, and/or overlay the form with absolute positioning. Seems messy.

All things to consider when we weight the options.

mstenta commented 4 months ago

Update: we just released the first "alpha" of the v3 crop plan module. The 3.x branch uses the svelte-gantt library for the timeline visualization. This library does not use SVGs, but provides a lot of nice features - and we've only explored some of the basics in this first pass.

I'm going through and cleaning up old issues, so I'm going to close this one. Looking forward to working with the community to identify next steps! See this forum topic: https://farmos.discourse.group/t/farmos-crop-plan-module-v3-alpha-release/1934