From 093d48d1a226a8dde976a7d90d62965fd9ecbbcd Mon Sep 17 00:00:00 2001 From: andra-panaite <135139066+andra-panaite@users.noreply.github.com> Date: Fri, 15 Nov 2024 21:44:20 +0200 Subject: [PATCH] Remove additional space from general search for comments that contain links (#13645) * Removed additional space from comments search section * Resolved comment * Fix test * Added space between title and author --- decidim-core/app/cells/decidim/card_s/show.erb | 8 +++++--- .../spec/cells/decidim/meetings/meeting_s_cell_spec.rb | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/decidim-core/app/cells/decidim/card_s/show.erb b/decidim-core/app/cells/decidim/card_s/show.erb index 260072f252dd..84381e4d8335 100644 --- a/decidim-core/app/cells/decidim/card_s/show.erb +++ b/decidim-core/app/cells/decidim/card_s/show.erb @@ -1,10 +1,12 @@ -<%= link_to resource_path, class: "card__search", id: dom_id(resource) do %> +<%= content_tag :div, id: dom_id(resource), class: "card__search" do %> <%= content_tag title_tag, class: "h4 card__search-title" do %> - <%= title %> + <%= link_to resource_path, class: "card__search" do %> + <%= title %> + <% end %> <% end %> <% if metadata_cell.present? %>
- <%= cell metadata_cell, resource, links: false %> + <%= cell metadata_cell, resource, links: false %>
<% end %> <% end %> diff --git a/decidim-meetings/spec/cells/decidim/meetings/meeting_s_cell_spec.rb b/decidim-meetings/spec/cells/decidim/meetings/meeting_s_cell_spec.rb index cb2bfb205776..dcad111f0bb4 100644 --- a/decidim-meetings/spec/cells/decidim/meetings/meeting_s_cell_spec.rb +++ b/decidim-meetings/spec/cells/decidim/meetings/meeting_s_cell_spec.rb @@ -13,7 +13,7 @@ module Decidim::Meetings context "when rendering" do it "renders the card" do - expect(subject).to have_css("#meeting_#{meeting.id}.card__search") + expect(subject).to have_css("div#meeting_#{meeting.id}") end end