victronenergy / venus-html5-app

HTML5 App including Javascript library that communicates with Venus OS over MQTT websockets
MIT License
98 stars 32 forks source link

Convert tank gauges to table #367

Open fwaalkens opened 3 months ago

fwaalkens commented 3 months ago

Problem: Tank names vary in length, because of this we hack around it by truncating/giving it a fixed width for the first column, this solution is suboptimal for the vast amount of mfd resolutions.

image

Solution: Put the tanks in a table, with this solution the first column width will be determined by the longest tank name.

image

Additional challenges: These components are wrapped by a paginator component that expects multiple children (the tanks). The paginator breaks when wrapping the children with a table component.

See experiment in this branch: https://github.com/victronenergy/venus-html5-app/tree/temp/refactor-tank-gauges-to-table