Skip to content

Include year in meetings card#6102

Merged
microstudi merged 8 commits intodevelopfrom
feature/include_year_in_meetings
May 26, 2020
Merged

Include year in meetings card#6102
microstudi merged 8 commits intodevelopfrom
feature/include_year_in_meetings

Conversation

@gemmatm
Copy link
Copy Markdown
Contributor

@gemmatm gemmatm commented May 16, 2020

🎩 What? Why?

This PR adds the meeting's year, in the correspondent card, if this one is different from the current year.

📌 Related Issues

📋 Subtasks

  • Add CHANGELOG entry
  • Add tests

📷 Screenshots

Meeting from this year

current_year

Meeting from 2019

another_year

@gemmatm gemmatm self-assigned this May 16, 2020
@gemmatm gemmatm marked this pull request as draft May 16, 2020 17:34
@gemmatm gemmatm changed the title Include year in meetings Include year in meetings card May 20, 2020
@gemmatm gemmatm marked this pull request as ready for review May 20, 2020 15:29
Copy link
Copy Markdown
Contributor

@microstudi microstudi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @gemmatm !
I've only got one suggestion, please check the comments.
BTW, is this approved by @decidim/product ?

Comment on lines +38 to +41
<% year = l meeting.start_time, format: "%Y" %>
<% if year.to_i < Date.today.year %>
<%= l meeting.start_time, format: "%Y" %>
<% end %>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<% year = l meeting.start_time, format: "%Y" %>
<% if year.to_i < Date.today.year %>
<%= l meeting.start_time, format: "%Y" %>
<% end %>
<%= l(meeting.start_time, format: "%Y") if meeting.start_time.year != Date.current.year %>

I suggest this change which covers dates in the future as well. It is also a little bit more consice

@carolromero
Copy link
Copy Markdown
Member

LGTM, good job @gemmatm!

Copy link
Copy Markdown
Contributor

@microstudi microstudi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's go!

@microstudi microstudi merged commit 2fbc6cf into develop May 26, 2020
@microstudi microstudi deleted the feature/include_year_in_meetings branch May 26, 2020 12:33
ace pushed a commit to aspgems/decidim that referenced this pull request May 27, 2020
* develop:
  Include year in meetings card (decidim#6102)
  Add attachment enabled option to initiative types and initiatives (decidim#6036)
  Fix a flaky test in group profile conversations (decidim#6123)
  Add attachments to Initiatives (decidim#5844)
  Add initiatives export (decidim#6070)
  Improvements to conversations with more than one participant (decidim#6094)
  Elections module and election administration (decidim#6065)
  Separate forms in steps (decidim#6108)
  Add sorting by publishing date to initiatives (decidim#6016)
  Improve proposal preview: Use proposal card when previewing a proposal draft (decidim#6064)
  Newsletter templates fixes (decidim#6096)

# Conflicts:
#	decidim-initiatives/app/models/decidim/initiative.rb
#	decidim-initiatives/spec/system/admin/initiative_types_controller_spec.rb
ace pushed a commit to aspgems/decidim that referenced this pull request May 28, 2020
* feature/add_areas_to_initiatives: (30 commits)
  Adds areas to FO filters
  Fix lint issue
  Fixes rubocop issues
  Updates changelog
  Adds areas to initiatives
  Send notification when signature threshold reached (decidim#6098)
  Adds filter by initiative type to admin panel (decidim#6093)
  Require confirmation on exiting a survey mid-answering (decidim#6118)
  Information message when there isn't any Proposal (decidim#6063)
  Set email asset host dynamically (decidim#5888)
  Harmonizes the design of initiatives search in FO (decidim#6090)
  Include year in meetings card (decidim#6102)
  Add attachment enabled option to initiative types and initiatives (decidim#6036)
  Fix a flaky test in group profile conversations (decidim#6123)
  Add attachments to Initiatives (decidim#5844)
  Add initiatives export (decidim#6070)
  Improvements to conversations with more than one participant (decidim#6094)
  Elections module and election administration (decidim#6065)
  Separate forms in steps (decidim#6108)
  Add sorting by publishing date to initiatives (decidim#6016)
  ...

# Conflicts:
#	decidim-initiatives/app/cells/decidim/initiatives/initiative_m_cell.rb
#	decidim-initiatives/app/commands/decidim/initiatives/admin/update_initiative.rb
#	decidim-initiatives/app/controllers/decidim/initiatives/initiatives_controller.rb
#	decidim-initiatives/app/forms/decidim/initiatives/admin/initiative_form.rb
#	decidim-initiatives/app/helpers/decidim/initiatives/application_helper.rb
#	decidim-initiatives/app/models/decidim/initiative.rb
#	decidim-initiatives/app/services/decidim/initiatives/initiative_search.rb
#	decidim-initiatives/app/views/decidim/initiatives/create_initiative/fill_data.html.erb
#	decidim-initiatives/app/views/decidim/initiatives/initiatives/_filters.html.erb
#	decidim-initiatives/app/views/decidim/initiatives/initiatives/_tags.html.erb
#	decidim-initiatives/config/locales/en.yml
#	decidim-initiatives/db/migrate/20200514085422_add_area_to_initiatives.rb
#	decidim-initiatives/db/migrate/20200514102631_add_area_enabled_option_to_initiatives.rb
#	decidim-initiatives/spec/forms/initiative_form_spec.rb
#	decidim-initiatives/spec/services/decidim/initiatives/initiative_search_spec.rb
#	decidim-initiatives/spec/shared/update_initiative_type_example.rb
#	decidim-initiatives/spec/system/admin/admin_manages_initiatives_spec.rb
#	decidim-initiatives/spec/system/admin/initiative_types_controller_spec.rb
#	decidim-initiatives/spec/system/filter_initiatives_spec.rb
anaghavl pushed a commit to codegram/decidim that referenced this pull request Jun 3, 2020
* Add year in the show view

* Update meeting spec

* Update changelog

* Change condition

Co-authored-by: Gemma <gemmatm@coditramuntana.com>
Co-authored-by: Ivan Vergés <ivan@platoniq.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants