maxpatiiuk / calendar-plus

A browser extension for Google Calendar that provides insights into where your time goes. Includes power user tools, data export and customization
https://chrome.google.com/webstore/detail/calendar-plus/kgbbebdcmdgkbopcffmpgkgcmcoomhmh
MIT License
6 stars 1 forks source link

Buttons to shrink or increase height malfunctioning #208

Open grantfitzsimmons opened 1 year ago

grantfitzsimmons commented 1 year ago

https://user-images.githubusercontent.com/37256050/227821361-a40ca40b-4a11-44f0-8575-f5742cbec781.mov

This could be user error, but it seems that the plus and minus do not make a major difference until some invisible point where it begins to grow in height. Outside of edit mode, this is not visible.

https://user-images.githubusercontent.com/37256050/227821467-acf55cbd-8109-4dc2-b484-ce5b48eb9927.mov

In this instance, the plus is not visually increasing the height, but reducing the height of the neighboring block. After another click, the height then increases, but other elements have been reduced in size.

maxpatiiuk commented 1 year ago

This is a side-effect of how the system layout system is designed. The same problem would plague sp7 form editor, except sp7 forms don't allow for explicitly picking row-span (as a workaround, we have panels that allow embedding multiple rows in a single row)

Here is why it happens: When a widget occupies full width, there is no other widget dictating what the row height should be - so it picks one automatically. Since the widget is tall enough to fit it's contents, as you add more rows, their height is close to zero. But, there is a 15 pixel gab between rows. Thus, after enough clicks on the + button, the height of all rows is still 0px, but the 15px gaps add up to start to dictate the height of the widget.

Solutions:

  1. Enforce some min row height
  2. Don't allow changing widget height when it is full width (though, there are other cases where this issue could happen)
  3. Don't allow changing height at all - and introduce "panels" like in sp7