Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-01-30Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2022-01-24Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2020-08-11Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2020-06-24Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2019-11-20Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2019-07-26Add frozen_string_literal to spec/lib (part 1)Thong Kuah
Using the sed script from https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
2019-07-16Rename Redactor classes to ReferenceRedactorSarah Yasonik
2019-06-05Use Redis for CacheMarkDownField on non AR modelsPatrick Bajao
This allows using `CacheMarkdownField` for models that are not backed by ActiveRecord. When the including class inherits `ActiveRecord::Base` we include `Gitlab::MarkdownCache::ActiveRecord::Extension`. This will cause the markdown fields to be rendered and the generated HTML stored in a `<field>_html` attribute on the record. We also store the version used for generating the markdown. All other classes that include this model will include the `Gitlab::MarkdownCache::Redis::Extension`. This add the `<field>_html` attributes to that model and will generate the html in them. The generated HTML will be cached in redis under the key `markdown_cache:<class>:<id>`. The class this included in must therefore respond to `id`.
2019-02-06Add local markdown versionJan Provaznik
Cached markdown version is composed both from global and local markdown version. This allows admins to bump version locally when needed (e.g. when external URL is changed).
2018-04-17for cached markdown fields, select the correct engineBrett Walker
and also make sure that if a field is saved, then the existing cache version is maintained or only upgraded to the version with the same markdown engine.
2018-04-11Support Markdown rendering using multiple projectsYorick Peterse
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.
2017-11-06Resolve "DashboardController#activity.json is slow due to SQL"Francisco Javier López
2017-09-06Adds cacheless render to Banzai object renderTiago Botelho
2017-08-03Change all `:empty_project` to `:project`Robert Speicher
2017-04-21Start versioning cached markdown fieldsNick Thomas
2017-04-07Add indication for closed or merged issuables in GFMAdam Buckland
Example: for issues that are closed, the links will now show '[closed]' following the issue number. This is done as post-process after the markdown has been loaded from the cache as the status of the issue may change between the cache being populated and the content being displayed. In order to avoid N+1 queries problem when rendering notes ObjectRenderer populates the cache of referenced issuables for all notes at once, before the post processing phase. As a part of this change, the Banzai BaseParser#grouped_objects_for_nodes method has been refactored to return a Hash utilising the node itself as the key, since this was a common pattern of usage for this method.
2016-10-16Add RTL support to markdown rendererEbrahim Byagowi
2016-10-08Use Hash rocket syntax to maintain Ruby 2.1 compatibility in specStan Hu
2016-10-07Use CacheMarkdownField for notesNick Thomas
2016-07-13ObjectRenderer doesn't crash when no objects to cache with ↵Paco Guzman
Rails.cache.read_multi
2016-07-12Object renderer read_multi rendered entries from CachePaco Guzman
2016-07-12Optimize system note visibility checking by hiding notes thatStan Hu
have been fully redacted and contain cross-project references. The previous implementation relied on Note#cross_reference_not_visible_for?, which essentially tries to render all the Markdown references in a system note and only displays the note if the user can see the referring project. But this duplicated the work that Banzai::NotesRenderer was doing already. Instead, for each note we render, we memoize the number of visible user references and use it later if it is available. Improves #19273
2016-06-24Support for rendering/redacting multiple documentsYorick Peterse
This commit changes the way certain documents are rendered (currently only Notes) and how documents are redacted. Previously both rendering and redacting would run on a per document basis. The result of this was that for every document we'd have to run countless queries just to figure out if we could display a set of links or not. This commit changes things around so that redacting Markdown documents is no longer tied into the html-pipeline Gem. This in turn allows it to redact multiple documents in a single pass, thus reducing the number of queries needed. In turn rendering issue/merge request notes has been adjusted to take advantage of this new setup. Instead of rendering Markdown somewhere deep down in a view the Markdown is rendered and redacted in the controller (taking the current user and all that into account). This has been done in such a way that the "markdown()" helper method can still be used on its own. This particular commit also paves the way for caching rendered HTML on object level. Right now there's an accessor method Note#note_html which is used for setting/getting the rendered HTML. Once we cache HTML on row level we can simply change this field to be a column and call a "save" whenever needed and we're pretty much done.