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

Add User groups profiles #4196

Merged
merged 33 commits into from
Oct 4, 2018
Merged

Add User groups profiles #4196

merged 33 commits into from
Oct 4, 2018

Conversation

mrcasals
Copy link
Contributor

@mrcasals mrcasals commented Sep 27, 2018

🎩 What? Why?

This PR is a base work for #3893. This PR adds the ability to show user groups profiles.

📌 Related Issues

📋 Subtasks

  • Add CHANGELOG entry
  • Add/modify seeds
  • Add tests
  • Move UserGroups to the same table as Users (move the model, add migration)
  • Migrate data:
    • coauthorships
    • comments
    • consultation votes
    • debates
    • initiatives
    • initiatives votes
    • memberships
    • proposal endorsements
  • Fix other migrations
  • Show user group profiles under myhost.com/profiles/:nickname (fix presenters)

📷 Screenshots (optional)

Authors inline (left is a user group, right is a normal user):
Description

Clicking on the nickname of that user group takes you to its profile page:

@mrcasals mrcasals self-assigned this Sep 27, 2018
@mrcasals mrcasals force-pushed the user-groups/add-profile branch 3 times, most recently from 5685262 to 149639b Compare October 1, 2018 13:39
@ghost ghost added the status: WIP label Oct 4, 2018
@mrcasals mrcasals removed their assignment Oct 4, 2018
oriolgual
oriolgual previously approved these changes Oct 4, 2018
@mrcasals mrcasals changed the title [WIP] Add User groups profiles Add User groups profiles Oct 4, 2018
@mrcasals
Copy link
Contributor Author

mrcasals commented Oct 4, 2018

We tried the migrations locally and everything looks good!

Waiting for tests to merge this.

@mrcasals mrcasals merged commit 01375af into master Oct 4, 2018
@mrcasals mrcasals deleted the user-groups/add-profile branch October 4, 2018 10:54
tramuntanal pushed a commit that referenced this pull request Oct 9, 2018
* Migrate user groups to users table

* Set correct default scopes

* Show user group profiles

* Use `profile_holder` instead of `user` as a helper

* Fix User Group presenter

* Fix user group factory

* Move migration where it should belong

* Fix some tests

* Fix rubocop issues

* Improve data migration

* Fix RegistrationForm specs

* Fix specs

* Fix rubocop complaints

* Fix admin specs

* Fix index on migration

* Fix proposals specs

* Fix rubocop complaints

* Show user groups profiles

* Fix more rubocop lint errors

* Migrate proposals endorsements

* Fix user groups IDs on comments

* Fix data on debates

* Fix data on initiatives

* Fix data on consultations

* Add changelog entry

* Redirect to correct action so that links highlight properly

* Don't let user groups be contacted by now

* Register UserGroup resource so that cards work

* Pass the current user as a context for the profile cells

* Tweak profile sidebar

* Fix presenters

* Fix specs

* Fix migration
@josepjaume josepjaume mentioned this pull request Oct 29, 2018
@mrcasals mrcasals added this to the CDP5 milestone Dec 10, 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.

2 participants