yoyurec / logseq-awesome-styler

🎨 Totally customizable theme with presets: colors, backgrounds, fonts and sizes, etc... Logseq plugin
MIT License
183 stars 9 forks source link

Query table calculation block gets hidden behind longer tables #23

Closed georgd closed 2 years ago

georgd commented 2 years ago

Info:

Description: You can have a block with calculations for the values from a query table, sitting directly below the table with something like this:

- weight.date:: [[2022-06-27]]
  weight.time:: 10
  weight.kg:: 67
- weight.date:: [[2022-06-27]]
  weight.time:: 11
  weight.kg:: 68 
- {{query((and (property weight.date) (property weight.time) (property weight.kg) ))}}  
    - "weight.kg (min): " {{function((min :weight.kg))}}  
    - "weight.kg (max): " {{function((max :weight.kg))}}  
    - "weight.kg (diff): " {{function((- (max :weight.kg) (min :weight.kg)))}}  
    - "weight.kg (count): " {{function((count :weight.kg))}}  
    - "weight.kg (average): " {{function((average :weight.kg))}}  

When the table gets longer, at some point the calculation block starts scrolling behind the table. When it is very long, the block won’t be visible at all.

To Reproduce:

Take above example and add more measures. With these the table will get so long that the block below won’t be visible:

- monday
    - weight.date:: [[2022-06-27]]
      weight.time:: 10
      weight.kg:: 67
    - weight.date:: [[2022-06-27]]
      weight.time:: 11
      weight.kg:: 68
    - weight.date:: [[2022-06-27]]
      weight.time:: 12
      weight.kg:: 69
    - weight.date:: [[2022-06-27]]
      weight.time:: 13
      weight.kg:: 70
- tuesday
    - weight.date:: [[2022-06-28]]
      weight.time:: 10
      weight.kg:: 73
    - weight.date:: [[2022-06-28]]
      weight.time:: 11
      weight.kg:: 74
    - weight.date:: [[2022-06-28]]
      weight.time:: 12
      weight.kg:: 75
    - weight.date:: [[2022-06-28]]
      weight.time:: 13
      weight.kg:: 76
- wednesday
    - weight.date:: [[2022-06-29]]
      weight.time:: 10
      weight.kg:: 75
    - weight.date:: [[2022-06-29]]
      weight.time:: 11
      weight.kg:: 73
    - weight.date:: [[2022-06-29]]
      weight.time:: 12
      weight.kg:: 71
    - weight.date:: [[2022-06-29]]
      weight.time:: 13
      weight.kg:: 70

Expected behavior: The block should always be visible.

yoyurec commented 2 years ago

which plugin used for calculations?

yoyurec commented 2 years ago

image

georgd commented 2 years ago

No plugin used. That's built in in logseq.

Yuriy Piskun @.***> schrieb am Sa., 25. Juni 2022, 11:06:

which plugin used for calculations?

— Reply to this email directly, view it on GitHub https://github.com/yoyurec/logseq-solarized-extended-theme/issues/23#issuecomment-1166234665, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABUH4VG2BENA3IHKYY4GHDVQ3DZHANCNFSM5ZYZZ7UQ . You are receiving this because you authored the thread.Message ID: @.***>

yoyurec commented 2 years ago

i have query error (

georgd commented 2 years ago

I remember having seen this, too, but then it was some issue with formatting which happened when copy/pasting from one page to another. I’m attaching my testfile here.

Test.md

yoyurec commented 2 years ago

oh, now no query error! can you also attach screen with issue? not 100% clear.... can suggest it's "sticky level1 item"? image

georgd commented 2 years ago

Keeping monday only, the table looks like this:

image

With monday and tuesday, the calculation blocks can be scrolled up and down behind the table:

image

With all of wednesday, the blocks are completely hidden behind the table:

image

yoyurec commented 2 years ago

try update v1.12.6

georgd commented 2 years ago

Great, that fixed it. Thanks!

yoyurec commented 2 years ago

Awesome!