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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markup for phase editing in groups #1248

Merged
merged 38 commits into from
Dec 29, 2017
Merged

Conversation

furilo
Copy link
Member

@furilo furilo commented Dec 12, 2017

Closes #1234 #1236 #1141 #1237 #1239 #1235 #1238

What does this PR do?

  • Markup for phase editing
  • Implementation

How should this be manually tested?

Alvaro's revision

  • Add to select News and Documents
  • Change Meetings with Agenda
  • New issue Link phases with pages (select2)
  • New tab phases
  • Change “Titulo de una fase”, “Descripción de una fase”
  • Not include “CTA box” and “Phases Map” when is group, also the dates of the phases.
  • New issue -> Highlight open phases

@codecov-io
Copy link

codecov-io commented Dec 12, 2017

Codecov Report

Merging #1248 into master will decrease coverage by 0.31%.
The diff coverage is 76.47%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1248      +/-   ##
==========================================
- Coverage   77.39%   77.08%   -0.32%     
==========================================
  Files         464      469       +5     
  Lines       12162    12354     +192     
==========================================
+ Hits         9413     9523     +110     
- Misses       2749     2831      +82
Impacted Files Coverage Δ
...pation/processes/process_stages_sort_controller.rb 0% <0%> (ø)
...odels/gobierto_participation/process_stage_page.rb 100% <100%> (ø)
...ers/gobierto_participation/processes_controller.rb 96.29% <100%> (-3.71%) ⬇️
app/models/gobierto_cms/page.rb 86.58% <100%> (+0.16%) ⬆️
...ierto_admin/gobierto_participation/process_form.rb 85.54% <100%> (-3.59%) ⬇️
...min/gobierto_participation/processes_controller.rb 79.71% <40%> (-7.39%) ⬇️
...p/helpers/gobierto_participation/process_helper.rb 69.23% <69.23%> (ø)
...pation/processes/process_stage_pages_controller.rb 73.8% <73.8%> (ø)
app/models/gobierto_participation/process_stage.rb 68.29% <74.5%> (-25.33%) ⬇️
...in/gobierto_participation/process_stages_helper.rb 75% <75%> (ø)
... and 15 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 493cec5...307d1e0. Read the comment docs.

@apradillap apradillap self-assigned this Dec 21, 2017
@apradillap apradillap changed the title Markup for phase editing in groups [WIP] Markup for phase editing in groups Dec 21, 2017
@apradillap apradillap changed the title [WIP] Markup for phase editing in groups Markup for phase editing in groups Dec 27, 2017
Copy link
Member

@ferblape ferblape left a comment

Choose a reason for hiding this comment

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

Good job!

Just review my comments. Most of them are scopes in the queries (we should avoid this error from now on ;)

And a couple of things:

  • When editing the phases of the process, in the breadcrumb the title of the process is not visible

  • When editing a stage in the breadcrumb says CMS

  • In Process model:

    • next_stage should use the new ordering, not the date
    • same with showcase_stage
    • in current_stage: remove the comment
    • self.open gets all the processes of all the sites. That method is quite dangerous. Is it used somewhere?
  • The URL of the Information and Results page should keep the user in the process. Now, it takes the user to the CMS section, and it should be the show action inside the process.

@@ -23,7 +23,7 @@
@import "simplemde.min";
@import "tipsy";
@import "jqtree";
@import "codemirror";
// @import "codemirror";
Copy link
Member

Choose a reason for hiding this comment

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

Is this correct?

Copy link
Contributor

Choose a reason for hiding this comment

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

Alvaro, estuvo probando "Remove the Codemirror CSS temporarily to see how it feels"
7ae4ea9 @furilo, what do we do?

private

def find_process_stage
::GobiertoParticipation::ProcessStage.find(params[:process_stage_id])
Copy link
Member

Choose a reason for hiding this comment

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

Scope: current_process.stages.find...

end

def find_process_stage_page
::GobiertoParticipation::ProcessStagePage.find(params[:id])
Copy link
Member

Choose a reason for hiding this comment

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

Scope: @process_stage.process_stage_page...

end

def find_process_stage
::GobiertoParticipation::ProcessStage.find(params[:id])
Copy link
Member

Choose a reason for hiding this comment

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

Scopes...

def build_information_stage
process.stages.build(
process: process,
title_translations: { 'en' => 'Information', 'es' => 'Información' },
Copy link
Member

Choose a reason for hiding this comment

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

Could we add Catalan?

end

def process
@process ||= GobiertoParticipation::Process.find_by(id: process_id)
Copy link
Member

Choose a reason for hiding this comment

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

current_site.processes

module GobiertoAdmin
module GobiertoParticipation
module ProcessStagesHelper
def admin_stage_url(stage)
Copy link
Member

Choose a reason for hiding this comment

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

The method returns paths, it should be named admin_stage_path?

@furilo
Copy link
Member Author

furilo commented Dec 28, 2017 via email

@apradillap
Copy link
Contributor

@ferblape I've corrected all the "requested changes" except next_stage and showcase_stage in Process model that are returning stages 😄
Highlights: I deleted self.open dangerous method, I'll check the scopes in future PRs, thanks!!

@ferblape
Copy link
Member

Thanks @apradillap just two more details I have just noticed:

screen shot 2017-12-29 at 07 20 27

  1. "More information" button should only be visible if there's a phase with the Information tool published. Otherwise, the link is broken and raises this error: https://rollbar.com/Populate/gobierto/items/692/

  2. The markup in the stages navigator for the first stage is wrong. In the example above the active stage is the second one, but the first stage is bold too, and the user can't distinguish which is the active stage.

Feel free to release after fixing these two issues 🚀

@ferblape
Copy link
Member

Also @apradillap could you reference in the PR all the issues it closes? 1238, 1235....

@apradillap apradillap merged commit 612ff08 into master Dec 29, 2017
@apradillap apradillap deleted the 1234-modify-info-about-phases branch December 29, 2017 11:34
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.

None yet

4 participants