equinor / energyvision

Home of the equinor.com website
https://www.equinor.com
MIT License
34 stars 8 forks source link

Look into image ratios #2513

Open BorghildSelle opened 1 month ago

BorghildSelle commented 1 month ago

in the ratios we have three_to_ten, which is then actually 3:10. But we use it like 10:3, which should be written like ten_to_three.

Fix the that the images that should have three_to_ten(3:10) use the 3:10. If some images should have 10:3, use ratio ten_to_three

Look into the images that should be 16:9/aspect-video to have sixteen_to_nine(16:9)

Look into which images should have 9:16(nine_to_sixteen)

Check that names and ratio matches

VarunVAshrit commented 1 month ago

Consider the ratio three_to_ten which is 3:10 and the value will be 3/10 = 0.3. But if we consider "full width image" component, in the groq query it says 10:3 but in the component it is three_to_ten. Even in sanity it says { title: '10:3', value: 0.3 }, here if we use the same logic ten_to_three will be 10:3 and the value will be 10/3 = 3.333 but in sanity for the ratio 10:3 the value is 0.3.

BorghildSelle commented 3 days ago

The ratios would have to be fixed in sanity as well then to reflect correct name to value, but it would require an migration script for production maybe, so we will put this back into the backlog for when we have more time on our hands