decidim-comments 0.29.4 → 0.29.5

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: a6aff7b51b0967b0ba782fd4c152d7a9200e98cc78a957e60c36e6dfb4d7dd9a
4
- data.tar.gz: 0e9cbc415c784ed2f6d82cc4c9869a3ed271f0607ffd27c76590bbc9509533ab
3
+ metadata.gz: a76d60f97b9db99cae4e6a4a4b1b9fbf3b53f907657eb50fa7dc332549a7a7c1
4
+ data.tar.gz: 799453310cdcb15b1ad2ca28302e24f5fd3711cfa70a57495645a03c287ecd2d
5
5
  SHA512:
6
- metadata.gz: 291d09da2c4e4315cc3f49e9ff21c64ca3d8a7ac2d9d81c1b896703afd3886a42e4b1d78fee5dfbfd93fe09fa5062334aaa14db2579191dbbb5a1eedfb6a946b
7
- data.tar.gz: 41c71a289c54c98db7f19b8fcb966a60ce1f867e76cb02b0f54dfdd841c07f5a76d7fefd7aacff5410f74d608d6fc33d565933131c71473beb3a4189f5c56b31
6
+ metadata.gz: c245ce728666b96162704f36b1f5111c41d91ce1d9ef2445bd8b7b2bdab9e622a25a61671a67932cfa774af5439650bb6eb40a7e658a15f43cc4fd4de3cbc58f
7
+ data.tar.gz: 114053702c4dab126dfd147d9c8e0a3f4c4f56f958377d67dc9f30aba5b26d57c13cc74ba36d48e133cf49514d4357d500b3666e58a72f87d68fcf6340086823
@@ -1,22 +1,22 @@
1
1
  <div class="comment__votes">
2
2
  <% if user_signed_in? %>
3
- <%= vote_button_to decidim_comments.comment_votes_path(model, weight: 1), remote: true, disabled: voted_down?, class: votes_up_classes, title: t("decidim.components.up_vote_button.text") do %>
3
+ <%= vote_button_to decidim_comments.comment_votes_path(model, weight: 1), remote: true, disabled: voted_down?, class: votes_up_classes, title: t("decidim.components.up_vote_button.text"), "aria-label": t("decidim.components.up_vote_button.label", count: up_votes_count) do %>
4
4
  <%= icon "thumb-up-line" %>
5
5
  <%= icon "thumb-up-fill" %>
6
6
  <span><%= up_votes_count %></span>
7
7
  <% end %>
8
- <%= vote_button_to decidim_comments.comment_votes_path(model, weight: -1), remote: true, disabled: voted_up?, class: votes_down_classes, title: t("decidim.components.down_vote_button.text") do %>
8
+ <%= vote_button_to decidim_comments.comment_votes_path(model, weight: -1), remote: true, disabled: voted_up?, class: votes_down_classes, title: t("decidim.components.down_vote_button.text"), "aria-label": t("decidim.components.down_vote_button.label", count: down_votes_count) do %>
9
9
  <%= icon "thumb-down-line" %>
10
10
  <%= icon "thumb-down-fill" %>
11
11
  <span><%= down_votes_count %></span>
12
12
  <% end %>
13
13
  <% else %>
14
- <button class="<%= votes_up_classes %> " title="<%= t("decidim.components.up_vote_button.text") %>" data-dialog-open="loginModal">
14
+ <button class="<%= votes_up_classes %> " title="<%= t("decidim.components.up_vote_button.text") %>" data-dialog-open="loginModal" aria-label="<%= t("decidim.components.up_vote_button.label", count: up_votes_count) %>">
15
15
  <%= icon "thumb-up-line", class: "fill-secondary" %>
16
16
  <%= icon "thumb-up-fill", class: "fill-secondary" %>
17
17
  <span><%= up_votes_count %></span>
18
18
  </button>
19
- <button class="<%= votes_down_classes %> " title="<%= t("decidim.components.down_vote_button.text") %>" data-dialog-open="loginModal">
19
+ <button class="<%= votes_down_classes %> " title="<%= t("decidim.components.down_vote_button.text") %>" data-dialog-open="loginModal" aria-label="<%= t("decidim.components.down_vote_button.label", count: down_votes_count) %>">
20
20
  <%= icon "thumb-down-line", class: "fill-secondary" %>
21
21
  <%= icon "thumb-down-fill", class: "fill-secondary" %>
22
22
  <span><%= down_votes_count %></span>
@@ -1,11 +1,11 @@
1
1
  <div>
2
- <span class="comment__opinion-label"><%= t("decidim.components.add_comment_form.opinion.label") %></span>
2
+ <p id="opinion" class="comment__opinion-label"><%= t("decidim.components.add_comment_form.opinion.label") %></p>
3
3
  <div data-opinion-toggle class="comment__opinion-container">
4
- <button type="button" aria-pressed="false" data-toggle-ok="true" data-selected-label="<%= t("decidim.components.add_comment_form.opinion.positive_selected") %>">
4
+ <button type="button" aria-pressed="false" aria-describedby="opinion" data-toggle-ok="true" data-selected-label="<%= t("decidim.components.add_comment_form.opinion.positive_selected") %>">
5
5
  <span><%= t("decidim.components.comment.alignment.in_favor") %></span>
6
6
  <%= icon "thumb-up-line" %>
7
7
  </button>
8
- <button type="button" aria-pressed="true" class="is-active" data-toggle-meh="true" data-selected-label="<%= t("decidim.components.add_comment_form.opinion.neutral_selected") %>">
8
+ <button type="button" aria-pressed="true" aria-describedby="opinion" class="is-active" data-toggle-meh="true" data-selected-label="<%= t("decidim.components.add_comment_form.opinion.neutral_selected") %>">
9
9
  <span><%= t("decidim.components.add_comment_form.opinion.neutral") %></span>
10
10
  <%= icon "loader-3-line" %>
11
11
  </button>
@@ -306,7 +306,7 @@
306
306
 
307
307
  &:hover,
308
308
  &.is-active {
309
- @apply border-secondary text-secondary bg-background-4;
309
+ @apply border-secondary text-secondary bg-background-4 font-bold;
310
310
  }
311
311
  }
312
312
  }
@@ -13,11 +13,30 @@
13
13
  $upVote.removeClass("is-vote-selected is-vote-notselected").removeAttr("disabled");
14
14
  $downVote.removeClass("is-vote-selected is-vote-notselected").removeAttr("disabled");
15
15
 
16
- <% if comment.up_voted_by?(current_user) %>
17
- $upVote.addClass("is-vote-selected");
18
- $downVote.addClass("is-vote-notselected").attr("disabled", "disabled");
19
- <% elsif comment.down_voted_by?(current_user) %>
20
- $upVote.addClass("is-vote-notselected").attr("disabled", "disabled");
21
- $downVote.addClass("is-vote-selected");
22
- <% end %>
16
+ function setVoteState($upVote, $downVote, isUpVoted, isDownVoted) {
17
+ if (isUpVoted) {
18
+ $upVote.addClass("is-vote-selected").attr("aria-pressed", "true");
19
+ $downVote.addClass("is-vote-notselected").attr("aria-disabled", "true").attr("tabindex", "-1").removeAttr("disabled").css("cursor", "not-allowed");
20
+ } else if (isDownVoted) {
21
+ $upVote.addClass("is-vote-notselected").attr("aria-disabled", "true").attr("tabindex", "-1").removeAttr("disabled").css("cursor", "not-allowed");
22
+ $downVote.addClass("is-vote-selected").attr("aria-pressed", "true");
23
+ } else {
24
+ $upVote.removeClass("is-vote-selected is-vote-notselected cursor-not-allowed").removeAttr("aria-pressed aria-disabled disabled tabindex").css("cursor", "");
25
+ $downVote.removeClass("is-vote-selected is-vote-notselected cursor-not-allowed").removeAttr("aria-pressed aria-disabled disabled tabindex").css("cursor", "");
26
+ }
27
+ }
28
+
29
+ setVoteState($upVote, $downVote, <%= comment.up_voted_by?(current_user) %>, <%= comment.down_voted_by?(current_user) %>);
30
+
31
+ function handleAriaDisabledClick(e) {
32
+ const $target = $(e.target).closest('[aria-disabled="true"]');
33
+ if ($target.length > 0) {
34
+ e.preventDefault();
35
+ e.stopPropagation();
36
+ e.stopImmediatePropagation();
37
+ return false;
38
+ }
39
+ }
40
+
41
+ $(document).on('click mousedown', '[aria-disabled="true"]', handleAriaDisabledClick);
23
42
  }());
@@ -115,6 +115,9 @@ ca-IT:
115
115
  one: "%{count} comentari"
116
116
  other: "%{count} comentaris"
117
117
  down_vote_button:
118
+ label:
119
+ one: Botó "No m'agrada". %{count} "no m'agrada"
120
+ other: Botó "No m'agrada". %{count} "no m'agrada"
118
121
  text: No estic d'acord amb aquest comentari
119
122
  edit_comment_modal_form:
120
123
  close: Tancar
@@ -125,6 +128,9 @@ ca-IT:
125
128
  submit: Enviar
126
129
  title: Edita el teu comentari
127
130
  up_vote_button:
131
+ label:
132
+ one: Botó "M'agrada". %{count} "M'agrada"
133
+ other: Botó "M'agrada". %{count} "M'agrada"
128
134
  text: Estic d'acord amb aquest comentari
129
135
  events:
130
136
  comments:
@@ -115,6 +115,9 @@ ca:
115
115
  one: "%{count} comentari"
116
116
  other: "%{count} comentaris"
117
117
  down_vote_button:
118
+ label:
119
+ one: Botó "No m'agrada". %{count} "no m'agrada"
120
+ other: Botó "No m'agrada". %{count} "no m'agrada"
118
121
  text: No estic d'acord amb aquest comentari
119
122
  edit_comment_modal_form:
120
123
  close: Tancar
@@ -125,6 +128,9 @@ ca:
125
128
  submit: Enviar
126
129
  title: Edita el teu comentari
127
130
  up_vote_button:
131
+ label:
132
+ one: Botó "M'agrada". %{count} "M'agrada"
133
+ other: Botó "M'agrada". %{count} "M'agrada"
128
134
  text: Estic d'acord amb aquest comentari
129
135
  events:
130
136
  comments:
@@ -115,6 +115,9 @@ de:
115
115
  one: "%{count} Kommentar"
116
116
  other: "%{count} Kommentare"
117
117
  down_vote_button:
118
+ label:
119
+ one: Button «Nicht unterstützen». %{count} unterstützt nicht
120
+ other: Button «Nicht unterstützen». %{count} unterstützen nicht
118
121
  text: Ich bin mit diesem Kommentar nicht einverstanden
119
122
  edit_comment_modal_form:
120
123
  close: Schliessen
@@ -125,6 +128,9 @@ de:
125
128
  submit: Senden
126
129
  title: Kommentar bearbeiten
127
130
  up_vote_button:
131
+ label:
132
+ one: Button «Unterstützen». %{count} Unterstützung
133
+ other: Button «Unterstützen». %{count} Unterstützungen
128
134
  text: Ich stimme diesem Kommentar zu
129
135
  events:
130
136
  comments:
@@ -115,6 +115,9 @@ en:
115
115
  one: "%{count} comment"
116
116
  other: "%{count} comments"
117
117
  down_vote_button:
118
+ label:
119
+ one: Dislike button. %{count} dislike
120
+ other: Dislike button. %{count} dislikes
118
121
  text: I disagree with this comment
119
122
  edit_comment_modal_form:
120
123
  close: Close
@@ -125,6 +128,9 @@ en:
125
128
  submit: Send
126
129
  title: Edit your comment
127
130
  up_vote_button:
131
+ label:
132
+ one: Like button. %{count} like
133
+ other: Like button. %{count} likes
128
134
  text: I agree with this comment
129
135
  events:
130
136
  comments:
@@ -115,6 +115,9 @@ es-MX:
115
115
  one: "%{count} comentario"
116
116
  other: "%{count} comentarios"
117
117
  down_vote_button:
118
+ label:
119
+ one: Botón "No me gusta". %{count} "no me gusta"
120
+ other: Botón "No me gusta". %{count} "no me gusta"
118
121
  text: No estoy de acuerdo con este comentario
119
122
  edit_comment_modal_form:
120
123
  close: Cerrar
@@ -125,6 +128,9 @@ es-MX:
125
128
  submit: Enviar
126
129
  title: Edita tu comentario
127
130
  up_vote_button:
131
+ label:
132
+ one: Botón "Me gusta". %{count} "me gusta"
133
+ other: Botón "Me gusta". %{count} "me gusta"
128
134
  text: Estoy de acuerdo con este comentario
129
135
  events:
130
136
  comments:
@@ -115,6 +115,9 @@ es-PY:
115
115
  one: "%{count} comentario"
116
116
  other: "%{count} comentarios"
117
117
  down_vote_button:
118
+ label:
119
+ one: Botón "No me gusta". %{count} "no me gusta"
120
+ other: Botón "No me gusta". %{count} "no me gusta"
118
121
  text: No estoy de acuerdo con este comentario
119
122
  edit_comment_modal_form:
120
123
  close: Cerrar
@@ -125,6 +128,9 @@ es-PY:
125
128
  submit: Enviar
126
129
  title: Edita tu comentario
127
130
  up_vote_button:
131
+ label:
132
+ one: Botón "Me gusta". %{count} "me gusta"
133
+ other: Botón "Me gusta". %{count} "me gusta"
128
134
  text: Estoy de acuerdo con este comentario
129
135
  events:
130
136
  comments:
@@ -115,6 +115,9 @@ es:
115
115
  one: "%{count} comentario"
116
116
  other: "%{count} comentarios"
117
117
  down_vote_button:
118
+ label:
119
+ one: Botón "No me gusta". %{count} "no me gusta"
120
+ other: Botón "No me gusta". %{count} "no me gusta"
118
121
  text: No estoy de acuerdo con este comentario
119
122
  edit_comment_modal_form:
120
123
  close: Cerrar
@@ -125,6 +128,9 @@ es:
125
128
  submit: Enviar
126
129
  title: Edita tu comentario
127
130
  up_vote_button:
131
+ label:
132
+ one: Botón "Me gusta". %{count} "me gusta"
133
+ other: Botón "Me gusta". %{count} "me gusta"
128
134
  text: Estoy de acuerdo con este comentario
129
135
  events:
130
136
  comments:
@@ -115,6 +115,9 @@ eu:
115
115
  one: "Iruzkin bat"
116
116
  other: "%{count} iruzkin"
117
117
  down_vote_button:
118
+ label:
119
+ one: Ez dut atsegin botoia. %{count} ez-atsegin
120
+ other: Ez dut atsegin botoia. %{count} ez-atsegin
118
121
  text: Ez nago ados iruzkin honekin
119
122
  edit_comment_modal_form:
120
123
  close: Itxi
@@ -125,6 +128,9 @@ eu:
125
128
  submit: Bidali
126
129
  title: Editatu zure iruzkina
127
130
  up_vote_button:
131
+ label:
132
+ one: Atsegin dut botoia. %{count} atsegin dut
133
+ other: Atsegin dut botoia. %{count} atsegin dut
128
134
  text: Ados nago iruzkin honekin
129
135
  events:
130
136
  comments:
@@ -24,6 +24,8 @@ fi-pl:
24
24
  enabled: Kommentointi sallittu
25
25
  end_time: Kommentointi sallittu aikarajaan saakka
26
26
  start_time: Kommentointi sallittu alkaen
27
+ comment_thread:
28
+ accessibility_label: Kommenttiketju aloitettu %{date} henkilön %{full_name} toimesta
27
29
  comments:
28
30
  create:
29
31
  error: Kommentin luotaessa tapahtui virhe.
@@ -113,6 +115,9 @@ fi-pl:
113
115
  one: "%{count} kommentti"
114
116
  other: "%{count} kommenttia"
115
117
  down_vote_button:
118
+ label:
119
+ one: Eri mieltä osoittava painike. %{count} henkilö on asiasta eri mieltä
120
+ other: Eri mieltä osoittava painike. %{count} henkilöä on asiasta eri mieltä
116
121
  text: Olen eri mieltä tämän kommentin kanssa
117
122
  edit_comment_modal_form:
118
123
  close: Sulje
@@ -123,6 +128,9 @@ fi-pl:
123
128
  submit: Lähetä
124
129
  title: Muokkaa kommenttiasi
125
130
  up_vote_button:
131
+ label:
132
+ one: Tykkäyspainike. %{count} tykkäys
133
+ other: Tykkäyspainike. %{count} tykkäystä
126
134
  text: Olen samaa mieltä tämän kommentin kanssa
127
135
  events:
128
136
  comments:
@@ -24,6 +24,8 @@ fi:
24
24
  enabled: Kommentointi sallittu
25
25
  end_time: Kommentointi sallittu aikarajaan saakka
26
26
  start_time: Kommentointi sallittu alkaen
27
+ comment_thread:
28
+ accessibility_label: Kommenttiketju aloitettu %{date} henkilön %{full_name} toimesta
27
29
  comments:
28
30
  create:
29
31
  error: Kommentin luonti epäonnistui.
@@ -113,6 +115,9 @@ fi:
113
115
  one: "%{count} kommentti"
114
116
  other: "%{count} kommenttia"
115
117
  down_vote_button:
118
+ label:
119
+ one: Eri mieltä osoittava painike. %{count} henkilö on asiasta eri mieltä
120
+ other: Eri mieltä osoittava painike. %{count} henkilöä on asiasta eri mieltä
116
121
  text: Olen eri mieltä tämän kommentin kanssa
117
122
  edit_comment_modal_form:
118
123
  close: Sulje
@@ -123,6 +128,9 @@ fi:
123
128
  submit: Lähetä
124
129
  title: Muokkaa kommenttiasi
125
130
  up_vote_button:
131
+ label:
132
+ one: Tykkäyspainike. %{count} tykkäys
133
+ other: Tykkäyspainike. %{count} tykkäystä
126
134
  text: Olen samaa mieltä tämän kommentin kanssa
127
135
  events:
128
136
  comments:
@@ -115,6 +115,9 @@ fr-CA:
115
115
  one: "%{count} commentaire"
116
116
  other: "%{count} commentaires"
117
117
  down_vote_button:
118
+ label:
119
+ one: Bouton "Je n'aime pas". %{count} "je n'aime pas"
120
+ other: Bouton "Je n'aime pas". %{count} "je n'aime pas"
118
121
  text: Je ne suis pas d'accord avec ce commentaire
119
122
  edit_comment_modal_form:
120
123
  close: Fermer
@@ -125,6 +128,9 @@ fr-CA:
125
128
  submit: Envoyer
126
129
  title: Modifier votre commentaire
127
130
  up_vote_button:
131
+ label:
132
+ one: Bouton "J'aime". %{count} "J'aime"
133
+ other: Bouton "J'aime". %{count} "J'aime"
128
134
  text: Je suis d'accord avec ce commentaire
129
135
  events:
130
136
  comments:
@@ -115,6 +115,9 @@ fr:
115
115
  one: "%{count} commentaire"
116
116
  other: "%{count} commentaires"
117
117
  down_vote_button:
118
+ label:
119
+ one: Bouton "Je n'aime pas". %{count} "je n'aime pas"
120
+ other: Bouton "Je n'aime pas". %{count} "je n'aime pas"
118
121
  text: Je ne suis pas d'accord avec ce commentaire
119
122
  edit_comment_modal_form:
120
123
  close: Fermer
@@ -125,6 +128,9 @@ fr:
125
128
  submit: Envoyer
126
129
  title: Modifier votre commentaire
127
130
  up_vote_button:
131
+ label:
132
+ one: Bouton "J'aime". %{count} "J'aime"
133
+ other: Bouton "J'aime". %{count} "J'aime"
128
134
  text: Je suis d'accord avec ce commentaire
129
135
  events:
130
136
  comments:
@@ -110,6 +110,8 @@ ja:
110
110
  title:
111
111
  other: "%{count} 件のコメント"
112
112
  down_vote_button:
113
+ label:
114
+ other: よくないねボタン。 %{count} よくないね
113
115
  text: このコメントに同意しません
114
116
  edit_comment_modal_form:
115
117
  close: 閉じる
@@ -120,6 +122,8 @@ ja:
120
122
  submit: 送信
121
123
  title: コメントを編集
122
124
  up_vote_button:
125
+ label:
126
+ other: いいねボタン。 %{count} いいね
123
127
  text: このコメントに同意します
124
128
  events:
125
129
  comments:
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-comments version.
5
5
  module Comments
6
6
  def self.version
7
- "0.29.4"
7
+ "0.29.5"
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-comments
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.29.4
4
+ version: 0.29.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2025-06-04 00:00:00.000000000 Z
13
+ date: 2025-09-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: decidim-core
@@ -18,14 +18,14 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.29.4
21
+ version: 0.29.5
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - '='
27
27
  - !ruby/object:Gem::Version
28
- version: 0.29.4
28
+ version: 0.29.5
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: redcarpet
31
31
  requirement: !ruby/object:Gem::Requirement
@@ -52,28 +52,28 @@ dependencies:
52
52
  requirements:
53
53
  - - '='
54
54
  - !ruby/object:Gem::Version
55
- version: 0.29.4
55
+ version: 0.29.5
56
56
  type: :development
57
57
  prerelease: false
58
58
  version_requirements: !ruby/object:Gem::Requirement
59
59
  requirements:
60
60
  - - '='
61
61
  - !ruby/object:Gem::Version
62
- version: 0.29.4
62
+ version: 0.29.5
63
63
  - !ruby/object:Gem::Dependency
64
64
  name: decidim-dev
65
65
  requirement: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - '='
68
68
  - !ruby/object:Gem::Version
69
- version: 0.29.4
69
+ version: 0.29.5
70
70
  type: :development
71
71
  prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
73
73
  requirements:
74
74
  - - '='
75
75
  - !ruby/object:Gem::Version
76
- version: 0.29.4
76
+ version: 0.29.5
77
77
  description: Pluggable comments system for some components.
78
78
  email:
79
79
  - josepjaume@gmail.com