Skip to content

Improve proposals answer page#5671

Merged
tramuntanal merged 23 commits intomasterfrom
proposals/improve-answer-page
Feb 10, 2020
Merged

Improve proposals answer page#5671
tramuntanal merged 23 commits intomasterfrom
proposals/improve-answer-page

Conversation

@mrcasals
Copy link
Copy Markdown
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
Copy Markdown
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
@mrcasals mrcasals requested review from agustibr and leio10 February 4, 2020 14:47
leio10
leio10 previously approved these changes Feb 6, 2020
Copy link
Copy Markdown
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! ❤️

</div>

<%= render "decidim/proposals/admin/proposal_notes/proposal_notes" %>
<% if allowed_to? :create, :proposal_note %>
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.

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

Copy link
Copy Markdown
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...

rubyzip (>= 1.2.2)
seven_zip_ruby (1.2.5)
simplecov (0.18.0)
simplecov (0.17.1)
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.

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

Copy link
Copy Markdown
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
Copy Markdown
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: qltysh-archive/test-reporter#418

Copy link
Copy Markdown
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
Copy Markdown
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 project: 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
Copy Markdown
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
Copy Markdown
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

in-review project: PAM2020 Barcelona City Council contract 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