| Commit message (Collapse) | Author | Age | Files | Lines |
| |\
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes window.opener bug
Adds `noreferrer` value to rel attribute for external links
REF: https://gitlab.com/gitlab-org/gitlab-ce/issues/15331
See merge request !1953
|
| | | |
|
| | | |
|
| | | |
|
| |/
|
|
| |
Closes #15168
|
| | |
|
| |\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Wiki preview URL converting problem [via Markdown]
Current implementation when rendering the preview, thinks relative links are for project repository files.
We are creating a new preview route that will define correct context data to render for wikis instead.
Fixes #2380, #1184
See merge request !3461
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This fixes the problem where Markdown such as:
### 31st
Would get rendered as a link tag pointing to issue number 31 inside a
header tag.
See gitlab-org/gitlab-ce#14936 for more information.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
ImageLinkFilter.
Resolves #14411.
See merge request !3464
|
| | |
| |
| |
| |
| | |
Cleaning this up any further is a bit tricky as the caches in question
should only be evaluated if RequestStore is actually enabled.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Every object processed by ExternalIssueReferenceFilter can return a
different Project instance when calling "project". For example, every
note processed will have it's own associated Project. If we were to
cache Project#default_issues_tracker? on Project level this would have
no impact on Markdown rendering timings as the cache would have to be
built for every Project instance without it ever being re-used.
To work around this we cache Project#default_issues_tracker? in
Banzai::Filter::ExternalIssueReferenceFilter using the project's _id_
instead of the whole object. This setup allows re-using of the cached
data even when the Project instances used are different, as long as the
actual project IDs are the same.
|
| | |
| |
| |
| |
| | |
For an issue with around 200 notes this cuts down timings by around 150
milliseconds.
|
| | |
| |
| |
| |
| | |
These methods always return the same data for every class so there's no
point in computing their values on every call.
|
| | |
| |
| |
| |
| |
| |
| | |
These filters now use a single iteration over all the document nodes
instead of multiple ones. This in turn allows variables to be re-used
(e.g. links only have to be unescaped once). Combined with some other
refactoring this can drastically reduce render timings.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This was originally suggested by @ayufan and modified to be a bit
cleaner and use RequestStore instead of a regular Hash.
By caching the output of the two methods involved the number of queries
is reduced significantly. For example, for an issue with 200 notes (of
which 100 reference a number of merge requests) this cuts down the
amount of queries from around 6300 to around 3300.
|
| |/
|
|
|
|
|
| |
Rails' "url_helpers" method creates an anonymous Module (which a bunch
of methods) on every call. By caching the output of this method in a
dedicated method we can shave off about 10 seconds of loading time for
an issue with around 200 comments.
|
| |
|
|
| |
We're trying to avoid circular dependency errors.
|
| |\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* master: (121 commits)
Dedupe labels in labels selector in Dashboard pages
Refactor colors and lists
Add a safeguard in MergeRequest#compute_diverged_commits_count
Fix an issue when the target branch of a MR had been deleted
Add avatar to issue and MR pages header
Cleanup somce css colors
Re-group scss variables
Refactor `Todo#target`
Fixes issue with filter label missing on labels & milestones
Rename `Todo#to_reference` to `Todo#target_reference`
Fixed failing tests
Updated controller with before_action Fixed other issues based on feedback
Fixes issue on dashboard issues
Full labels data in JSON
Fixed issue with labels dropdown getting wrong labels
Update CHANGELOG
Use `Note#for_project_snippet?` to skip notes on project snippet
Use `Commit#short_id` instead of `Commit.truncate_sha`
Reuse `for_commit?` on conditional validations
Update schema info comment on todo related files
...
Conflicts:
app/models/issue.rb
db/schema.rb
spec/models/issue_spec.rb
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |/ |
|
| |
|
|
|
|
|
| |
This prevents false matches on relative links like
`[database](database.md)`.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/14220
|
| |\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add support for cross project references for labels
## Summary
Support for cross project references for labels.
## Rationale
1. Cross project label references are currently not supported in GitLab
1. `to_reference` method signature in `Label` model breaks the abstraction introduced in `Referable`.
`concerns/referable.rb: def to_reference(_from_project = nil)`
Signatures:
```
label.rb: def to_reference(format = :id)
commit_range.rb: def to_reference(from_project = nil)
commit.rb: def to_reference(from_project = nil)
external_issue.rb: def to_reference(_from_project = nil)
group.rb: def to_reference(_from_project = nil)
issue.rb: def to_reference(from_project = nil)
merge_request.rb: def to_reference(from_project = nil)
milestone.rb: def to_reference(from_project = nil)
project.rb: def to_reference(_from_project = nil)
snippet.rb: def to_reference(from_project = nil)
user.rb: def to_reference(_from_project = nil)
```
This MR suggests using `def to_reference(from_project = nil, format: :id)` which makes use of keyword arguments and preserves abstract interface.
1. We need support for cross project label references when we want to move issue to another project
It may happen that issue description, system notes or comments contain reference to label and this reference will be invalid after moving issue to another project and will not be displayed correctly unless we have support for cross project references.
Merge request that needs this feature: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2831
I think that cross project label references may be useful, (example: `Hey, see our issues for CI in GitLab CE! - gitab-org/gitlab-ce~"CI"`).
cc @JobV @DouweM @rspeicher
See merge request !2966
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
When `object_class.link_reference_pattern` was `nil` because object
being processed do not implemement link references `call` method
returned `nil` instead of returning document, even if document has been
processed in for basic reference pattern.
|
| |\ \
| | |
| | |
| | |
| | | |
Properly display YAML front matter in Markdown
See merge request !3072
|
| | | |
| | |
| | |
| | |
| | | |
This filter will detect YAML Front Matter and convert it to an HTML
table for prettier formatting.
|
| | |/ |
|
| |\ \
| |/
|/|
| |
| |
| |
| |
| | |
Add a spec for WikiPipeline
Removes the specs from GollumTagsFilter that were more like integration
tests for the pipeline than unit tests of the filter.
See merge request !3054
|
| | | |
|
| |/ |
|
| |\
| |
| |
| |
| |
| |
| | |
Replace Gollum `[[_TOC_]]` tag with result of TableOfContentsFilter
Closes #2494
See merge request !2952
|
| | |
| |
| |
| | |
Closes #2494
|
| | |
| |
| |
| | |
Closes https://dev.gitlab.org/gitlab/gitlabhq/issues/2660
|
| |/
|
|
| |
Closes #13625
|
| |\
| |
| |
| |
| |
| |
| |
| |
| | |
Update Gemojione for new hotness :sparkles:
Before | After
------ | -----
 | 
See merge request !2800
|
| | |
| |
| |
| |
| | |
Now that we're serving assets directly from the Gemojione gem's path,
the images are not in an `emoji/` sub-folder.
|
| |/
|
|
|
|
|
|
| |
- Apply the RelativeLinkFilter filter to other formats, e.g.,
reStructuredText so links from the Files view or the Project view work
- Remove the AsciidocPipeline pipeline
Fixes #3533.
|
| |
|
|
| |
Closes #11853
|