decidim-comments 0.30.1 → 0.30.2

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: 9e6746750957ec0abd1071747249f9950e9e05230a27a6a88d3cabfbd65a71ae
4
- data.tar.gz: 9d4719e73c257aa75357d5829eaad1436a144f8f25a1002307a99726596880a3
3
+ metadata.gz: 961d892e5bcb765e23c2fb3e827821b291ea82a7b739d9f53a0bf61e0b57d84e
4
+ data.tar.gz: 9ee5a7bd9f898558f06cd3c151072708e228d35c77e60266e7040ee301c1ce23
5
5
  SHA512:
6
- metadata.gz: dbd914f9f24ff0a9a9ab9161d83bb66ecffe1f6e4b4369f6eda8d5d005424462ae6961b0adc4ac80e17fe73f9494e478367fa00eb37d13b1fcb2b6abc0f5df7b
7
- data.tar.gz: a01577c7c2a8a288f1b9835fbc0fd988ba6d9aa7ec1cad7b54f1b78d8008e6be44d207f09a7c569d6eef1d47c9135fb00cc7719d5f4211d5ad7c05ea5864ea48
6
+ metadata.gz: bfe95d885027ac452b5b10801ab86dd2a9a631d8b82b81ac0209702425fb680fd8d80150c55f90fab652aa6e9a68bdb43b3653d59ca3b9c465392d8ef23daee6
7
+ data.tar.gz: 38f9b191adf45e1876397a41e1e89942c864f3528b97c9d430a30c69f1852643b92685be1d574e98b8009a3833c1cd7e5d6ada1c628d2f81096bdb00b10cf8ed
@@ -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="false" data-toggle-ko="true" data-selected-label="<%= t("decidim.components.add_comment_form.opinion.negative_selected") %>">
8
+ <button type="button" aria-pressed="false" aria-describedby="opinion" data-toggle-ko="true" data-selected-label="<%= t("decidim.components.add_comment_form.opinion.negative_selected") %>">
9
9
  <span><%= t("decidim.components.comment.alignment.against") %></span>
10
10
  <%= icon "thumb-down-line" %>
11
11
  </button>
@@ -406,7 +406,7 @@
406
406
 
407
407
  &:hover,
408
408
  &.is-active {
409
- @apply border-secondary text-secondary bg-background-4;
409
+ @apply border-secondary text-secondary bg-background-4 font-bold;
410
410
  }
411
411
  }
412
412
  }
@@ -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
  }());
@@ -128,6 +128,9 @@ ca-IT:
128
128
  other: "%{count} comentaris"
129
129
  top_comment_label: Més ben valorat
130
130
  down_vote_button:
131
+ label:
132
+ one: Botó "No m'agrada". %{count} "no m'agrada"
133
+ other: Botó "No m'agrada". %{count} "no m'agrada"
131
134
  text: No estic d'acord amb aquest comentari
132
135
  edit_comment_modal_form:
133
136
  close: Tancar
@@ -138,6 +141,9 @@ ca-IT:
138
141
  submit: Enviar
139
142
  title: Edita el teu comentari
140
143
  up_vote_button:
144
+ label:
145
+ one: Botó "M'agrada". %{count} "M'agrada"
146
+ other: Botó "M'agrada". %{count} "M'agrada"
141
147
  text: Estic d'acord amb aquest comentari
142
148
  download_your_data:
143
149
  help:
@@ -128,6 +128,9 @@ ca:
128
128
  other: "%{count} comentaris"
129
129
  top_comment_label: Més ben valorat
130
130
  down_vote_button:
131
+ label:
132
+ one: Botó "No m'agrada". %{count} "no m'agrada"
133
+ other: Botó "No m'agrada". %{count} "no m'agrada"
131
134
  text: No estic d'acord amb aquest comentari
132
135
  edit_comment_modal_form:
133
136
  close: Tancar
@@ -138,6 +141,9 @@ ca:
138
141
  submit: Enviar
139
142
  title: Edita el teu comentari
140
143
  up_vote_button:
144
+ label:
145
+ one: Botó "M'agrada". %{count} "M'agrada"
146
+ other: Botó "M'agrada". %{count} "M'agrada"
141
147
  text: Estic d'acord amb aquest comentari
142
148
  download_your_data:
143
149
  help:
@@ -128,6 +128,9 @@ de:
128
128
  other: "%{count} Kommentare"
129
129
  top_comment_label: Bestbewertete
130
130
  down_vote_button:
131
+ label:
132
+ one: Button «Nicht unterstützen». %{count} unterstützt nicht
133
+ other: Button «Nicht unterstützen». %{count} unterstützen nicht
131
134
  text: Ich bin mit diesem Kommentar nicht einverstanden
132
135
  edit_comment_modal_form:
133
136
  close: Schliessen
@@ -138,6 +141,9 @@ de:
138
141
  submit: Senden
139
142
  title: Kommentar bearbeiten
140
143
  up_vote_button:
144
+ label:
145
+ one: Button «Unterstützen». %{count} Unterstützung
146
+ other: Button «Unterstützen». %{count} Unterstützungen
141
147
  text: Ich stimme diesem Kommentar zu
142
148
  download_your_data:
143
149
  help:
@@ -128,6 +128,9 @@ en:
128
128
  other: "%{count} comments"
129
129
  top_comment_label: Most upvoted
130
130
  down_vote_button:
131
+ label:
132
+ one: Dislike button. %{count} dislike
133
+ other: Dislike button. %{count} dislikes
131
134
  text: I disagree with this comment
132
135
  edit_comment_modal_form:
133
136
  close: Close
@@ -138,6 +141,9 @@ en:
138
141
  submit: Send
139
142
  title: Edit your comment
140
143
  up_vote_button:
144
+ label:
145
+ one: Like button. %{count} like
146
+ other: Like button. %{count} likes
141
147
  text: I agree with this comment
142
148
  download_your_data:
143
149
  help:
@@ -128,6 +128,9 @@ es-MX:
128
128
  other: "%{count} comentarios"
129
129
  top_comment_label: Mejor valorado
130
130
  down_vote_button:
131
+ label:
132
+ one: Botón "No me gusta". %{count} "no me gusta"
133
+ other: Botón "No me gusta". %{count} "no me gusta"
131
134
  text: No estoy de acuerdo con este comentario
132
135
  edit_comment_modal_form:
133
136
  close: Cerrar
@@ -138,6 +141,9 @@ es-MX:
138
141
  submit: Enviar
139
142
  title: Edita tu comentario
140
143
  up_vote_button:
144
+ label:
145
+ one: Botón "Me gusta". %{count} "me gusta"
146
+ other: Botón "Me gusta". %{count} "me gusta"
141
147
  text: Estoy de acuerdo con este comentario
142
148
  download_your_data:
143
149
  help:
@@ -128,6 +128,9 @@ es-PY:
128
128
  other: "%{count} comentarios"
129
129
  top_comment_label: Mejor valorado
130
130
  down_vote_button:
131
+ label:
132
+ one: Botón "No me gusta". %{count} "no me gusta"
133
+ other: Botón "No me gusta". %{count} "no me gusta"
131
134
  text: No estoy de acuerdo con este comentario
132
135
  edit_comment_modal_form:
133
136
  close: Cerrar
@@ -138,6 +141,9 @@ es-PY:
138
141
  submit: Enviar
139
142
  title: Edita tu comentario
140
143
  up_vote_button:
144
+ label:
145
+ one: Botón "Me gusta". %{count} "me gusta"
146
+ other: Botón "Me gusta". %{count} "me gusta"
141
147
  text: Estoy de acuerdo con este comentario
142
148
  download_your_data:
143
149
  help:
@@ -128,6 +128,9 @@ es:
128
128
  other: "%{count} comentarios"
129
129
  top_comment_label: Mejor valorado
130
130
  down_vote_button:
131
+ label:
132
+ one: Botón "No me gusta". %{count} "no me gusta"
133
+ other: Botón "No me gusta". %{count} "no me gusta"
131
134
  text: No estoy de acuerdo con este comentario
132
135
  edit_comment_modal_form:
133
136
  close: Cerrar
@@ -138,6 +141,9 @@ es:
138
141
  submit: Enviar
139
142
  title: Edita tu comentario
140
143
  up_vote_button:
144
+ label:
145
+ one: Botón "Me gusta". %{count} "me gusta"
146
+ other: Botón "Me gusta". %{count} "me gusta"
141
147
  text: Estoy de acuerdo con este comentario
142
148
  download_your_data:
143
149
  help:
@@ -128,6 +128,9 @@ eu:
128
128
  other: "%{count} iruzkin"
129
129
  top_comment_label: Bozkatuenak
130
130
  down_vote_button:
131
+ label:
132
+ one: Ez dut atsegin botoia. %{count} ez-atsegin
133
+ other: Ez dut atsegin botoia. %{count} ez-atsegin
131
134
  text: Ez nago ados iruzkin honekin
132
135
  edit_comment_modal_form:
133
136
  close: Itxi
@@ -138,6 +141,9 @@ eu:
138
141
  submit: Bidali
139
142
  title: Editatu zure iruzkina
140
143
  up_vote_button:
144
+ label:
145
+ one: Atsegin dut botoia. %{count} atsegin dut
146
+ other: Atsegin dut botoia. %{count} atsegin dut
141
147
  text: Ados nago iruzkin honekin
142
148
  download_your_data:
143
149
  help:
@@ -28,6 +28,8 @@ fi-pl:
28
28
  enabled: Kommentointi sallittu
29
29
  end_time: Kommentointi sallittu aikarajaan saakka
30
30
  start_time: Kommentointi sallittu alkaen
31
+ comment_thread:
32
+ accessibility_label: Kommenttiketju aloitettu %{date} henkilön %{full_name} toimesta
31
33
  comments:
32
34
  create:
33
35
  error: Kommentin luotaessa tapahtui virhe.
@@ -126,6 +128,9 @@ fi-pl:
126
128
  other: "%{count} kommenttia"
127
129
  top_comment_label: Eniten ääniä saaneet ensin
128
130
  down_vote_button:
131
+ label:
132
+ one: Eri mieltä osoittava painike. %{count} henkilö on asiasta eri mieltä
133
+ other: Eri mieltä osoittava painike. %{count} henkilöä on asiasta eri mieltä
129
134
  text: Olen eri mieltä tämän kommentin kanssa
130
135
  edit_comment_modal_form:
131
136
  close: Sulje
@@ -136,6 +141,9 @@ fi-pl:
136
141
  submit: Lähetä
137
142
  title: Muokkaa kommenttiasi
138
143
  up_vote_button:
144
+ label:
145
+ one: Tykkäyspainike. %{count} tykkäys
146
+ other: Tykkäyspainike. %{count} tykkäystä
139
147
  text: Olen samaa mieltä tämän kommentin kanssa
140
148
  download_your_data:
141
149
  help:
@@ -28,6 +28,8 @@ fi:
28
28
  enabled: Kommentointi sallittu
29
29
  end_time: Kommentointi sallittu aikarajaan saakka
30
30
  start_time: Kommentointi sallittu alkaen
31
+ comment_thread:
32
+ accessibility_label: Kommenttiketju aloitettu %{date} henkilön %{full_name} toimesta
31
33
  comments:
32
34
  create:
33
35
  error: Kommentin luonti epäonnistui.
@@ -126,6 +128,9 @@ fi:
126
128
  other: "%{count} kommenttia"
127
129
  top_comment_label: Eniten ääniä saaneet ensin
128
130
  down_vote_button:
131
+ label:
132
+ one: Eri mieltä osoittava painike. %{count} henkilö on asiasta eri mieltä
133
+ other: Eri mieltä osoittava painike. %{count} henkilöä on asiasta eri mieltä
129
134
  text: Olen eri mieltä tämän kommentin kanssa
130
135
  edit_comment_modal_form:
131
136
  close: Sulje
@@ -136,6 +141,9 @@ fi:
136
141
  submit: Lähetä
137
142
  title: Muokkaa kommenttiasi
138
143
  up_vote_button:
144
+ label:
145
+ one: Tykkäyspainike. %{count} tykkäys
146
+ other: Tykkäyspainike. %{count} tykkäystä
139
147
  text: Olen samaa mieltä tämän kommentin kanssa
140
148
  download_your_data:
141
149
  help:
@@ -125,6 +125,9 @@ fr-CA:
125
125
  one: "%{count} commentaire"
126
126
  other: "%{count} commentaires"
127
127
  down_vote_button:
128
+ label:
129
+ one: Bouton "Je n'aime pas". %{count} "je n'aime pas"
130
+ other: Bouton "Je n'aime pas". %{count} "je n'aime pas"
128
131
  text: Je ne suis pas d'accord avec ce commentaire
129
132
  edit_comment_modal_form:
130
133
  close: Fermer
@@ -135,6 +138,9 @@ fr-CA:
135
138
  submit: Envoyer
136
139
  title: Modifier votre commentaire
137
140
  up_vote_button:
141
+ label:
142
+ one: Bouton "J'aime". %{count} "J'aime"
143
+ other: Bouton "J'aime". %{count} "J'aime"
138
144
  text: Je suis d'accord avec ce commentaire
139
145
  download_your_data:
140
146
  help:
@@ -125,6 +125,9 @@ fr:
125
125
  one: "%{count} commentaire"
126
126
  other: "%{count} commentaires"
127
127
  down_vote_button:
128
+ label:
129
+ one: Bouton "Je n'aime pas". %{count} "je n'aime pas"
130
+ other: Bouton "Je n'aime pas". %{count} "je n'aime pas"
128
131
  text: Je ne suis pas d'accord avec ce commentaire
129
132
  edit_comment_modal_form:
130
133
  close: Fermer
@@ -135,6 +138,9 @@ fr:
135
138
  submit: Envoyer
136
139
  title: Modifier votre commentaire
137
140
  up_vote_button:
141
+ label:
142
+ one: Bouton "J'aime". %{count} "J'aime"
143
+ other: Bouton "J'aime". %{count} "J'aime"
138
144
  text: Je suis d'accord avec ce commentaire
139
145
  download_your_data:
140
146
  help:
@@ -122,6 +122,8 @@ ja:
122
122
  other: "%{count} 件のコメント"
123
123
  top_comment_label: Upvoteの多い順
124
124
  down_vote_button:
125
+ label:
126
+ other: よくないねボタン。 %{count} よくないね
125
127
  text: このコメントに同意しません
126
128
  edit_comment_modal_form:
127
129
  close: 閉じる
@@ -132,6 +134,8 @@ ja:
132
134
  submit: 送信
133
135
  title: コメントを編集
134
136
  up_vote_button:
137
+ label:
138
+ other: いいねボタン。 %{count} いいね
135
139
  text: このコメントに同意します
136
140
  download_your_data:
137
141
  help:
@@ -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.30.1"
7
+ "0.30.2"
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.30.1
4
+ version: 0.30.2
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-17 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.30.1
21
+ version: 0.30.2
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.30.1
28
+ version: 0.30.2
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.30.1
55
+ version: 0.30.2
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.30.1
62
+ version: 0.30.2
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.30.1
69
+ version: 0.30.2
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.30.1
76
+ version: 0.30.2
77
77
  description: Pluggable comments system for some components.
78
78
  email:
79
79
  - josepjaume@gmail.com