spina 2.8.0 → 2.8.1

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

Potentially problematic release.


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

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 60e477c26a90c7e5876407ea4bc4a9b6c8eb5bdaf62cf6b2f78b0e8871b7e40a
4
- data.tar.gz: d6446aec43971051ab378087288c3d678aaddae718e5e67661f677049f2f7538
3
+ metadata.gz: 0a33df1ad26733664c8c934c479127146e661c65b6fe1e891e9b781c7d939257
4
+ data.tar.gz: 5028f0dd43485690835a0b311c0b1d46140b0cd3127836cc6fb45cd654bb9a42
5
5
  SHA512:
6
- metadata.gz: 63a995ac088a0de8f95dd341dee59372ee862554f41b535d49ef81508997ea6cf2dc87613bbeb9f2b93812f77c9c934607c081adcea7c12eb2fe33b741d4dae3
7
- data.tar.gz: 46b3b9248d542995d40765547818e077676b7df50fa76926df415a54d432dc7487c89b09ab06fd63331983c7032a0f88d92e8da707d5a21332b64b1fc7beca0a
6
+ metadata.gz: 024007256c2f879a3153e82ae07bfa995177733f35c6456d9c7081b825d10a9bd98c3c8ac6efe8aa6150b2b581c4062737c875a9d44e797427a24026a0757b8b
7
+ data.tar.gz: 2a8cf99db2e2c1f594a98d460c5a9c870d88c4edf8fc9dc996b4e0aea16fbd544a4a3530349afb2ad39565c78ff527bdf010c6ac91ee789262ef214349f1b806
@@ -10,7 +10,7 @@ module Spina
10
10
  part = find_part(attributes[:name]) || attributes[:part_type].constantize.new
11
11
 
12
12
  # Copy all attributes to part
13
- %w(name title options).each do |attribute|
13
+ %w(name title hint options).each do |attribute|
14
14
  part.public_send("#{attribute}=", attributes[attribute.to_sym]) if part.respond_to?(attribute)
15
15
  end
16
16
 
@@ -13,7 +13,7 @@ module Spina
13
13
  signed_blob_id.present?
14
14
  end
15
15
 
16
- def signed_id
16
+ def signed_id(expires_in: nil)
17
17
  signed_blob_id
18
18
  end
19
19
 
@@ -5,8 +5,9 @@ module Spina
5
5
 
6
6
  attr_json_config(unknown_key: :strip)
7
7
 
8
- attr_json :title, :string
9
8
  attr_json :name, :string
9
+
10
+ attr_accessor :title, :hint
10
11
 
11
12
  def label
12
13
  content&.to_s
@@ -1,8 +1,9 @@
1
1
  <div class="mt-6" data-controller="attachment-picker">
2
2
  <label for="price" class="block text-sm leading-5 font-medium text-gray-700"><%= f.object.title %></label>
3
+ <div class="text-gray-400 text-sm"><%= f.object.hint %></div>
3
4
 
4
5
  <%= f.hidden_field :signed_blob_id, data: {attachment_picker_target: 'signedBlobId'} %>
5
6
  <%= f.hidden_field :filename, data: {attachment_picker_target: 'filename'} %>
6
7
 
7
- <%= f.select :attachment_id, Spina::Attachment.sorted.map{|attachment| [attachment.file&.filename, attachment.id, data: {signed_blob_id: attachment.file&.blob&.signed_id, filename: attachment.file&.filename}]}, {include_blank: t("spina.attachments.choose_attachment")}, {class: "form-select", data: {action: "attachment-picker#pick"}} %>
8
+ <%= f.select :attachment_id, Spina::Attachment.sorted.map{|attachment| [attachment.file&.filename, attachment.id, data: {signed_blob_id: attachment.file&.blob&.signed_id, filename: attachment.file&.filename}]}, {include_blank: t("spina.attachments.choose_attachment")}, {class: "form-select mt-1", data: {action: "attachment-picker#pick"}} %>
8
9
  </div>
@@ -10,6 +10,7 @@
10
10
  <label class="block text-sm leading-5 font-medium text-gray-700">
11
11
  <%= f.object.title %>
12
12
  </label>
13
+ <div class="text-gray-400 text-sm"><%= f.object.hint %></div>
13
14
 
14
15
  <div class="flex items-start mt-1">
15
16
  <div class="flex items-center" data-image-collection-target="collection">
@@ -2,6 +2,7 @@
2
2
  <label class="block text-sm leading-5 font-medium text-gray-700">
3
3
  <%= f.object.title %>
4
4
  </label>
5
+ <div class="text-gray-400 text-sm"><%= f.object.hint %></div>
5
6
 
6
7
  <%= f.hidden_field :signed_blob_id, data: {media_picker_target: "signedBlobId"} %>
7
8
  <%= f.hidden_field :filename, data: {media_picker_target: "filename"} %>
@@ -1,5 +1,6 @@
1
1
  <div class="mt-6">
2
2
  <label class="block text-sm leading-5 font-medium text-gray-700"><%= f.object.title %></label>
3
+ <div class="text-gray-400 text-sm"><%= f.object.hint %></div>
3
4
  <div class="mt-1">
4
5
  <%= f.text_field :content, class: "form-input block w-full max-w-5xl sm:text-sm sm:leading-5" %>
5
6
  </div>
@@ -1,5 +1,6 @@
1
1
  <div class="mt-6">
2
2
  <label for="price" class="block text-sm leading-5 font-medium text-gray-700"><%= f.object.title %></label>
3
+ <div class="text-gray-400 text-sm"><%= f.object.hint %></div>
3
4
 
4
- <%= f.select :value, f.object.options, {include_blank: t("spina.options.choose_option")}, class: "form-select" %>
5
+ <%= f.select :value, f.object.options, {include_blank: t("spina.options.choose_option")}, class: "form-select mt-1" %>
5
6
  </div>
@@ -1,5 +1,6 @@
1
1
  <div class="mt-6" data-controller="repeater">
2
2
  <label class="block text-sm leading-5 font-medium text-gray-700"><%= f.object.title %></label>
3
+ <div class="text-gray-400 text-sm"><%= f.object.hint %></div>
3
4
 
4
5
  <div class="-mt-4 flex flex-col md:flex-row" data-controller="tabs" data-tabs-active="bg-spina-dark bg-opacity-10 text-gray-900" data-tabs-inactive="text-gray-500">
5
6
  <div class="md:w-64 md:pr-6">
@@ -1,5 +1,6 @@
1
1
  <div class="mt-6" data-controller="unique-id" data-unique-id="<%= f.object.object_id %>">
2
2
  <label class="block text-sm leading-5 font-medium text-gray-700"><%= f.object.title %></label>
3
+ <div class="text-gray-400 text-sm"><%= f.object.hint %></div>
3
4
  <div class="mt-1 relative">
4
5
  <%= f.hidden_field :content, id: "#{f.object.object_id}_input" %>
5
6
 
@@ -21,7 +21,7 @@ Spina::Theme.register do |theme|
21
21
  # - Option
22
22
  # - Repeater
23
23
  theme.parts = [
24
- {name: 'text', title: "Body", part_type: "Spina::Parts::Text"}
24
+ {name: 'text', title: "Body", hint: "Your main content", part_type: "Spina::Parts::Text"}
25
25
  ]
26
26
 
27
27
  # View templates
@@ -23,10 +23,10 @@ Spina::Theme.register do |theme|
23
23
  theme.parts = [
24
24
  {name: 'repeater', title: "Repeater", part_type: "Spina::Parts::Repeater", parts: %w(line image headline)},
25
25
  {name: 'line', title: "Line", part_type: "Spina::Parts::Line"},
26
- {name: 'body', title: "Body", part_type: "Spina::Parts::Text"},
26
+ {name: 'body', title: "Body", hint: "Your content", part_type: "Spina::Parts::Text"},
27
27
  {name: "image_collection", title: "Image collection", part_type: "Spina::Parts::ImageCollection"},
28
28
  {name: 'image', title: "Image", part_type: "Spina::Parts::Image"},
29
- {name: 'headline', title: "Headline", part_type: "Spina::Parts::Line"},
29
+ {name: 'headline', title: "Headline", hint: "Used in the header", part_type: "Spina::Parts::Line"},
30
30
  {name: 'footer', title: "Footer", part_type: "Spina::Parts::Text"}
31
31
  ]
32
32
 
data/lib/spina/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Spina
2
- VERSION = "2.8.0"
2
+ VERSION = "2.8.1"
3
3
  end
@@ -5,12 +5,12 @@ SPINA_TAILWIND_COMPILE_COMMAND = "#{Tailwindcss::Engine.root.join("exe/tailwindc
5
5
  namespace :spina do
6
6
  namespace :tailwind do
7
7
  desc "Build your Tailwind CSS"
8
- task :build do
8
+ task build: :environment do
9
9
  Rails::Generators.invoke("spina:tailwind_config", ["--force"])
10
10
  system SPINA_TAILWIND_COMPILE_COMMAND
11
11
  end
12
12
 
13
- task :watch do
13
+ task watch: :environment do
14
14
  Rails::Generators.invoke("spina:tailwind_config", ["--force"])
15
15
  system "#{SPINA_TAILWIND_COMPILE_COMMAND} -w"
16
16
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spina
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.0
4
+ version: 2.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bram Jetten
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-14 00:00:00.000000000 Z
11
+ date: 2022-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -1174,7 +1174,7 @@ metadata:
1174
1174
  homepage_uri: https://www.spinacms.com
1175
1175
  bug_tracker_uri: https://github.com/SpinaCMS/Spina/issues
1176
1176
  documentation_uri: https://www.spinacms.com/docs
1177
- changelog_uri: https://github.com/SpinaCMS/Spina/blob/master/CHANGELOG.md
1177
+ changelog_uri: https://github.com/SpinaCMS/Spina/blob/main/CHANGELOG.md
1178
1178
  source_code_uri: https://github.com/SpinaCMS/Spina
1179
1179
  post_install_message:
1180
1180
  rdoc_options: []