avo 2.11.3.pre.2 → 2.11.3.pre.3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of avo might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a4af2bced12108d7f563a575286b2406816c124175702899f292ff70f037a1b2
4
- data.tar.gz: 5dabe5c91bec202127a43a8314344fdf7e9b9dc6d44eb707df3deaf4bfac9cf3
3
+ metadata.gz: 33a3f78d32b04247f263b94f22dcfbc0e825e3ea99a311c1642866b30a46524f
4
+ data.tar.gz: 7344cfbc9197ac2537003045a2ab340165ba4964b095ef914e6ca49852881373
5
5
  SHA512:
6
- metadata.gz: 4b80c8c9697ac3e295b020e3441544ea333fbd31ec21d8fe051cb5385d164cd7a991f714b1ad6c0e19a08bffcaa0eba66b8f1f32f177b49e7f4a6bc1a85ef575
7
- data.tar.gz: b77b943063b6830d8371cc09748c85e7c7fef75fbcf4574c53d01cc2af956f510cbfdc2d0381f6cd41ceb38266ff1f226ead36a6ed37061bcd83256a6d256538
6
+ metadata.gz: 25e7ee4600617e4786e3b0c43e6b1f03fa4e3e14ab861745d5c9915352cdeb2c66e4d1444ebf1e834c6cb82fea7d854f3440b274ca90a946630279370928cc69
7
+ data.tar.gz: 4363ffce5ed2b2172d0c992d98dd8c9bcc8c68e82e7e48dfec8040efe877f8b2aab9203e538110f1ac3a2f77fa2f2d90caa573fc24f7eddc6af6f619da791966
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- avo (2.11.3.pre.2)
4
+ avo (2.11.3.pre.3)
5
5
  active_link_to
6
6
  addressable
7
7
  breadcrumbs_on_rails
@@ -17,17 +17,17 @@
17
17
  <%= t('avo.attach_item', item: singular_resource_name).capitalize %>
18
18
  <% end %>
19
19
  <% end %>
20
- <% end %>
21
- <% if can_see_the_actions_button? %>
22
- <%= render Avo::ActionsComponent.new actions: @actions, resource: @resource, view: @view %>
23
- <% end %>
24
- <% if can_see_the_create_button? %>
25
- <%= a_link create_path,
20
+ <% if can_see_the_actions_button? %>
21
+ <%= render Avo::ActionsComponent.new actions: @actions, resource: @resource, view: @view %>
22
+ <% end %>
23
+ <% if can_see_the_create_button? %>
24
+ <%= a_link create_path,
26
25
  icon: 'heroicons/outline/plus',
27
26
  'data-target': 'create',
28
27
  style: :primary,
29
28
  color: :primary do %>
30
- <%= t('avo.create_new_item', item: singular_resource_name.downcase ) %>
29
+ <%= t('avo.create_new_item', item: singular_resource_name.downcase ) %>
30
+ <% end %>
31
31
  <% end %>
32
32
  <% end %>
33
33
  <% c.body do %>
@@ -5,9 +5,11 @@
5
5
  selected_resources: [@resource.model.id],
6
6
  **@resource.stimulus_data_attributes
7
7
  } do %>
8
- <div class="mb-6">
9
- <%= render Avo::CardsListComponent.new parent: @resource %>
10
- </div>
8
+ <% if @resource.cards.present? %>
9
+ <%= content_tag :div, class: "mb-6" do %>
10
+ <%= render Avo::CardsListComponent.new parent: @resource %>
11
+ <% end %>
12
+ <% end %>
11
13
  <%= render Avo::PanelComponent.new(title: title, description: @resource.resource_description, display_breadcrumbs: @reflection.blank?, index: 0, data: { panel_id: "main" }) do |c| %>
12
14
  <% c.tools do %>
13
15
  <% if @reflection.present? && @resource.model.present? %>
@@ -126,6 +126,7 @@ module Avo
126
126
  end
127
127
 
128
128
  def set_model
129
+ puts ["controller_name->", controller_name].inspect
129
130
  @model = eager_load_files(@resource, @resource.class.find_scope).find params[:id]
130
131
  end
131
132
 
@@ -7,7 +7,7 @@ module Avo
7
7
  before_action :set_related_resource, only: [:show, :index, :new, :create, :destroy, :order]
8
8
  before_action :set_reflection_field
9
9
  before_action :set_related_model, only: [:show, :order]
10
- before_action :hydrate_related_resource, only: [:show, :index, :new, :create, :destroy, :order]
10
+ before_action :hydrate_related_resource, only: [:show, :index, :create, :destroy, :order]
11
11
  before_action :set_reflection
12
12
  before_action :set_attachment_class, only: [:show, :index, :new, :create, :destroy, :order]
13
13
  before_action :set_attachment_resource, only: [:show, :index, :new, :create, :destroy, :order]
data/lib/avo/base_card.rb CHANGED
@@ -69,7 +69,7 @@ module Avo
69
69
  if parent_is_dashboard?
70
70
  Avo::App.view_context.avo.dashboard_card_path(dashboard.id, id, turbo_frame: turbo_frame, index: index, range: enforced_range, **params.permit!.to_h)
71
71
  elsif parent_is_resource?
72
- Avo::App.root_path(paths: ["resources", parent.route_key, parent.model.id, "cards", id], query: {turbo_frame: turbo_frame, index: index, range: enforced_range, **params.permit!.to_h})
72
+ Avo::App.root_path(paths: ["resources", parent.route_key, parent.model.id, "cards", id], query: {**params.permit!.to_h, turbo_frame: turbo_frame, index: index, range: enforced_range})
73
73
  end
74
74
  end
75
75
 
@@ -87,14 +87,13 @@ module Avo
87
87
  }
88
88
 
89
89
  classes_for_rows = {
90
- 1 => " min-h-[9rem] row-span-1",
91
- 2 => " min-h-[18rem] row-span-2",
92
- 3 => " min-h-[27rem] row-span-3",
93
- 4 => " min-h-[36rem] row-span-4",
94
- 5 => " min-h-[45rem] row-span-5",
95
- 6 => " min-h-[54rem] row-span-6"
90
+ 1 => " min-h-[8rem] row-span-1",
91
+ 2 => " min-h-[16rem] row-span-2",
92
+ 3 => " min-h-[24rem] row-span-3",
93
+ 4 => " min-h-[32rem] row-span-4",
94
+ 5 => " min-h-[40rem] row-span-5",
95
+ 6 => " min-h-[48rem] row-span-6"
96
96
  }
97
- # puts ["cols->", cols, classes_for_cols, classes_for_rows, classes_for_cols[cols.to_i]].inspect
98
97
 
99
98
  result += classes_for_cols[cols.to_i] if classes_for_cols[cols.to_i].present?
100
99
  result += classes_for_rows[rows.to_i] if classes_for_rows[rows.to_i].present?
@@ -24,10 +24,11 @@ module Avo
24
24
 
25
25
  def chartkick_options
26
26
  card_height = 128
27
- card_heading = 30
27
+ card_heading = 32
28
28
 
29
29
  default = {
30
- # figure our the available height for the chart
30
+ # figure our the available height for the chart.
31
+ # It's not ideal to work with magic numbers, I know.
31
32
  height: "#{(rows * card_height) - card_heading}px",
32
33
  colors: %w[#0B8AE2 #34C683 #2AB1EE #34C6A8],
33
34
  library: {
data/lib/avo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Avo
2
- VERSION = "2.11.3.pre.2" unless const_defined?(:VERSION)
2
+ VERSION = "2.11.3.pre.3" unless const_defined?(:VERSION)
3
3
  end
@@ -6699,30 +6699,6 @@ trix-editor .attachment__metadata .attachment__size {
6699
6699
  max-height:100%
6700
6700
  }
6701
6701
 
6702
- .min-h-\[9rem\]{
6703
- min-height:9rem
6704
- }
6705
-
6706
- .min-h-\[18rem\]{
6707
- min-height:18rem
6708
- }
6709
-
6710
- .min-h-\[27rem\]{
6711
- min-height:27rem
6712
- }
6713
-
6714
- .min-h-\[36rem\]{
6715
- min-height:36rem
6716
- }
6717
-
6718
- .min-h-\[45rem\]{
6719
- min-height:45rem
6720
- }
6721
-
6722
- .min-h-\[54rem\]{
6723
- min-height:54rem
6724
- }
6725
-
6726
6702
  .min-h-\[8rem\]{
6727
6703
  min-height:8rem
6728
6704
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avo
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.11.3.pre.2
4
+ version: 2.11.3.pre.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Marin