gitlab-org--gitlab-foss/spec/services/notes
Yorick Peterse daad7144ec
Support Markdown rendering using multiple projects
This refactors the Markdown pipeline so it supports the rendering of
multiple documents that may belong to different projects. An example of
where this happens is when displaying the event feed of a group. In this
case we retrieve events for all projects in the group. Previously we
would group events per project and render these chunks separately, but
this would result in many SQL queries being executed. By extending the
Markdown pipeline to support this out of the box we can drastically
reduce the number of SQL queries.

To achieve this we introduce a new object to the pipeline:
Banzai::RenderContext. This object simply wraps two other objects: an
optional Project instance, and an optional User instance. On its own
this wouldn't be very helpful, but a RenderContext can also be used to
associate HTML documents with specific Project instances. This work is
done in Banzai::ObjectRenderer and allows us to reuse as many queries
(and results) as possible.
2018-04-11 14:10:19 +02:00
..
build_service_spec.rb Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true 2017-07-27 14:31:53 +02:00
create_service_spec.rb Fix quick actions for users who cannot update issues and MRs 2018-03-02 16:16:13 +00:00
destroy_service_spec.rb Reset todo counters when the target is deleted 2017-12-18 12:23:00 +00:00
post_process_service_spec.rb Merge branch 'jej/mattermost-notification-confidentiality-10-6' into 'security-10-6' 2018-04-05 08:41:56 +02:00
quick_actions_service_spec.rb Fix quick actions for users who cannot update issues and MRs 2018-03-02 16:16:13 +00:00
render_service_spec.rb Support Markdown rendering using multiple projects 2018-04-11 14:10:19 +02:00
update_service_spec.rb Replace '.team << [user, role]' with 'add_role(user)' in specs 2017-12-22 19:18:28 +11:00