Skip to content

Add conference partners#4251

Merged
mrcasals merged 16 commits intomasterfrom
feature/conference_partners
Oct 17, 2018
Merged

Add conference partners#4251
mrcasals merged 16 commits intomasterfrom
feature/conference_partners

Conversation

@isaacmg410
Copy link
Copy Markdown
Contributor

@isaacmg410 isaacmg410 commented Oct 8, 2018

🎩 What? Why?

This PR adds the new functionality of Conference Partners. Is part of the #3709

📌 Related Issues

📋 Subtasks

  • Add CHANGELOG entry
  • Add partners CRUD
  • Apply partners design
  • Add documentation regarding the feature
  • Add/modify seeds
  • Add tests

📷 Screenshots (optional)

screenshot-localhost-3000-2018 10 17-09-35-32

Description

@ghost ghost assigned isaacmg410 Oct 8, 2018
@ghost ghost added the status: WIP label Oct 8, 2018
@isaacmg410 isaacmg410 changed the title [WIP] Add conference partners Add conference partners Oct 11, 2018
@isaacmg410
Copy link
Copy Markdown
Contributor Author

@decidim/lot-core this PR is ready to review 😄

@oriolgual
Copy link
Copy Markdown
Contributor

@rbngzlv could you add some screenshots too?

@isaacmg410
Copy link
Copy Markdown
Contributor Author

isaacmg410 commented Oct 17, 2018

@oriolgual I'will added
screenshot-localhost-3000-2018 10 17-09-35-32

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

Please add system specs for the admin

private

def partner
return block unless model.link.presence
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.

Maybe some of this view logic should go to the template, not inside the cell? It feels weird to me having all the markup here instead of the template.

def initialize(form, current_user, conference)
@form = form
@current_user = current_user
@conference = conference
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 the conference be part of the form too?

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.

why? We are doing the same with speakers, conference admins, assembly admins, assembly members...

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.

I think it's cleaner (you don't have to merge attributes from the form) but maybe I didn't review it correctly in other PRs.

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 still think that it is better to continue with the same system, for the whole decidim. Not in different ways according to the command...

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.

I agree to what @isaacmg410 says! 😄

# conference_partner - The ConferencePartner to update
def initialize(form, conference_partner)
@form = form
@conference_partner = conference_partner
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.

Same as the creation form, if I'd move this inside the form so the command doesn't need to check anything else.

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.

In this case, is conference_partner, not conference.


def edit
@partner = collection.find(params[:id])
enforce_permission_to :update, :partner, speaker: @partner
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 this be partner instead of speaker?

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.

You are right


def update
@partner = collection.find(params[:id])
enforce_permission_to :update, :partner, speaker: @partner
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 this be partner instead of speaker?

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.

You are right


def destroy
@partner = collection.find(params[:id])
enforce_permission_to :destroy, :partner, speaker: @partner
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 this be partner instead of speaker?

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.

You are right

def index
enforce_permission_to :index, :partner

@query = params[:q]
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.

Where is this used?

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.

nowhere, deleted!

@ghost ghost added the status: WIP label Oct 17, 2018
@isaacmg410
Copy link
Copy Markdown
Contributor Author

@oriolgual requested changes applied!

@mrcasals
Copy link
Copy Markdown
Contributor

Merging! Tests look like they are not passing, but they really passed:

https://circleci.com/workflow-run/a6af249c-e498-48fd-b200-077d298d00e4

@mrcasals mrcasals merged commit bb641ad into master Oct 17, 2018
@mrcasals mrcasals deleted the feature/conference_partners branch October 17, 2018 09:49
@ghost ghost removed the status: WIP label Oct 17, 2018
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.

3 participants