[openstreetmap/openstreetmap-website] Communities membership (PR #3742)
Brian DeRocher
notifications at github.com
Sat Oct 8 12:52:32 UTC 2022
Stage 2 of the communities PRs. This PR adds user membership of communities.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/3742
-- Commit Summary --
* Add microcosm model and controller (show, show_by_key) and tests.
* Create the edit handler, but it doesn't do anything yet. Guests may not edit.
* Guest can also show_by_key.
* Remove trailing space.
* Add a list of all miccrocosms.
* bundle install friendly_id for slugs.
* Replace show_by_key with using friendly_id slugs.
* Convert Facebook and Twitter links into has_many links.
* Add location to microcosms.
* Admins can create and edit microcosms.
* Move the "new" microcosm link to the header.
* Microcosm row layout
* Remove empty files.
* Removed disabled code.
* When the creation save fails, send the user back to the form.
* StrongMigrations is a module.
* erblint
* Forgot to commit this file.
* Set not null on microcosm.{description,slug} and link attributes.
* Move styles to stylesheets.
* Remove disabled code.
* Replace link to geofabrik with TODO item.
* rubocop
* Use save not save!.
* find_or_initialize! should be find_or_initialize.
* Add missing NOT NULL constraints FK constraints.
* Translate all the things.
* Correcting a mistake. This table should have been created with min/max lat/lon as integer.
* Change lat and lon from decimal to integer.
* Replace hardcoded image of map with a leaflet map.
* Replace .flex_row with bootsrap row which is also flex-based.
* erblint fix
* Header should contain the name of the microcosm.
* Rename lat to latitude, lon to longitude, convert all coords to floats.
* Replace hard coded changesets with real ones.
* Add some validation and model testing for microcosms.
* Rename microcosm_valid() to validate() in order to bring out the similarity of this method.
* whitespace
* Add validation and model test for microcosm_link.
* Add validation for microcosm locations.
* Microcosm descriptions are not allowed to be nil/empty.
* Add missing entry for microcosms in compact-secondary-nav
* allow anyone to create a microcosm. For now?
* rubocop got pissy about indentation
* Move microcosm :new, :create to non-admin.
* Add instruction, all fields are required.
* add hint for location
* Order microcosms by longitude.
* Remove inline javascript to comply with CSP. Move that logic to microcosms.js.
* Add a bunch of tests for microcosm_controller.
* test microcosm update
* Add more tests. I prefer @title so templates don't need to call functions like t().
* This test can now run as plain user not administrator.
* Make the forms look like the rest of the website.
* Make microcosm index look better. Move edit link
* Factor out showMap code which will be used on multiple pages.
* Modify UI for mobile.
* Factor out formMapInput.
* Display if the changeset has review_requested.
* Sort by longitude and time of day
* Rubocop said replace content_tag with tag.
* Use tag (in place of content_tag) correctly.
* Don't pollute the global namespace.
* Subject: [PATCH 208/280] Improve error messages for microcosm controller and
* Add tests for controller when failures happen.
* Adapt to rubocop. In tests factor out some WET code into helper methods.
* Format these coords better.
* Rubocop cleanups
* Subject: [PATCH 237/280] Normalize longitude input before using it.
* Add an organizer to the microcosm.
* Allow users to report a microcosm.
* Get tests working by not using :controller/:action in tests.
* Should hav added organizer_id a while ago.
* Show the microcosms a user is an organizer of.
* Merge remote-tracking branch 'upstream/master' into microcosms-microcosms
* Non-admins can create and edit their own microcosms.
* Use declarative spec for who can edit microcosms.
* Add CRUD and testing for MicrocosmLinks.
* Resolve erblint and brakeman findings.
* prefer string interpolation
* Use bootstrap styles for the list of links.
* Use .content_map from common.
* Use the same design pattern as in diary entries for secondary-actions.
* Use nested resources.
* Move the sorting logic for microcosms to a separate function, fix it, and document it.
* Rename microcosms_i_organize to microcosms_organized.
* Move microcosms of_user into microcosms#index.
* Get these tests passing once again now that we're using nested resource routes.
* Move normalize_longitude from controller to a shared function in lib/osm.rb. Use it at the model level.
* Use translation for helper text in forms.
* Remove unused file.
* RFC 6761 - reserved domain names
* No need for assert_no_missing_translations in check_page_basics.
* Consolidate db migrations.
* No need to ignore a column ("key") that is no longer there.
* Rename Microcosms to Communities.
* Merge remote-tracking branch 'upstream/master' into communities-communities
* Add CommunityMember.
* Add comment about counter_cache for performance.
* Users may join microcosms multiple times, but only once per role.
* Rename m to c and mm to cm.
* Rename m to c and mm to cm.
* Organizers can edit their communities. Admin can promote members to organizers (first admin).
* Should have removed this.
* Promote users from the community members page, not the community page, so we can display users better.
* Put members on cards
* Merge remote-tracking branch 'upstream/master' into communities-communities
* Merge branch 'communities-communities' into communities-membership
* Add disabled link from earlier patch.
* Subject: [PATCH 023/280] Not all members are organizers
* Add diary entries of members of the microcosm
* Fix member index list.
* rubocop clean ups
* erblint cleanup
* Rename .members to .community_members.
* Remove disabled code
* save returns true or false, save! returns true or throws an exception.
* Replace custom styles with bootstrappy .card style.
* Minor scss improvement.
* Add FK references where needed.
* Hide Join button if already a member.
* Add tests for microcosm and event_organizer.
* Order of members needs to be deterministic for automated testing.
* Remove unused action.
* Allow a member to step up and become an organizer.
* Add ability to remove memberships.
* It's ok to have a user as both a member and an organizer.
* Use non-ajax for joining a microcosm.
* Add a bunch of tests for microcosm_controller.
* Add AAA comments
* Add comment that one test also tests add_first_organizer.
* Make the forms look like the rest of the website.
* Remove redundant if condition.
* Make display_names on user_cards overflow.
* Avoid using respond_to.
* Write up a test for update microcosm as a non-organizer.
* Refactor show_members page to loop over organizers then members.
* Allow user to leave a microcosm.
* Now that :error is a normal flash type, we can use the shorthand version.
* If the user is not signed in, provide a link to login before having them join.
* Get a failing test passing.
* refactor
* Only list microcosms with at least 2 members.
* Fix wording.
* Always show the communities you belong to.
-- File Changes --
M Gemfile (4)
M Gemfile.lock (7)
M app/abilities/ability.rb (17)
M app/assets/javascripts/application.js (74)
A app/assets/javascripts/communities.js (18)
M app/assets/stylesheets/common.scss (25)
A app/assets/stylesheets/communities.scss (9)
A app/controllers/communities_controller.rb (145)
A app/controllers/community_links_controller.rb (59)
A app/controllers/community_members_controller.rb (65)
M app/controllers/issues_controller.rb (2)
M app/controllers/reports_controller.rb (2)
M app/helpers/issues_helper.rb (4)
M app/models/client_application.rb (1)
A app/models/community.rb (78)
A app/models/community_link.rb (21)
A app/models/community_member.rb (46)
M app/models/issue.rb (2)
M app/models/report.rb (1)
M app/models/user.rb (4)
A app/views/communities/_form.html.erb (30)
A app/views/communities/_index_list.html.erb (25)
A app/views/communities/edit.html.erb (3)
A app/views/communities/index.html.erb (21)
A app/views/communities/new.html.erb (5)
A app/views/communities/no_such_community.html.erb (8)
A app/views/communities/show.html.erb (126)
A app/views/community_links/_form.html.erb (5)
A app/views/community_links/edit.html.erb (3)
A app/views/community_links/index.html.erb (27)
A app/views/community_links/new.html.erb (5)
A app/views/community_members/_form.html.erb (6)
A app/views/community_members/edit.html.erb (3)
A app/views/community_members/index.html.erb (39)
M app/views/layouts/_header.html.erb (4)
A app/views/users/_user_card.html.erb (8)
M app/views/users/show.html.erb (6)
A config/initializers/friendly_id.rb (107)
M config/locales/en.yml (134)
M config/routes.rb (15)
A db/migrate/20210517030520_create_communities.rb (19)
A db/migrate/20220820220545_create_friendly_id_slugs.rb (14)
A db/migrate/20220821143545_create_community_links.rb (11)
A db/migrate/20220925043305_create_community_member.rb (14)
M db/structure.sql (306)
M lib/osm.rb (5)
M test/abilities/abilities_test.rb (21)
A test/controllers/communities_controller_test.rb (402)
A test/controllers/community_links_controller_test.rb (204)
A test/controllers/community_members_controller_test.rb (208)
A test/factories/communities.rb (20)
A test/factories/community_links.rb (7)
A test/factories/community_members.rb (11)
A test/models/community_link_test.rb (21)
A test/models/community_member_test.rb (15)
A test/models/community_test.rb (161)
M test/models/issue_test.rb (5)
A test/system/report_community_test.rb (33)
M test/test_helper.rb (8)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/3742.patch
https://github.com/openstreetmap/openstreetmap-website/pull/3742.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3742
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/3742 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20221008/6877aa3a/attachment-0001.htm>
More information about the rails-dev
mailing list