Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve proposals answer page #5671

Merged
merged 23 commits into from Feb 10, 2020
Merged

Conversation

mrcasals
Copy link
Contributor

@mrcasals mrcasals commented Jan 29, 2020

馃帺 What? Why?

This PR adds a proposal show page for the admin section. this page lists some proposal data, and merges the proposal notes and answer pages into it. This means we can get rid of the notes and answer pages, since they have been merged into the show page.

馃搶 Related Issues

馃搵 Subtasks

  • Add CHANGELOG entry
  • Add show page with proposal info
  • Move proposal notes to the show page
  • Move proposal answer to the show page
  • Add rankings
  • Show related meetings
  • Show attachments
  • Find a way to start a conversation with the author
  • Fix tests

馃摲 Screenshots (optional)

image

If the current admin can edit the proposal, a link to edit it is shown next to the proposal title:
image

@mrcasals
Copy link
Contributor Author

@decidim/core tests fail due to something about CodeClimate, can you check it please? I'm not sure what's going on...

@mrcasals mrcasals force-pushed the proposals/improve-answer-page branch 2 times, most recently from 9db666d to d244e82 Compare January 31, 2020 14:59
@mrcasals mrcasals marked this pull request as ready for review January 31, 2020 15:00
@mrcasals mrcasals force-pushed the proposals/improve-answer-page branch from d244e82 to 26795bf Compare February 3, 2020 08:16
@mrcasals mrcasals self-assigned this Feb 3, 2020
@mrcasals mrcasals changed the title [WIP] Improve proposals answer page Improve proposals answer page Feb 3, 2020
leio10
leio10 previously approved these changes Feb 6, 2020
Copy link
Contributor

@leio10 leio10 left a comment

Choose a reason for hiding this comment

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

Great work, very easy to review! 鉂わ笍

@@ -74,4 +74,6 @@
</div>
</div>

<%= render "decidim/proposals/admin/proposal_notes/proposal_notes" %>
<% if allowed_to? :create, :proposal_note %>
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't admins who can't create proposal notes be allowed to view existing notes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I kept the current behavior, and currently if you can't create proposal notes you can't view the current ones...

Gemfile.lock Outdated
@@ -684,10 +685,11 @@ GEM
childprocess (>= 0.5, < 4.0)
rubyzip (>= 1.2.2)
seven_zip_ruby (1.2.5)
simplecov (0.18.0)
simplecov (0.17.1)
Copy link
Contributor

Choose a reason for hiding this comment

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

Jeje, I thought this would happen when I saw the first commit 馃槃

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I had a little problem with dependencies and rebasing from master 馃槥

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, I had problems with CodeClimate coverage report when I updated to simplecov 0.18, I thought that was the problem: codeclimate/test-reporter#418

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we had to lock simplecov to v0.17.1 so that CI jobs could end successfully, see #5673 馃槃

Copy link
Contributor

@tramuntanal tramuntanal left a comment

Choose a reason for hiding this comment

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

Hi @mrcasals good job, just take a look to my comments.

Also, only if you have the time, it will be great to have an edit icon at the top-right corner 馃槃

@tramuntanal tramuntanal added in-review contract: PAM2020 Barcelona City Council contract labels Feb 9, 2020
@mrcasals mrcasals force-pushed the proposals/improve-answer-page branch from f51b366 to aee4ede Compare February 10, 2020 09:37
@mrcasals
Copy link
Contributor Author

@tramuntanal I've added the link to the edit page (see screenshot in the PR description), and I've updated the screenshot relating a meeting with the PR, so that it shows they appear.

Regarding the icon, as said in #5671 (comment), I've moved the discussion to #5630, but please let's not block this PR for that, I'll open a new one if needed 馃檹

Can you re-review this please?

Copy link
Contributor

@tramuntanal tramuntanal left a comment

Choose a reason for hiding this comment

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

Thanks @mrcasals !

@tramuntanal tramuntanal merged commit 0b2be02 into master Feb 10, 2020
@tramuntanal tramuntanal deleted the proposals/improve-answer-page branch February 10, 2020 14:20
microstudi pushed a commit to Platoniq/decidim that referenced this pull request Feb 21, 2020
* Add needed scopes to comments

* Update dependencies

* Add proposal show page

* Add notes to proposal show page

* Change proposal links

* Improve styles

* Move proposal answers to show page

* Show votes and endorsements rankings

* Fix locales

* Fix tests to use the new page

* Add tests for proposal info

* Add tests for ranking helper

* Remove unused test

* Remove unused file

* Show proposal related meetings

* Show message button next to user author

* Show related attachments

* Remove unused keys

* Add changelog

* Don't contact author if it's the current user

* Undo Gemfile.lock changes

* Crop endorsers list to 5

* Add link to edit proposal
@tramuntanal tramuntanal added the release: v0.21 Issues that need to be tackled for v0.21 label Feb 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contract: PAM2020 Barcelona City Council contract in-review release: v0.21 Issues that need to be tackled for v0.21
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve the answer page (private notes/reply/metadata)
3 participants