]> cat aescling's git repositories - mastodon.git/commit
Add announcements (#12662)
authorEugen Rochko <eugen@zeonfederated.com>
Thu, 23 Jan 2020 21:00:13 +0000 (22:00 +0100)
committerGitHub <noreply@github.com>
Thu, 23 Jan 2020 21:00:13 +0000 (22:00 +0100)
commitf52c988e12e464e7baefc2fdb48ddf4a95584664
tree1849998c1180280751f829769c10c84986bf0953
parent81cc86bb1ffb662843938379eeb522e3a6f11b79
Add announcements (#12662)

* Add announcements

Fix #11006

* Add reactions to announcements

* Add admin UI for announcements

* Add unit tests

* Fix issues

- Add `with_dismissed` param to announcements API
- Fix end date not being formatted when time range is given
- Fix announcement delete causing reactions to send streaming updates
- Fix announcements container growing too wide and mascot too small
- Fix `all_day` being settable when no time range is given
- Change text "Update" to "Announcement"

* Fix scheduler unpublishing announcements before they are due

* Fix filter params not being passed to announcements filter
65 files changed:
app/controllers/admin/announcements_controller.rb [new file with mode: 0644]
app/controllers/api/base_controller.rb
app/controllers/api/v1/announcements/reactions_controller.rb [new file with mode: 0644]
app/controllers/api/v1/announcements_controller.rb [new file with mode: 0644]
app/helpers/admin/action_logs_helper.rb
app/helpers/admin/announcements_helper.rb [new file with mode: 0644]
app/helpers/admin/filter_helper.rb
app/javascript/images/elephant_ui_plane.svg
app/javascript/mastodon/actions/announcements.js [new file with mode: 0644]
app/javascript/mastodon/actions/importer/normalizer.js
app/javascript/mastodon/actions/notifications.js
app/javascript/mastodon/actions/streaming.js
app/javascript/mastodon/actions/timelines.js
app/javascript/mastodon/components/error_boundary.js
app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js
app/javascript/mastodon/features/getting_started/components/announcements.js [new file with mode: 0644]
app/javascript/mastodon/features/getting_started/containers/announcements_container.js [new file with mode: 0644]
app/javascript/mastodon/features/getting_started/containers/trends_container.js
app/javascript/mastodon/features/home_timeline/index.js
app/javascript/mastodon/features/ui/components/media_modal.js
app/javascript/mastodon/reducers/announcements.js [new file with mode: 0644]
app/javascript/mastodon/reducers/index.js
app/javascript/styles/mastodon/components.scss
app/javascript/styles/mastodon/forms.scss
app/lib/entity_cache.rb
app/lib/inline_renderer.rb
app/models/account.rb
app/models/announcement.rb [new file with mode: 0644]
app/models/announcement_filter.rb [new file with mode: 0644]
app/models/announcement_mute.rb [new file with mode: 0644]
app/models/announcement_reaction.rb [new file with mode: 0644]
app/models/backup.rb
app/models/bookmark.rb
app/models/concerns/account_interactions.rb
app/models/custom_emoji.rb
app/policies/announcement_policy.rb [new file with mode: 0644]
app/serializers/rest/announcement_serializer.rb [new file with mode: 0644]
app/serializers/rest/reaction_serializer.rb [new file with mode: 0644]
app/validators/reaction_validator.rb [new file with mode: 0644]
app/views/admin/announcements/_announcement.html.haml [new file with mode: 0644]
app/views/admin/announcements/edit.html.haml [new file with mode: 0644]
app/views/admin/announcements/index.html.haml [new file with mode: 0644]
app/views/admin/announcements/new.html.haml [new file with mode: 0644]
app/workers/publish_announcement_reaction_worker.rb [new file with mode: 0644]
app/workers/publish_scheduled_announcement_worker.rb [new file with mode: 0644]
app/workers/scheduler/scheduled_statuses_scheduler.rb
config/initializers/simple_form.rb
config/locales/en.yml
config/locales/simple_form.en.yml
config/navigation.rb
config/routes.rb
db/migrate/20191218153258_create_announcements.rb [new file with mode: 0644]
db/migrate/20200113125135_create_announcement_mutes.rb [new file with mode: 0644]
db/migrate/20200114113335_create_announcement_reactions.rb [new file with mode: 0644]
db/schema.rb
lib/tasks/auto_annotate_models.rake
spec/controllers/api/v1/announcements/reactions_controller_spec.rb [new file with mode: 0644]
spec/controllers/api/v1/announcements_controller_spec.rb [new file with mode: 0644]
spec/controllers/api/v1/trends_controller_spec.rb [new file with mode: 0644]
spec/fabricators/announcement_fabricator.rb [new file with mode: 0644]
spec/fabricators/announcement_mute_fabricator.rb [new file with mode: 0644]
spec/fabricators/announcement_reaction_fabricator.rb [new file with mode: 0644]
spec/models/announcement_mute_spec.rb [new file with mode: 0644]
spec/models/announcement_reaction_spec.rb [new file with mode: 0644]
spec/models/announcement_spec.rb [new file with mode: 0644]