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

Meetings management for minutes #3213

Merged
merged 21 commits into from
Apr 27, 2018
Merged

Meetings management for minutes #3213

merged 21 commits into from
Apr 27, 2018

Conversation

isaacmg410
Copy link
Contributor

@isaacmg410 isaacmg410 commented Apr 12, 2018

🎩 What? Why?

This PR adds a new section to manage minutes, admins can enter a description, video url , audio url and can make it visible to front end for all users.

📌 Related Issues

📋 Subtasks

  • Add CHANGELOG entry
  • Create new entity Decidim::Meetings::Minute
  • Add fields to form
  • Add migration
  • Create Commands
  • Create FormClass
  • Add new entity to AdminLog
  • Add new admin routes
  • Command and Form Specs

📷 Screenshots (optional)

Description

@ghost ghost assigned isaacmg410 Apr 12, 2018
@ghost ghost added the status: WIP label Apr 12, 2018
@xabier xabier mentioned this pull request Apr 12, 2018
16 tasks
Copy link
Contributor

@josepjaume josepjaume left a comment

Choose a reason for hiding this comment

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

Hi! Nice work. At first, I got confused by the minutes naming - but it turns out it's correct although I have my doubts with the singular form Minute. Maybe it should be MinutesEntry?

That said, I can't see any system specs. I know they're a it of a PITA to write, but they provide essential value. Not having any system specs vs having a single, happy path one totally changes the robustness of the system and prevents regressions.

Copy link
Contributor

@oriolgual oriolgual left a comment

Choose a reason for hiding this comment

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

Sorry to be nit-picky, but the entity should be Minutes instead of Minute (https://en.wikipedia.org/wiki/Minutes), it might be misleading otherwise.

@isaacmg410
Copy link
Contributor Author

@josepjaume @oriolgual so, Minutes or MinutesEntry?

System specs for FrontEnd? I was looking for a system spec of meeting to do it there, and I can't find it. Is there any system spec for meetings?

@mrcasals
Copy link
Contributor

@isaacmg410 master has 12 files of system specs for meetings https://github.com/decidim/decidim/tree/master/decidim-meetings/spec/system

@isaacmg410
Copy link
Contributor Author

@mrcasals that's it, But does anyone test the show view of the meeting?

@mrcasals
Copy link
Contributor

@isaacmg410 at least 160 lines of code checking it

describe "show", :serves_map do
let(:meetings_count) { 1 }
let(:meeting) { meetings.first }
let(:date) { 10.days.from_now }
before do
meeting.update!(
start_time: date.beginning_of_day,
end_time: date.end_of_day
)
visit resource_locator(meeting).path
end
it "shows all meeting info" do
expect(page).to have_i18n_content(meeting.title)
expect(page).to have_i18n_content(meeting.description)
expect(page).to have_i18n_content(meeting.location)
expect(page).to have_i18n_content(meeting.location_hints)
expect(page).to have_content(meeting.address)
expect(page).to have_content(meeting.reference)
within ".section.view-side" do
expect(page).to have_content(date.day)
expect(page).to have_content("00:00 - 23:59")
end
end
context "without category or scope" do
it "does not show any tag" do
expect(page).to have_no_selector("ul.tags.tags--meeting")
end
end
context "with a category" do
let(:meeting) do
meeting = meetings.first
meeting.category = create(:category, participatory_space: participatory_process)
meeting.save
meeting
end
it "shows tags for category" do
expect(page).to have_selector("ul.tags.tags--meeting")
within "ul.tags.tags--meeting" do
expect(page).to have_content(translated(meeting.category.name))
end
end
it "links to the filter for this category" do
within "ul.tags.tags--meeting" do
click_link translated(meeting.category.name)
end
expect(page).to have_select("filter_category_id", selected: translated(meeting.category.name))
end
end
context "with a scope" do
let(:meeting) do
meeting = meetings.first
meeting.scope = create(:scope, organization: organization)
meeting.save
meeting
end
it "shows tags for scope" do
expect(page).to have_selector("ul.tags.tags--meeting")
within "ul.tags.tags--meeting" do
expect(page).to have_content(translated(meeting.scope.name))
end
end
it "links to the filter for this scope" do
within "ul.tags.tags--meeting" do
click_link translated(meeting.scope.name)
end
within ".filters" do
expect(scopes_picker_find(:filter_scope_id, multiple: true, global_value: "global")).to have_scope_picked(meeting.scope)
end
end
end
context "with linked proposals" do
let(:proposal_component) do
create(:component, manifest_name: :proposals, participatory_space: meeting.component.participatory_space)
end
let(:proposals) { create_list(:proposal, 3, component: proposal_component) }
before do
meeting.link_resources(proposals, "proposals_from_meeting")
end
it "shows related proposals" do
visit_component
click_link translated(meeting.title)
proposals.each do |proposal|
expect(page).to have_content(proposal.title)
expect(page).to have_content(proposal.author.name)
expect(page).to have_content(proposal.votes.size)
end
end
end
context "with linked resources" do
let(:dummy_component) do
create(:component, manifest_name: :dummy, participatory_space: meeting.component.participatory_space)
end
let(:dummy_resources) { create_list(:dummy_resource, 3, component: dummy_component) }
before do
meeting.link_resources(dummy_resources, "meetings_through_dummy_resources")
end
it "shows related resources" do
visit_component
click_link translated(meeting.title)
dummy_resources.each do |dummy_resource|
expect(page).to have_i18n_content(dummy_resource.title)
end
end
end
it_behaves_like "has attachments" do
let(:attached_to) { meeting }
end
shared_examples_for "a closing report page" do
it "shows the closing report" do
visit_component
click_link translated(meeting.title)
expect(page).to have_i18n_content(meeting.closing_report)
within ".definition-data" do
expect(page).to have_content("ATTENDEES COUNT #{meeting.attendees_count}")
expect(page).to have_content("ATTENDING ORGANIZATIONS #{meeting.attending_organizations}")
end
end
end
context "when the meeting is closed and had no contributions" do
let!(:meeting) { create(:meeting, :closed, contributions_count: 0, component: component) }
it_behaves_like "a closing report page"
it "does not show contributions count" do
within ".definition-data" do
expect(page).to have_no_content("CONTRIBUTIONS COUNT 0")
end
end
end
context "when the meeting is closed and had contributions" do
let!(:meeting) { create(:meeting, :closed, contributions_count: 1, component: component) }
it_behaves_like "a closing report page"
it "shows contributions count" do
within ".definition-data" do
expect(page).to have_content("CONTRIBUTIONS COUNT 1")
end
end
end
end

@isaacmg410
Copy link
Contributor Author

@mrcasals sorry, I'haven't seen this. 😕

@oriolgual
Copy link
Contributor

I'd go with Minutes

@ghost ghost added the status: WIP label Apr 16, 2018
@carolromero
Copy link
Member

@josepjaume Before doing more system specs, I want confirmation from @decidim/product that works as well they want.

Hi @isaacmg410 sorry to be late. I've checked the feature on staging and I have some doubts regarding the video and audio links:

So, you enter the links via admin:

imagen

And they are displayed like this:

imagen

I've noticed that you actually need to click on the download icon to reproduce the video/audio file. I understand that they can't be embedded? In fact this is what I expected. If this is not possible we would need a way to enter a title describing the links.

@isaacmg410
Copy link
Contributor Author

@carolromero thats why I stopped this PR. I need some clarify/design about minutes. I put the download icon, to have something. maybe @decidim/lot-px can say something

@carolromero
Copy link
Member

@isaacmg410 ok, to move forward, let's fix the links behaviour, so if you click on a link, it opens it.
And merge this PR.
Later we can decide if we embed the media files or not.

@isaacmg410
Copy link
Contributor Author

@josepjaume changes applied, and system spec for admin done!

josepjaume
josepjaume previously approved these changes Apr 23, 2018
@josepjaume
Copy link
Contributor

Great! Thanks!

description: @form.description,
video_url: @form.video_url,
audio_url: @form.audio_url,
is_visible: @form.is_visible,
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please rename this to visible?

module Decidim
module Meetings
# The data store for a Minutes in the Decidim::Meetings component.

Copy link
Contributor

Choose a reason for hiding this comment

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

Extra line unneeded?

Decidim::Meetings::AdminLog::MinutesPresenter
end

def component
Copy link
Contributor

Choose a reason for hiding this comment

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

delegate :component, to: :meeting maybe?

@ghost ghost added the status: WIP label Apr 26, 2018
@isaacmg410
Copy link
Contributor Author

So, can this be merged?

@mrcasals mrcasals merged commit 8d0fba4 into master Apr 27, 2018
@ghost ghost removed the status: WIP label Apr 27, 2018
@mrcasals mrcasals deleted the 3044_manage_minutes branch April 27, 2018 08:48
@mrcasals
Copy link
Contributor

@isaacmg410 after merging this, master started failing due to an incompatibility with #3291, can you fix it please?

https://circleci.com/gh/decidim/decidim/92355

@isaacmg410
Copy link
Contributor Author

@mrcasals Fixed in this PR #3306

tramuntanal added a commit that referenced this pull request May 5, 2018
* Fix migration (#3292)

* Search homepage (#3294)

* search boxes

* boxes stylish

* Change broken link on Getting started and add definition on checklist (#3303)

* Update link to checklist on getting_started.md

* update checklist.md

Add  definition of how the slug must be for the terms-and-conditions page to display it in the registration form.

* Fix codeclimate compliance

* Meetings management for minutes (#3213)

* [WIP] manage minutes

* wip working with admin_log

* fix log and add specs

* add changelog line and fix documentation

* add space before %> in html

* rename to minutes and add system specs

* add consultations into gemfile

* add admin specs for minutes

* change is_visible to visible and apply some other requested changes

* normalize en

* [FIX] Do not set the ajax endpoint to the member but to the collection (#3262)

* [FIX] Do not set the ajax endopont to the member but to the collection, so it can be used when creating.

* Changelog.

* Make linter happy.

* [TEST|REFACTOR] Extract capybara_data_picker.

* [WIP] Test.

* [TEST] Test proposals association in results CRUD.

* [TEST|REFACTOR] Apply renaming of capybara behaviour method.

* Rubocopify.

* [REFACTOR] Rename changed method name.

* [REFACTOR] Remove commented methods.

* Update README.md (#3298)

change reference to votes with reference to signatures

* Component permissions manifest (#3300)

* Try to keep our mental health

Naming these nested block variables with different names helps stay
mentally healthy.

* Indentation fix

* Remove unnecessary memoization

This is a private method called from a single place.

* Add a permission options manifest

* Change options when switching selected workflow

* Improve spec's readability

Foo was both the name of the authorized action and the name of the
option, that was confusing.

* Improve dummy authorization handlers

* Move them outside of decidim.
* Install them optional via the `--demo` option.
* Merge the "example" one with the "dummy" one. Their purpose was the
  same: explain the feature, so we merge both taking the best of each
  (docs + real working example).
* Add another dummy handler, so the "handler" selection features can be
  used on development applications by default.

* Allow optional permission settings

* Add changelog entry

* Add documentation

And also merge documentation for authorizations in a single place.

* Version bump

* new card meeting multiple dates (#3280)

* Dry CI config (#3258)

* Dry simple steps

* Dry steps with module names

* Rename processes step to match module name

* Use a glob pattern in paths lists

* Update design navigation (#3295)

* update provess-navigation

* update initiatives cards

* User profile (#3261)

* initial setup profile

* block profile card

* tabs control

* tabs title bar

* timeline

* edit card-widget

* generalize

* common width widget left item

* center icons

* rename tabs

* absolutes

* following/followers

* add inline filters to notifications

* inline filters minimal fix

* update links header

* rounded profile topbar

* dropdown styled

* notifications menu

* dropdown arrows

* fix typo

* restore login status

* member of, in user card profile

* icons changed

* fix form for erb linter (#3306)

* Introduce coauthorable concern and coauthorship model.

* Fix version format for npm (#3312)

* Privatize private method

* Make sure we only read file once

* Extract a private method

To try make the code explain itself.

* Add missing version check

We're now using `.dev` for development versions so we need to add this
check so that those are properly transformed into a semver compatible
string.

* Fix a couple of erblint offenses (#3311)

Probably crept in in a non rebased PR.

* Fix dev app's gemfile for external plugins (#3313)

* Correct optional gems location when generating app

Otherwise we get an error bundling it in external plugins since there's
no local folder in the final app:

```
The path `/path/to/decidim/development_app/decidim-consultations` does not exist
```

* Read gemspec only once

* Update ruby to version 2.5.1 (#3293)

* Update Gemfile.lock to update erb_lint to v 0.0.24

* fix erb_lint errors

* update to ruby 2.5.1

* Use ruby 2.5.1's docker image

* Update decidim-generators Gemfile.lock

* Update decidim_app-design Gemfile.lock

* Update decidim_app-design Gemfile.lock (2)

* [TEST] Add factory for coauthorsihps.

* [REFACTOR] Review Coauthorship (and its migration) foreign key definitions.

* [REFACTOR] Coauthorable asserts affect coauthorship instead of coauthorable, then it should be a spec instead of a shared_example.

* [RFC] Use cells to componentize the views (2nd take) (#2897)

* Introduce cells to componentize the UI

* Fix layout

* Update gems

* Fix layout

* Improve naming

* Add UserCell

* Render endorsers using cells

* Fix layout

* Improve naming and reuse cells

* Reuse AuthorBox cell

* Add Proposal M card cell

* Fix tests

* Refactor ViewModel, inheritance, autoload, move view_paths to engine

* use proposal_cell in participatory_processes/participatory_process_groups and participatory_spaces

* Refactor cell_proposal_m w/ action `footer` context aware.

* Replace partial `shared/tags` with `tags_cell`

* remove partial `shared/tags`

* move helper_methods from Decidim::ActionAuthorization to Decidim::ActionAuthorizationHelper

* added proposal header cell

* Replace partial `shared/author_reference` with `author_box` cell

* remove partial `shared/author_reference`

* Replace partial `proposal_badge` with `badge` cell

* remove partial `proposal_badge`

* move helpers to/from `ViewModel`s

* use content_tag in badge cell

* Proposal show use badge cell

* update Gemfile.lock

* fix formatting

* rename `feature` to `component`

* restore shared/tags partial for meetings

* fix Cell::ViewModel::Partial error in tests

* use cell badge in similar_proposal and proposal_embed

* remove locale unused keys

* fix single quotes erblint complaints

* removed unused i18n key

* Add card attr in proposal Manifest, add proposal cell, cell spec tests, refactor proposal_m_cell

* [wip] introduce card_for author

* Added author_cell spec

* removed unused locale key `view_proposal` from sortitions

* add Decidim::Debates::OfficialAuthorPresenter
to CardCell

* remove Devise::Controller::Helpers from Decidim:ViewModel

* fix erblint issues

* remove Devise::Controller::Helpers from CardCell

* remove Devise::Controller::Helpers from ProposalCell

* fix test system/report_proposal_spec

* fix test system/process_admin_manages_proposals_spec

* card_for merge(options)

* update gem to cells-rails 0.0.9, supresses forwardable warning: protect_against_forgery?

* updated the design_app Gemfile.lock

* add creation_date to author_cell

* force AuthorCell to use the top-level ::Devise::Controllers::Helpers

* clean-up

* Remove unused locale keys

* fix blog w AuthorCell, adds comments to AuthorCell

* fix show creation_date on proposal#show

* replace model.class.method_defined? with model.respond_to?

* Add TagsCell spec

* Remove unused code block

* Add more examples to TagsCell spec

* include `ActionController::Helpers` in `Decidim::Proposals::ViewModel` for helper methods used in `action_authorization.rb`

* removed unused actions and `true if` in ProposalCell

* update decidim-generators Gemfile

* move Decidim::ActionAuthorization to Decidim::ViewModel

* fix rubocop offense

* fix erb-lint issues

* update Gemfile.lock files (root, generators and design)

* Better linking back from admin to frontend (#3325)

* Remove old upgrade notes from 0.11

* Fix notifications styling on (at least) chromium (#3324)

Introduced in 01db57e.

* [TEST|REFACTOR] Force user_group.name uniqueness in user_group test factory. (#3290)

* [REFACTOR] Force user_group.name uniqueness in user_group test factory.

* Add change in Changelog.

* [DOC|FIX] Remove doubled line in **Changed** block.

* [FIX] Remove changes that belong to another branch.

* Fix CHANGELOG.md problem with git automatic merge.

* Fix conntroller name in routes (#3323)

* Revert "Remove old upgrade notes from 0.11"

This reverts commit c1efea7.

Sorry :disappoint:

* [FIX] DB table name.

* [REFACTOR|TEST] Move coauthorship into Decidim namespace and finish tests.

* Fix changelog (#3330)

* Rubocopify.

* Define Coauthorable object interface.

* Rubocopify.

* Rubocopify.

* Fine grained permissions (#3029)

* Add Permissions class to processes

* Add proposals permissions

* Make component and space manifests be aware of permissions classes

* Add permissions to assemblies

* Remove proposal abilities

* Make all proposal actions use the permissions system

* Ignore complexity checks on permissions classes

They *will* be complex anyway...

* Fix moderations specs

* Make comments know how to find their participatory space

* Add changelog

* Unify naming in favor of `class` insted of `klass`

* Rename method to clarify its behaviour

* Fix constant name

* Fix tests

* Remove redundant tests

Features are tested via the `admin_manages_proposals_spec.rb` tests,
access to those features are tested via the permissions tests.

* Add default interface for component permissions

* Fine grained permissions: meetings (#3105)

* Add permissions for meetings

* Move to permissions system

* Remove old abilities

* Add admin permissions for meetings

* Add missing admin permission checks

* Add changelog entry

* Remove redundant specs

* Use default interface to simplify code

* Fine grained permissions: surveys (#3108)

* Add surveys permissions

* Move to permissions system in the public part

* Move admin section to permissions system

* Rubocop autofix

* Add changelog file

* Remove redundant specs

* Remove abilities specs

* Use default interface to simplify code

* Fine grained permissions: comments (#3116)

* Remove abilities and redundant specs from comments

Permissions are handled by the space

* Add changelog

* Fine grained permissions: debates (#3114)

* Add permissions for debates

* Remove debates abilities

* Move to permissions system

* Remove redundant system specs

* Rubocop fixes

* Move to the new permissions system (#3113)

* Fine grained permissions: budgets (#3119)

* Add permissions

* Remove reundant specs

* Add context of pemrissions to the controllers

* Add CRUD permissions for budgets on admin

* Move abilities to permissions

* Add CHANGELOG

* Fix typo

* Fix copy&paste

* Improve readability

* Fix rubocop issues

* Fine grained permissions: accountability (#3122)

* Add permissions

* Remove redundant spec

* Move to permission system

* Add changelog

* rubocop fixes

* Fine grained permissions sortitions (#3127)

* Add permissions

* Fix typo

* Remove abilities

* Move to permissions

* Remove redundant specs

* Add changelog

* [WIP] Fine grained permissions: admin && core (#3137)

Fine grained permissions: admin && core

* Fix method name

This was introduced on a rebase.

* Fix bad rebase

* Fix specs

* Move blogs to permissions

* Do not inject abilities for initiatives

* Use permissions on menu block so tests can run

* Fix Gemfile.lock

* Fix admin specs

* Fine grained permissions: initiatives (#3304)

* comment line

* Remove unused tests

* Add public permissions

* Add specs for the public part of permissions

* Remove unused file

* Add tests for the admin permissions part

* Remove abilities

* Move controllers to permissions

* Add ApplicationController to initiatives

* Move views to permissions

* Fix permissions

* Fix inheritance

* Fix typo

* Fix forgotten `cannot?` calls

* Fix warning

* Add reference to permission class to space manifest

* Fix permissions

* Fix controller specs

* Fix public permissions

* Fix permissions chain for public part

* Fix attachment permissions for initiative user

* Fix permissions specs

* Fix committee requests specs

* rubocop fixes

* Fix permissions

* Fix Gemfile.lock files

* Fix ProposalsController after rebase

* Fix admin permissions

* Fix specs

* Fix bad merge

* Remove calls to unexisting method

* Fix admin specs

* Collaborative drafts (#3285)

* reorder public index

* sort missing stuff

* fix overflow author avatar

* ellipsis names

* previous draft version

* collaborator member

* no collaborator

* access requested

* update proposals view

* resort items collaboratives

* Renaming properly

* Update links

* fix erblint

* Remove duplicated space title on page meta tags (#3278)

* Remove duplicated space title on page meta tags

* Fix changelog

* Strange behaviour when creating an area with the same name (#3336)

* add validation uniqueness name in area form scoped with the area_type

* Add changelog line.

* add specs for form

* Add Changelog entry.
oriolgual pushed a commit that referenced this pull request Aug 27, 2018
* [WIP] Access button to collaborative draft.

* [LAYOUT] Add a .ml-s left margin to access collaborative drafts button.

* [WIP] CollaborativeDraftsController.

* [WIP] CollaborativeDraftsController.
[FIX] CollabortaiveOrderable.
[TEST] Make test pass.

* [FEATURE] Make CollaborativeDraft commentable.

* Apply rubocop corrections.

* Added default cell card to collaborative_drafts list. Pending to define a specific M-card.

* Added filter by state.

* Normalize i18n.

* Collaborative draft search: javascript for search filter.

* [FIX] Use 'published' state to filter by published state (instead of published_at).

* [WIP] Show collaborative draft.

* add `class.name` and `id` to CardCell in env.development

* Added commentable capacity to CollaborativeDrafts with CommentableCollaborativeDraft.

* Rubocopify.

* [WIP] Collaborative Draft Wizard

* [WIP] Editable collaborative_draft.

* [WIP|LAYOUT] Show CollaborativeDraft.

* [WIP|LAYOUT] Show CollaborativeDraft.

* [WIP|TEST] Start by defining specs.

* [WIP]

* [FIX] Correct previous bad renaming.

* Wizard for Collaborative Draft

* add state "open" on create ProposalDraft

* ProposalDraft Edit

* fix wizard total_steps

* Introduce coauthorable concern and coauthorship model. (#3310)

* Fix migration (#3292)

* Search homepage (#3294)

* search boxes

* boxes stylish

* Change broken link on Getting started and add definition on checklist (#3303)

* Update link to checklist on getting_started.md

* update checklist.md

Add  definition of how the slug must be for the terms-and-conditions page to display it in the registration form.

* Fix codeclimate compliance

* Meetings management for minutes (#3213)

* [WIP] manage minutes

* wip working with admin_log

* fix log and add specs

* add changelog line and fix documentation

* add space before %> in html

* rename to minutes and add system specs

* add consultations into gemfile

* add admin specs for minutes

* change is_visible to visible and apply some other requested changes

* normalize en

* [FIX] Do not set the ajax endpoint to the member but to the collection (#3262)

* [FIX] Do not set the ajax endopont to the member but to the collection, so it can be used when creating.

* Changelog.

* Make linter happy.

* [TEST|REFACTOR] Extract capybara_data_picker.

* [WIP] Test.

* [TEST] Test proposals association in results CRUD.

* [TEST|REFACTOR] Apply renaming of capybara behaviour method.

* Rubocopify.

* [REFACTOR] Rename changed method name.

* [REFACTOR] Remove commented methods.

* Update README.md (#3298)

change reference to votes with reference to signatures

* Component permissions manifest (#3300)

* Try to keep our mental health

Naming these nested block variables with different names helps stay
mentally healthy.

* Indentation fix

* Remove unnecessary memoization

This is a private method called from a single place.

* Add a permission options manifest

* Change options when switching selected workflow

* Improve spec's readability

Foo was both the name of the authorized action and the name of the
option, that was confusing.

* Improve dummy authorization handlers

* Move them outside of decidim.
* Install them optional via the `--demo` option.
* Merge the "example" one with the "dummy" one. Their purpose was the
  same: explain the feature, so we merge both taking the best of each
  (docs + real working example).
* Add another dummy handler, so the "handler" selection features can be
  used on development applications by default.

* Allow optional permission settings

* Add changelog entry

* Add documentation

And also merge documentation for authorizations in a single place.

* Version bump

* new card meeting multiple dates (#3280)

* Dry CI config (#3258)

* Dry simple steps

* Dry steps with module names

* Rename processes step to match module name

* Use a glob pattern in paths lists

* Update design navigation (#3295)

* update provess-navigation

* update initiatives cards

* User profile (#3261)

* initial setup profile

* block profile card

* tabs control

* tabs title bar

* timeline

* edit card-widget

* generalize

* common width widget left item

* center icons

* rename tabs

* absolutes

* following/followers

* add inline filters to notifications

* inline filters minimal fix

* update links header

* rounded profile topbar

* dropdown styled

* notifications menu

* dropdown arrows

* fix typo

* restore login status

* member of, in user card profile

* icons changed

* fix form for erb linter (#3306)

* Introduce coauthorable concern and coauthorship model.

* Fix version format for npm (#3312)

* Privatize private method

* Make sure we only read file once

* Extract a private method

To try make the code explain itself.

* Add missing version check

We're now using `.dev` for development versions so we need to add this
check so that those are properly transformed into a semver compatible
string.

* Fix a couple of erblint offenses (#3311)

Probably crept in in a non rebased PR.

* Fix dev app's gemfile for external plugins (#3313)

* Correct optional gems location when generating app

Otherwise we get an error bundling it in external plugins since there's
no local folder in the final app:

```
The path `/path/to/decidim/development_app/decidim-consultations` does not exist
```

* Read gemspec only once

* Update ruby to version 2.5.1 (#3293)

* Update Gemfile.lock to update erb_lint to v 0.0.24

* fix erb_lint errors

* update to ruby 2.5.1

* Use ruby 2.5.1's docker image

* Update decidim-generators Gemfile.lock

* Update decidim_app-design Gemfile.lock

* Update decidim_app-design Gemfile.lock (2)

* [TEST] Add factory for coauthorsihps.

* [REFACTOR] Review Coauthorship (and its migration) foreign key definitions.

* [REFACTOR] Coauthorable asserts affect coauthorship instead of coauthorable, then it should be a spec instead of a shared_example.

* [RFC] Use cells to componentize the views (2nd take) (#2897)

* Introduce cells to componentize the UI

* Fix layout

* Update gems

* Fix layout

* Improve naming

* Add UserCell

* Render endorsers using cells

* Fix layout

* Improve naming and reuse cells

* Reuse AuthorBox cell

* Add Proposal M card cell

* Fix tests

* Refactor ViewModel, inheritance, autoload, move view_paths to engine

* use proposal_cell in participatory_processes/participatory_process_groups and participatory_spaces

* Refactor cell_proposal_m w/ action `footer` context aware.

* Replace partial `shared/tags` with `tags_cell`

* remove partial `shared/tags`

* move helper_methods from Decidim::ActionAuthorization to Decidim::ActionAuthorizationHelper

* added proposal header cell

* Replace partial `shared/author_reference` with `author_box` cell

* remove partial `shared/author_reference`

* Replace partial `proposal_badge` with `badge` cell

* remove partial `proposal_badge`

* move helpers to/from `ViewModel`s

* use content_tag in badge cell

* Proposal show use badge cell

* update Gemfile.lock

* fix formatting

* rename `feature` to `component`

* restore shared/tags partial for meetings

* fix Cell::ViewModel::Partial error in tests

* use cell badge in similar_proposal and proposal_embed

* remove locale unused keys

* fix single quotes erblint complaints

* removed unused i18n key

* Add card attr in proposal Manifest, add proposal cell, cell spec tests, refactor proposal_m_cell

* [wip] introduce card_for author

* Added author_cell spec

* removed unused locale key `view_proposal` from sortitions

* add Decidim::Debates::OfficialAuthorPresenter
to CardCell

* remove Devise::Controller::Helpers from Decidim:ViewModel

* fix erblint issues

* remove Devise::Controller::Helpers from CardCell

* remove Devise::Controller::Helpers from ProposalCell

* fix test system/report_proposal_spec

* fix test system/process_admin_manages_proposals_spec

* card_for merge(options)

* update gem to cells-rails 0.0.9, supresses forwardable warning: protect_against_forgery?

* updated the design_app Gemfile.lock

* add creation_date to author_cell

* force AuthorCell to use the top-level ::Devise::Controllers::Helpers

* clean-up

* Remove unused locale keys

* fix blog w AuthorCell, adds comments to AuthorCell

* fix show creation_date on proposal#show

* replace model.class.method_defined? with model.respond_to?

* Add TagsCell spec

* Remove unused code block

* Add more examples to TagsCell spec

* include `ActionController::Helpers` in `Decidim::Proposals::ViewModel` for helper methods used in `action_authorization.rb`

* removed unused actions and `true if` in ProposalCell

* update decidim-generators Gemfile

* move Decidim::ActionAuthorization to Decidim::ViewModel

* fix rubocop offense

* fix erb-lint issues

* update Gemfile.lock files (root, generators and design)

* Better linking back from admin to frontend (#3325)

* Remove old upgrade notes from 0.11

* Fix notifications styling on (at least) chromium (#3324)

Introduced in 01db57e.

* [TEST|REFACTOR] Force user_group.name uniqueness in user_group test factory. (#3290)

* [REFACTOR] Force user_group.name uniqueness in user_group test factory.

* Add change in Changelog.

* [DOC|FIX] Remove doubled line in **Changed** block.

* [FIX] Remove changes that belong to another branch.

* Fix CHANGELOG.md problem with git automatic merge.

* Fix conntroller name in routes (#3323)

* Revert "Remove old upgrade notes from 0.11"

This reverts commit c1efea7.

Sorry :disappoint:

* [FIX] DB table name.

* [REFACTOR|TEST] Move coauthorship into Decidim namespace and finish tests.

* Fix changelog (#3330)

* Rubocopify.

* Define Coauthorable object interface.

* Rubocopify.

* Rubocopify.

* Fine grained permissions (#3029)

* Add Permissions class to processes

* Add proposals permissions

* Make component and space manifests be aware of permissions classes

* Add permissions to assemblies

* Remove proposal abilities

* Make all proposal actions use the permissions system

* Ignore complexity checks on permissions classes

They *will* be complex anyway...

* Fix moderations specs

* Make comments know how to find their participatory space

* Add changelog

* Unify naming in favor of `class` insted of `klass`

* Rename method to clarify its behaviour

* Fix constant name

* Fix tests

* Remove redundant tests

Features are tested via the `admin_manages_proposals_spec.rb` tests,
access to those features are tested via the permissions tests.

* Add default interface for component permissions

* Fine grained permissions: meetings (#3105)

* Add permissions for meetings

* Move to permissions system

* Remove old abilities

* Add admin permissions for meetings

* Add missing admin permission checks

* Add changelog entry

* Remove redundant specs

* Use default interface to simplify code

* Fine grained permissions: surveys (#3108)

* Add surveys permissions

* Move to permissions system in the public part

* Move admin section to permissions system

* Rubocop autofix

* Add changelog file

* Remove redundant specs

* Remove abilities specs

* Use default interface to simplify code

* Fine grained permissions: comments (#3116)

* Remove abilities and redundant specs from comments

Permissions are handled by the space

* Add changelog

* Fine grained permissions: debates (#3114)

* Add permissions for debates

* Remove debates abilities

* Move to permissions system

* Remove redundant system specs

* Rubocop fixes

* Move to the new permissions system (#3113)

* Fine grained permissions: budgets (#3119)

* Add permissions

* Remove reundant specs

* Add context of pemrissions to the controllers

* Add CRUD permissions for budgets on admin

* Move abilities to permissions

* Add CHANGELOG

* Fix typo

* Fix copy&paste

* Improve readability

* Fix rubocop issues

* Fine grained permissions: accountability (#3122)

* Add permissions

* Remove redundant spec

* Move to permission system

* Add changelog

* rubocop fixes

* Fine grained permissions sortitions (#3127)

* Add permissions

* Fix typo

* Remove abilities

* Move to permissions

* Remove redundant specs

* Add changelog

* [WIP] Fine grained permissions: admin && core (#3137)

Fine grained permissions: admin && core

* Fix method name

This was introduced on a rebase.

* Fix bad rebase

* Fix specs

* Move blogs to permissions

* Do not inject abilities for initiatives

* Use permissions on menu block so tests can run

* Fix Gemfile.lock

* Fix admin specs

* Fine grained permissions: initiatives (#3304)

* comment line

* Remove unused tests

* Add public permissions

* Add specs for the public part of permissions

* Remove unused file

* Add tests for the admin permissions part

* Remove abilities

* Move controllers to permissions

* Add ApplicationController to initiatives

* Move views to permissions

* Fix permissions

* Fix inheritance

* Fix typo

* Fix forgotten `cannot?` calls

* Fix warning

* Add reference to permission class to space manifest

* Fix permissions

* Fix controller specs

* Fix public permissions

* Fix permissions chain for public part

* Fix attachment permissions for initiative user

* Fix permissions specs

* Fix committee requests specs

* rubocop fixes

* Fix permissions

* Fix Gemfile.lock files

* Fix ProposalsController after rebase

* Fix admin permissions

* Fix specs

* Fix bad merge

* Remove calls to unexisting method

* Fix admin specs

* Collaborative drafts (#3285)

* reorder public index

* sort missing stuff

* fix overflow author avatar

* ellipsis names

* previous draft version

* collaborator member

* no collaborator

* access requested

* update proposals view

* resort items collaboratives

* Renaming properly

* Update links

* fix erblint

* Remove duplicated space title on page meta tags (#3278)

* Remove duplicated space title on page meta tags

* Fix changelog

* Strange behaviour when creating an area with the same name (#3336)

* add validation uniqueness name in area form scoped with the area_type

* Add changelog line.

* add specs for form

* Add Changelog entry.

* [WIP] Tests for CollaborativeDraft+Coauthorable.

* [REFACTOR] Remove decidim_author_id and decidim_user_group_id from collaborative_drafts table in favour of coauthorships.

* [WIP|TEST] Coauthorships and coauthorable.

* [WIP|TEST] Coauthorships and coauthorable.

* [TEST] Coauthorships and coauthorable.

* [REFACTOR] Apply new authorizations system instead of cancancan.

* [REFACTOR] Make CollaborativeDraft Coauthorable.

* [WIP] Hack presenter so that there is no crash.

* [FIX] Use correct permission action name :edit instead of :update.

* [REFACTOR] Apply new `card_for` and use `allowed_to?` instead of `can?`.

* Rubocopify.

* [REFACTOR] Allow Component resources to declare its card cell.

* Add Traceability, collaborative_draft_cell, collaborative_draft permisions, fix collaborative_draft views

* [REFACTOR] Remove DeclaresResourceManifest concern.

* [FEATURE] Added CollaborativeDraft.has_and_belongs_to_many users through access_requests intermediate table.

* fix translation scope

* disable "create as" in edit

* fix component.register_resource(:collaborative_draft)

* CollaborativeDraftCell spec, CollaborativeDraftCell with collapsible_list for authors

* Add create_collaborative_draft_spec

* refactor i18n helpers for collaborative drafts

* add update_collaborative_draft_spec.rb

* Add collaborator request_accept and request_reject, routes, actions, views and spec

* add versioning example to update_collaborative_draft_spec.rb

* Add collaborative drafts system spec

* Add collaborative drafts version system spec

* Remove DeclaresResourceManifest spec

* remove current_user_ability_spec

* fix i18n CI issues

* RequestAccessToCollaborativeDraft command with notification to authors

* RejectAccessToCollaborativeDraft command with notification to requester and authors

* small edits

* AcceptAccessToCollaborativeDraft command with notification to requester and authors

* fix i18n collaborative_drafts requests flash alert

* fix create_collaborative_draft_spec.rb

* close/publish collaborative draft, reject pending requests and notify authors

* close, publish, controller, access/reject/accept request and events specs for collaborative drafts

* refactor collaborator_requests from `has_and_belongs_to_many` to `has_many :through`

* reviewed irreversible_action_modal styles

* re-reviewed irreversible_action_modal styles

* Fix: proposal wizard help text announcement, has_many LineLength

* Admin can enable/disable collaborative drafts

* Fix failing specs

* enable collaborative drafts in seeds

* Number of contributors to the draft

* Fix failing specs

* fix Faker::UniqueGenerator::RetryLimitExceeded for user_group factory

* create a proposal when collaborative_draft is published

* remove double redirect from proposals controller

* renamed to `withdrawn` the `closed` state

* Add link in collaborative drafts detail page back to list #3713

* fix command PublishCollaborativeDraft, replace closed? with withdrawn?

* fix collaborative draft seeds

* Add Counter Cache Coauthorships To CollaborativeDrafts

* Remove Index Counter Cache Coauthorships To Proposals

* refactor CollabDrafts to use CoathorshipCell

* Fix collaborative_drafts_controller_spec

* fix 3 rubocop offenses

* fix 2 rubocop offenses

* fix invalid Coauthorships in specs

* Publish CollabDraft as Proposal with coauthors

* no proposal_limit when creating proposal from collaborative draft

* create proposal with the collaborative drafts' scope and category

* fix proposal_limit_reached for spec

* fix update_collaborative_draft_spec

* refactor to use coathorships not identities to crate the new proposal

* refactor Publish CollabDraft

* Add CHANGELOG entry

* Fix collaborative_draft spec

* Generate `collaborative_draft_versions` route with Rails routes

* remove `votes` from CollaborativeDraftMCard footer

* Generate `button_continue` from `irreversible_modal` route with Rails routes

* Memoize linked `collaborative_draft`

* remove :link_resource_name from resource_manifest

* RequestAccessToCollaborativeDraft: form, command, view

* AcceptAccessToCollaborativeDraftForm: form, command, view

* RejectAccessToCollaborativeDraftForm: form, command, view

* refactor add_coauthor to use user_group

* Module with Attachment common methods for proposals and collaborative_drafts

* removed unused method :organization

* use `authored_by?`

* normalized en locale

* renormalize en locale & erblit

* include AttachmentMethods to UpdateProposal

* scope requester_user to organization

* refactor PublishCollaborativeDraft command, CollaboratorRequests to its own controller

* various mini fixes

* Refactor CollaborativeDraftAccessRequestEvent to DRY

* Full words for accept_request_button_label and reject_request_button_label

* permission if collaborative_drafts are enabled

* fix reject/accept_access_to_collaborative_draft_spec

* fix request_access permission

* refactor PublishCollaborativeDraft.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants