mensa 0.10.0 → 0.10.1

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: 642547e019d4d27af7e49926f377a843a4e050096e6c285a766c0fb0c34e0537
4
- data.tar.gz: ea82571ea8164b3aa1946b10f2573f8d9831bcc8e1afa3b290a6b4edd46a87ea
3
+ metadata.gz: 850adf070dcceffb710d8e36e4bad1eba36081c080bcad336951533cd312e234
4
+ data.tar.gz: d96ce5e7bb9712de9535925efb66f96e814228071454ab9557c8483e23ce3d7b
5
5
  SHA512:
6
- metadata.gz: ff4060b4b39bb1299e0d437a859a7b5572b8b0e5c58ac277d7e9d90fa71581d4769c34b48fa1e1e2830485e492a7662e081f3aba631956b2857b64ff8ac9c616
7
- data.tar.gz: 6c984794fe3ba477a4acaf6b4b320263f841e68492fc87d90a53bd08f70110b8ac048234735b911bd64b06d2eb594a348b957cad530fa37aa62c8610f6088802
6
+ metadata.gz: 6eb9003575e4dc5e5827340ff8bba70571271f2b49ab024cab7b4ef04c6ee6902d91e8136675346a5d2869102ee71fcf1d30b7194149bd807c914c3f6814e25d
7
+ data.tar.gz: d275ccf1f6d298edbcaab11acc756dba72db8537cabcab3378e3a52129714571fb0a4be6de8b6063bdddf5de9528e33d690e1657aba7b7036fdf9afdebdcaead
@@ -1,5 +1,6 @@
1
1
  name: Rubygem Push
2
2
  on:
3
+ workflow_dispatch:
3
4
  push:
4
5
  tags:
5
6
  - "*"
data/.shipkit.yml CHANGED
@@ -1,2 +1,2 @@
1
1
  ---
2
- previous_version: 0.9.9
2
+ previous_version: 0.10.0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.10.1
4
+
5
+ - The export dialog names a table by its model's name in the plural
6
+ ("Export automations"), not by the table's own name humanized ("Export agito
7
+ automations"). Dutch: "Exporteer automatiseringen".
8
+ - `Mensa.config.tour = false` switches off the table tour.
9
+
3
10
  ## 0.10.0
4
11
 
5
12
  - Batch actions can work on every row matching the current search and filters:
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mensa (0.9.9)
4
+ mensa (0.10.1)
5
5
  csv
6
6
  importmap-rails
7
7
  pagy (>= 43)
@@ -5,8 +5,12 @@
5
5
  data-mensa-table-save-view-url-value="<%= table.path_with_params(helpers.mensa.table_views_path(table.name)) %>"
6
6
  data-mensa-table-views-url-value="<%= table.path_with_params(helpers.mensa.table_views_path(table.name)) %>"
7
7
  data-mensa-table-exports-url-value="<%= table.path_with_params(helpers.mensa.table_exports_path(table.name)) %>"
8
+ <% if Mensa.config.tour %>
8
9
  data-controller="mensa-table mensa-tour"
9
10
  data-mensa-tour-texts-value="<%= I18n.t("mensa.tour").to_json %>"
11
+ <% else %>
12
+ data-controller="mensa-table"
13
+ <% end %>
10
14
  data-mensa-table-storage-key-value="<%= table.storage_key %>"
11
15
  data-action="click@document->mensa-table#saveDropdownOutsideHandler"
12
16
  data-mensa-table-mensa-filter-pill-list-outlet="#mensa-filter-pill-list-<%= table.table_id %>"
@@ -33,6 +33,17 @@ module Mensa
33
33
  end
34
34
  end
35
35
 
36
+ # The table's name for people, in a sentence: its model's, in the plural
37
+ # ("automations" for agito_automations), else its own name humanized
38
+ def human_name
39
+ return name.to_s.humanize.downcase unless model.respond_to?(:model_name)
40
+
41
+ name = model.model_name
42
+ # Without a translation human gives the singular, whatever the count
43
+ translated = model.respond_to?(:i18n_scope) && I18n.exists?("#{model.i18n_scope}.models.#{name.i18n_key}")
44
+ (translated ? name.human(count: 2) : name.human.pluralize).downcase_first
45
+ end
46
+
36
47
  def column_order
37
48
  order = config[:column_order].presence || config[:columns]&.keys
38
49
  order = order&.map(&:to_sym)
@@ -3,7 +3,7 @@
3
3
  <dialog class="mensa-table__export-dialog" data-mensa-table-target="exportDialog" data-action="click->mensa-table#exportDialogBackdrop">
4
4
  <div class="mensa-table__export-dialog__panel">
5
5
  <header class="mensa-table__export-dialog__header">
6
- <h2 class="mensa-table__export-dialog__title"><%= t("mensa.exports.title", default: "Export %{table}", table: table.name.to_s.humanize) %></h2>
6
+ <h2 class="mensa-table__export-dialog__title"><%= t("mensa.exports.title", default: "Export %{table}", table: table.human_name) %></h2>
7
7
  <button class="mensa-table__export-dialog__close" type="button" data-action="mensa-table#cancelExport" aria-label="<%= t("mensa.exports.close", default: "Close") %>">
8
8
  <i class="<%= Mensa.config.icons[:exports_dialog_close] %>"></i>
9
9
  </button>
@@ -110,7 +110,7 @@ nl:
110
110
  view_description_placeholder: Optionele notities over deze weergave
111
111
  view_name_required: Vul een naam in voor deze weergave.
112
112
  exports:
113
- title: "%{table} exporteren"
113
+ title: "Exporteer %{table}"
114
114
  close: Sluiten
115
115
  available_downloads: Beschikbare downloads
116
116
  empty: Je hebt nog geen downloads. Maak er hieronder een aan.
@@ -150,6 +150,8 @@ module Mensa
150
150
  option :row_actions_position, default: :back
151
151
  # It's either :basic or :fuzzy, for fuzzy search you need to have `pg_trgm` extension installed
152
152
  option :search, default: :basic
153
+ # Explain the table's features the first time a user sees them (and on ?)
154
+ option :tour, default: true
153
155
  # Default options for Mensa::Verifier (and so `rails mensa:verify`), called
154
156
  # with the table class. Return a hash with any of user:, account:,
155
157
  # context: (Current attributes), params: and label:, or an array of them
data/lib/mensa/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Mensa
2
- VERSION = "0.10.0"
2
+ VERSION = "0.10.1"
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.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom de Grunt