Skip to content

Commit

Permalink
add sticky cta proposal button
Browse files Browse the repository at this point in the history
  • Loading branch information
ElviaBth committed Jun 4, 2024
1 parent b24e65f commit cc5b46e
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 15 deletions.
4 changes: 2 additions & 2 deletions decidim-core/app/packs/stylesheets/decidim/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@
@apply flex gap-x-1 items-center;
}

@media screen and (max-width: 768px) {
@media screen and (max-width: 577px) {
.layout-aside__ctas-buttons {
@apply fixed inset-x-0 bottom-0 z-30 flex flex-row-reverse items-center justify-around bg-white p-4 shadow-inner;
@apply fixed inset-x-0 bottom-0 z-30 flex flex-row-reverse items-center justify-around bg-white gap-4 p-4 shadow-inner;

.meeting__aside-progress {
@apply flex flex-col-reverse;
Expand Down
2 changes: 1 addition & 1 deletion decidim-core/spec/system/locales_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
click_on "Entra"
end

expect(page).to have_content("Email o la contrasenya no són vàlids.")
expect(page).to have_content("El Correu electrònic o la contrasenya no són vàlids.")

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error test

Correu is not a recognized word. (unrecognized-spelling)
end

context "with a signed in user" do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

&__aside {
&-vote {
@apply flex flex-row-reverse md:flex-col gap-4 items-center md:items-stretch justify-between first:[&>*]:grow last:[&>*]:w-1/4 md:last:[&>*]:w-auto;
@apply flex flex-row-reverse md:flex-col gap-4 items-center md:items-stretch justify-around md:last:[&>*]:w-auto;
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<% if current_settings.votes_enabled? && (show_endorsements_card? || current_user) %>
<section class="layout-aside__section">
<div class="proposal__aside-vote">
<div class="proposal__aside-vote layout-aside__ctas-buttons">
<%= render partial: "vote_button", locals: { proposal: @proposal, from_proposals_list: false } unless @proposal.withdrawn? %>
<%= render partial: "votes_count", locals: { proposal: @proposal, from_proposals_list: false } %>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ module Admin
end

describe "when the template is valid" do
let(:destination_template) do
events = described_class.call(template, user)
let(:events) { described_class.call(template, user) }
let(:destination_template) { events[:ok] }

it "returns an event with :ok key" do
expect(events).to have_key(:ok)
events[:ok]
end

it "applies template attributes to the questionnaire" do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,15 @@ module Admin
end

describe "when the template is valid" do
let(:destination_questionnaire) do
events = described_class.call(template, user)
# events => { :ok => copied_template }
let(:events) { described_class.call(template, user) }
let(:destination_questionnaire) { events[:ok].templatable }

it "returns an event with :ok key" do
expect(events).to have_key(:ok)
events[:ok].templatable
end

it "assigns the correct templatable to destination_questionnaire" do
expect(destination_questionnaire).to eq(events[:ok].templatable)
end

it "applies template attributes to the questionnaire" do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,15 @@ module Admin
end

describe "when the template is valid" do
let(:destination_questionnaire) do
events = described_class.call(template, user)
let(:events) { described_class.call(template, user) }
let(:destination_questionnaire) { events[:ok].templatable }

it "returns an event with :ok key" do
expect(events).to have_key(:ok)
events[:ok].templatable
end

it "assigns the correct templatable to destination_questionnaire" do
expect(destination_questionnaire).to eq(events[:ok].templatable)
end

it "applies template attributes to the questionnaire" do
Expand Down

0 comments on commit cc5b46e

Please sign in to comment.