What it says on the title. https://github.com/user-attachments/assets/749763c0-08e4-4a3f-bf1e-0b35adb4329b
This is largely based on the interface to manage user blocks, for consistency and because we already baked in concepts like "creator", "revoker", or "ends_at" in the DB table. Misc details: - The first commit is https://github.com/openstreetmap/openstreetmap-website/pull/7132. This PR is built on top of that. - I haven't implemented a "show" page. - No pagination. - `reason` is a RichText field for consistency, because we have `reason` and `reason_format`, and because it was trivial to do. It feels overkill though. - For the list of periods to select from, I'm piggybacking on `UserBlock::PERIODS`. - Using [Terra Draw](https://terradraw.io/) for defining the geography of the moderation zone. I probably could have added more options, but keeping it simple for now. Happy to iterate on those (or anything else). Just wanted to start simple. You can view, comment on, or merge this pull request online at: https://github.com/openstreetmap/openstreetmap-website/pull/7148 -- Commit Summary -- * Display error message if note creation fails * Moderation zones must have `ends_at`, consistent with user blocks * CRUD interface for moderation zones * Draw moderation zones * Take expiry into account when checking moderation zones * Assign revoker after update deactivates modzone * Show status of moderation zones * Implement complex update rules, as per user blocks * DRY * On edit, zoom in on the existing area -- File Changes -- M app/abilities/ability.rb (4) M app/assets/javascripts/index/new_note.js (42) A app/assets/javascripts/moderation_zone.js (138) A app/controllers/moderation_zones_controller.rb (85) A app/helpers/moderation_zones_helper.rb (41) M app/models/moderation_zone.rb (11) A app/views/moderation_zones/_form.html.erb (25) A app/views/moderation_zones/_navigation.html.erb (12) A app/views/moderation_zones/_row.html.erb (23) A app/views/moderation_zones/edit.html.erb (8) A app/views/moderation_zones/index.html.erb (26) A app/views/moderation_zones/new.html.erb (8) M app/views/notes/new.html.erb (6) M config/locales/en.yml (35) M config/routes.rb (3) A db/migrate/20260604103822_tweak_moderation_zones_step_one.rb (15) A db/migrate/20260604105008_tweak_moderation_zones_step_two.rb (15) M db/structure.sql (4) M package.json (4) A test/controllers/moderation_zones_controller_test.rb (281) M test/factories/moderation_zones.rb (13) M test/models/moderation_zone_test.rb (19) M test/system/create_note_test.rb (20) A test/system/manage_moderation_zones_test.rb (35) M yarn.lock (10) -- Patch Links -- https://github.com/openstreetmap/openstreetmap-website/pull/7148.patch https://github.com/openstreetmap/openstreetmap-website/pull/7148.diff -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/7148 You are receiving this because you are subscribed to this thread. Message ID: <openstreetmap/openstreetmap-website/pull/[email protected]>
_______________________________________________ rails-dev mailing list [email protected] https://lists.openstreetmap.org/listinfo/rails-dev
