mensa 0.6.5 → 0.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 26fd935a365687d3697fba9e5e06f75c3a155d6e9422a747ef7d6b766833d411
4
- data.tar.gz: 9032b4e163d6c5134ea150eded49257f6f2961d42ec86eeb75cddb19e6d23a1a
3
+ metadata.gz: e66178b4b3d7f5431a1997a2abc5e2dcb048af8a5af7b5c7b865917ca9d0cb0f
4
+ data.tar.gz: cd6fd8240ac179b2b2376e05790b152064b9c6c0ab355726dfd125238ea58007
5
5
  SHA512:
6
- metadata.gz: bd33a7ddc5b40a802400ea2502d7d8e92f8f4089db08916d44442c3aa58cc504cab655d91f4429899669184bf152a744d825f8b414a2463efc595ceb50699d8b
7
- data.tar.gz: b471c31518be76619303f3e0ec763df42fba446b6ec0d2a2fa02c576ad941e050ad69a69569accd91bf13e7a98930a46e4576e155a84f9e998815ac7d86a4a2f
6
+ metadata.gz: b6fec9dc9274285bcaa1541b707960a57ec16a04b13344093916e9b980f09a803af34d3694fcb11a8158d9265f8a1d33f30584b49a50975c36c95beb6c7a3458
7
+ data.tar.gz: b82a1ce70210d3b70ef9c79d1b3c3e23f492b666f79714aea7731d13c4e178b51f25c1fb8dc50dc7a82190d0b37e47530dfc875ff6434f53e0e3661ec2104664
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mensa (0.6.4)
4
+ mensa (0.6.5)
5
5
  csv
6
6
  importmap-rails
7
7
  pagy (>= 43)
@@ -1,7 +1,7 @@
1
1
  .mensa-table {
2
2
  &__column_customizer {
3
3
  &__popover {
4
- @apply fixed z-50 w-96 max-h-96 rounded-xl bg-white dark:bg-gray-800 shadow-lg ring-1 ring-black ring-opacity-5 py-2;
4
+ @apply fixed z-50 w-96 max-h-96 overflow-y-auto rounded-xl bg-white dark:bg-gray-800 shadow-lg ring-1 ring-black ring-opacity-5 py-2;
5
5
  }
6
6
 
7
7
  &__heading {
@@ -58,9 +58,17 @@ export default class ColumnCustomizerController extends ApplicationController {
58
58
  const btn = this.element.querySelector("button");
59
59
  if (!btn) return;
60
60
  const rect = btn.getBoundingClientRect();
61
- this.popoverTarget.style.top = `${rect.bottom + 4}px`;
61
+ const gap = 4;
62
+ const viewportPadding = 16;
63
+ const maxHeight = Math.min(
64
+ 384,
65
+ window.innerHeight - rect.bottom - gap - viewportPadding,
66
+ );
67
+
68
+ this.popoverTarget.style.top = `${rect.bottom + gap}px`;
62
69
  this.popoverTarget.style.right = `${window.innerWidth - rect.right}px`;
63
70
  this.popoverTarget.style.left = "auto";
71
+ this.popoverTarget.style.maxHeight = `${Math.max(maxHeight, 160)}px`;
64
72
  }
65
73
 
66
74
  toggleVisibility(event) {
data/lib/mensa/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Mensa
2
- VERSION = "0.6.5"
2
+ VERSION = "0.6.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mensa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.5
4
+ version: 0.6.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom de Grunt