Commit graph

11 commits

Author SHA1 Message Date
GitLab Bot
95b9a603c3 Add latest changes from gitlab-org/gitlab@master 2022-02-22 15:18:06 +00:00
GitLab Bot
6d3c75444a Add latest changes from gitlab-org/gitlab@master 2022-02-02 06:16:52 +00:00
GitLab Bot
63a014fe28 Add latest changes from gitlab-org/gitlab@master 2021-09-21 09:12:21 +00:00
Patrick Bajao
bf230da05d Support selective highlighting of lines
Instead of highlighting all lines when not all of them
are needed, only highlight from the beginning up to
the specified limit.

The `BlobPresenter#highlight` method has been updated
to support `to` param. This param will be used to limit
the content to be highlighted.
2019-09-02 11:44:45 +08:00
Peter Leitzen
6767326267 Use ActiveModel's type instead of virtus
The virtus project has been discontinued:

https://github.com/solnic/virtus/commit/a6f896984
2019-08-20 10:52:21 +00:00
Samantha Ming
fc0ff7cf03 Replace ... with new expansion options
- expand upwards
- expand downwards
- expand all

in both inline and parallel views
2019-08-10 02:36:32 +00:00
Patrick Bajao
6d318af5f9 Revert "Merge branch '65152-selective-highlight' into 'master'"
This reverts merge request !31361
2019-08-09 00:13:09 +00:00
Patrick Bajao
46631e1023 Support selective highlighting of lines
Instead of highlighting all lines when not all of them are
needed, only highlight specific lines.

The `BlobPresenter#highlight` method has been updated to
support `since` and `to` params. These params will be used to
limit the content to be highlighted.

Modify `Gitlab::Highlight` to support `since` param which will
then be used to determine the starting line number.
2019-08-06 09:32:29 +08:00
Patrick Bajao
866bef8059 Fix suggestion on lines that are not part of an MR
Return the `text` as plain string in the response instead of
including HTML tags but keep `rich_text` as is.

The fix is to modify `Blob::UnfoldPresenter#diff_files` to map
each raw diff line (limited by the range specified) to a
corresponding line in an array of highlighted lines to use as
`rich_text`.
2019-07-22 13:25:24 +08:00
Mark Chao
cea59dbe03 Move diff_line preparation into presenter
Update spec
2019-03-07 16:12:36 +08:00
Mark Chao
90527b9f84 Add full option for blob diff action
Returns all diff lines for frontend if full is true.
Turn UnfoldForm into presenter, and move controller logic to presenter.
2019-03-06 15:50:55 +08:00