Skip to content

Fix display of debates with multiple dates#7393

Merged
mrcasals merged 3 commits intodecidim:developfrom
Platoniq:fix/debate-dates
Feb 24, 2021
Merged

Fix display of debates with multiple dates#7393
mrcasals merged 3 commits intodecidim:developfrom
Platoniq:fix/debate-dates

Conversation

@verarojman
Copy link
Copy Markdown
Contributor

@verarojman verarojman commented Feb 15, 2021

🎩 What? Why?

Implement Date cell to use in debates in order to correctly display start and end times when the debate start day and end day are different. The logic is the following:

  • If it starts and ends on the same date, only date and start and end time are displayed
  • If if starts and ends on a different date, both start and end date and time are displayed
  • If either the starting year or the end year are not the current year, the year is displayed
  • If the starting year and the end year are different, the year is also displayed

📌 Related Issues

Testing

  • Visit a debate that starts and ends in different dates

📋 Checklist

🚨 Please review the guidelines for contributing to this repository.

  • CONSIDER adding a unit test if your PR resolves an issue.
  • ✔️ DO check open PR's to avoid duplicates.
  • ✔️ DO keep pull requests small so they can be easily reviewed.
  • ✔️ DO build locally before pushing.
  • ✔️ DO make sure tests pass.
  • AVOID breaking the continuous integration build.
  • AVOID making significant changes to the overall architecture.

📷 Screenshots

Same date

Same date

Different date, same year

Different date, same year

Different year

Different year

♥️ Thank you!

Copy link
Copy Markdown

@qlty-cloud-legacy qlty-cloud-legacy bot left a comment

Choose a reason for hiding this comment

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

The PR diff size of 41247 lines exceeds the maximum allowed for the inline comments feature.

@verarojman verarojman marked this pull request as ready for review February 15, 2021 19:00
@decidim decidim deleted a comment from qlty-cloud-legacy bot Feb 16, 2021
@decidim decidim deleted a comment from qlty-cloud-legacy bot Feb 16, 2021
@decidim decidim deleted a comment from qlty-cloud-legacy bot Feb 16, 2021
@decidim decidim deleted a comment from qlty-cloud-legacy bot Feb 16, 2021
@decidim decidim deleted a comment from qlty-cloud-legacy bot Feb 16, 2021
@decidim decidim deleted a comment from qlty-cloud-legacy bot Feb 16, 2021
@decidim decidim deleted a comment from qlty-cloud-legacy bot Feb 16, 2021
@decidim decidim deleted a comment from qlty-cloud-legacy bot Feb 16, 2021
@decidim decidim deleted a comment from qlty-cloud-legacy bot Feb 16, 2021
@decidim decidim deleted a comment from qlty-cloud-legacy bot Feb 16, 2021
@decidim decidim deleted a comment from qlty-cloud-legacy bot Feb 16, 2021
@decidim decidim deleted a comment from qlty-cloud-legacy bot Feb 16, 2021
@decidim decidim deleted a comment from qlty-cloud-legacy bot Feb 16, 2021
@verarojman
Copy link
Copy Markdown
Contributor Author

@decidim/mantainers could you review this when you have a moment? :) Thanks! ❤️

@mrcasals mrcasals added type: fix PRs that implement a fix for a bug and removed type: bug labels Feb 24, 2021
Copy link
Copy Markdown
Contributor

@mrcasals mrcasals left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks!

# end: model.end_time
# }
#
class DateCell < Decidim::ViewModel
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.

❤️

@mrcasals mrcasals merged commit e417144 into decidim:develop Feb 24, 2021
@verarojman verarojman deleted the fix/debate-dates branch February 24, 2021 09:15
entantoencuanto added a commit that referenced this pull request Feb 25, 2021
* develop: (232 commits)
  Add Votings to Open Data export (#7388)
  Add order in not highlighted assemblies by weight (#7444)
  Resort Menus (#7460)
  Polling Officer Zone (#7439)
  Fix session timeout when using multiple windows or tabs (#7459)
  Fix display of debates with multiple dates (#7393)
  chore: split election tests (#7451)
  style: make selected values primary labels with delete button (#7448)
  Fix and tests to avoid registered users being invited again (#7392)
  Migrate Admin menus to Menu Registry (#7368)
  New Crowdin updates (#7338)
  Bump to carrierwave 2.2.0 (#7441)
  Voting: show callout when Polling Stations miss Polling Officers (#7417)
  Further default orders for the API (#7436)
  Fix random order inconsistencies (#7437)
  Ensure Rails is locked to 5.2.4.x series (#7430)
  Add default order by ID to API list queries (#7424)
  Update dependencies (#7422)
  Ignore warning on CI when no artifacts to upload (#7420)
  Filter and search polling officers (#7411)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: debates type: fix PRs that implement a fix for a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Debates with multiple days

2 participants