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
Conversation
@decidim/core tests fail due to something about CodeClimate, can you check it please? I'm not sure what's going on... |
9db666d
to
d244e82
Compare
d244e82
to
26795bf
Compare
There was a problem hiding this 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 %> |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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 馃槃
There was a problem hiding this comment.
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 馃槥
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 馃槃
There was a problem hiding this 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 馃槃
decidim-proposals/app/helpers/decidim/proposals/admin/proposals_helper.rb
Show resolved
Hide resolved
decidim-proposals/app/views/decidim/proposals/admin/proposals/_proposal-tr.html.erb
Show resolved
Hide resolved
decidim-proposals/app/views/decidim/proposals/admin/proposals/show.html.erb
Show resolved
Hide resolved
f51b366
to
aee4ede
Compare
@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? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mrcasals !
* 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
馃帺 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
CHANGELOG
entry馃摲 Screenshots (optional)
If the current admin can edit the proposal, a link to edit it is shown next to the proposal title: