[openstreetmap/openstreetmap-website] Communities rsvp (PR #3756)

Brian DeRocher notifications at github.com
Tue Oct 18 02:17:15 UTC 2022


Stage 4 of the communities PRs. This PR adds RSVPs.

This PR is against osm/master, so it's cumulative. If you want to see the delta from stage 3 (events) to stage 4 (rsvps) see this PR https://github.com/openbrian/osm-microcosms/pull/206

If reviewers want to see deltas in this repository, I believe I'll need branches here.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/3756

-- 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.
  * Fix typo.
  * Adapt tests for recent feature of showing only communities with more than 2 members.
  * Add events including tests.
  * Create route for community events.  Use events#index and apply a filter for
  * Reformat dates.
  * Add links to microcosm
  * Add sample map of location for event.
  * Add sample directions
  * Remove styles.  Will add style after it is functional.
  * Remove disabled code
  * Translate all the things.
  * Add event organizers.
  * Replace .flex_row with bootstrap row which is also flex-based.
  * Add location_url, latitude, and longitude to events.
  * Create validation and model test for events.  Improve factory.
  * Allow organizers to edit an event.
  * Add tests for event_organizer.
  * Make the factory for events more dynamic.
  * Make events index page look better.  Show only future events.
  * Make event list look better.
  * Factor out formMapInput from event/new form and let community/new also use it.
  * Make events page look better.
  * Replace content_tag with tag.
  * Add test for events in the past.
  * Add more event_controller tests.
  * Use tag (in place of content_tag) correctly.
  * Don't pollute the global namespace.  Inline functions.
  * Add more tests for access control as non-organizer.
  * Warn if event was created in or updated to the past.
  * Get tests working by not using :controller/:action in tests.
  * Rename m to c.
  * Merge branch 'communities-communities' into communities-membership
  * Merge branch 'communities-membership' into communities-events
  * s/m_orig/s_orig/
  * Merge branch 'communities-communities' into communities-membership
  * Merge branch 'communities-membership' into communities-events
  * Inline 2 functions.
  * Merge branch 'communities-communities' into communities-membership
  * Merge branch 'communities-membership' into communities-events
  * Remove redundant curly braces.
  * Merge branch 'communities-communities' into communities-membership
  * Merge branch 'communities-membership' into communities-events
  * User can rsvp
  * User can rsvp
  * Allow user to cancel their intention to attend an event.
  * Show event attendees.
  * Translate all the things.
  * Use .user_cards for event attendances too.
  * Disable 1 button
  * Add events to header.
  * Add yes and no traits to event attendance factory.
  * Add tests for routing.
  * When using constants instead of strings, use them everywhere.
  * Create update_params for update and add another test.
  * Handle plurals better
  * If the user is not signed in, provide a link to login before having them RSVP.
  * No need for :login_link.  We just display a sentence with no params.
  * Add maybe constant and convenience functions.
  * Merge branch 'communities-rsvp' of github.com:openbrian/osm-microcosms into communities-rsvp
  * Display RSVPs as cards using a partial.
  * Ignore the PermitAttributes for the assignment to community_membership.role.
  * Merge branch 'master' into communities-communities
  * Merge branch 'communities-communities' into communities-membership
  * Merge branch 'communities-membership' into communities-events
  * Merge branch 'communities-events' into communities-rsvp

-- File Changes --

    M Gemfile (4)
    M Gemfile.lock (7)
    M app/abilities/ability.rb (21)
    M app/assets/javascripts/application.js (74)
    A app/assets/javascripts/communities.js (9)
    A app/assets/javascripts/event.js (9)
    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)
    A app/controllers/event_attendances_controller.rb (40)
    A app/controllers/events_controller.rb (100)
    M app/controllers/issues_controller.rb (2)
    M app/controllers/reports_controller.rb (2)
    A app/helpers/events_helper.rb (9)
    M app/helpers/issues_helper.rb (4)
    M app/models/client_application.rb (1)
    A app/models/community.rb (79)
    A app/models/community_link.rb (21)
    A app/models/community_member.rb (46)
    A app/models/event.rb (74)
    A app/models/event_attendance.rb (29)
    A app/models/event_organizer.rb (4)
    M app/models/issue.rb (2)
    M app/models/report.rb (1)
    M app/models/user.rb (4)
    A app/validators/datetime_format_validator.rb (16)
    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 (141)
    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)
    A app/views/events/_form.html.erb (48)
    A app/views/events/_index_list.html.erb (25)
    A app/views/events/edit.html.erb (3)
    A app/views/events/index.html.erb (15)
    A app/views/events/new.html.erb (7)
    A app/views/events/show.html.erb (83)
    M app/views/layouts/_header.html.erb (8)
    A app/views/users/_user_card.html.erb (8)
    M app/views/users/show.html.erb (6)
    A config/brakeman.ignore (29)
    A config/initializers/friendly_id.rb (107)
    M config/locales/en.yml (200)
    M config/routes.rb (20)
    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)
    A db/migrate/20221008144036_create_events.rb (16)
    A db/migrate/20221008224134_create_event_organizers.rb (10)
    A db/migrate/20221010234421_create_event_attendances.rb (18)
    M db/structure.sql (552)
    M lib/osm.rb (5)
    M test/abilities/abilities_test.rb (21)
    A test/controllers/communities_controller_test.rb (418)
    A test/controllers/community_links_controller_test.rb (204)
    A test/controllers/community_members_controller_test.rb (208)
    A test/controllers/event_attendances_controller_test.rb (113)
    A test/controllers/events_controller_test.rb (287)
    A test/factories/communities.rb (20)
    A test/factories/community_links.rb (7)
    A test/factories/community_members.rb (11)
    A test/factories/event_attendances.rb (15)
    A test/factories/event_organizers.rb (6)
    A test/factories/events.rb (14)
    A test/helpers/events_helper_test.rb (15)
    A test/models/community_link_test.rb (21)
    A test/models/community_member_test.rb (15)
    A test/models/community_test.rb (161)
    A test/models/event_attendance_test.rb (7)
    A test/models/event_organizer_test.rb (7)
    A test/models/event_test.rb (92)
    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/3756.patch
https://github.com/openstreetmap/openstreetmap-website/pull/3756.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3756
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/3756 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20221017/9fab89be/attachment-0001.htm>


More information about the rails-dev mailing list