Skip to content

GitLab Next

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 39,511
    • Issues 39,511
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 1,222
    • Merge requests 1,222
  • Requirements
    • Requirements
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
    • Value stream
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.org
  • GitLabGitLab
  • Merge requests
  • !56159

You need to sign in or sign up before continuing.
Merged
Created Mar 09, 2021 by Denys Mishunov@dmishunov🌴Maintainer5 of 14 tasks completed5/14 tasks

Linking to a single line number in Web IDE

  • Overview 47
  • Commits 16
  • Pipelines 13
  • Changes 10

What does this MR do?

Introduces linking to a file(s) in Editor Lite. The functionality is available in all Editor Lite instances using the base extension (both single-file editor and WebIDE), or any of its derivatives.

The URL hash schema for this feature:

#L{N1}-{N2}

where {N1} and {N2} are the digits with the following meaning:

Param Is required? Description
{N1} YES The number of the first line to highlight.
{N1} NO The number of the last line to be included in highlighting.

The first line to be highlighted is centered on the screen for the convenience of the users.

Screenshots (strongly suggested)

Linking to a single line Linking to multiple lines
Single-file editor Screenshot_2021-03-10_at_00.35.39 Screenshot_2021-03-10_at_00.37.18
WebIDE Screenshot_2021-03-10_at_00.37.56 Screenshot_2021-03-10_at_00.38.48
Pipeline Editor Screenshot_2021-03-10_at_12.31.13 Screenshot_2021-03-10_at_12.30.40

This MR also introduces the "link" icon shown whenever hovering over a line number in the editor:

2021-03-10_00-41-05

Does this MR meet the acceptance criteria?

Conformity

  • 📋 Does this MR need a changelog?
    • I have included a changelog entry.
    • I have not included a changelog entry because _____.
  • Documentation (if required)
  • Code review guidelines
  • Merge request performance guidelines
  • Style guides
  • Database guides
  • Separation of EE specific content

Availability and Testing

  • Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process.
  • Tested in all supported browsers
  • Informed Infrastructure department of a default or new setting change, if applicable per definition of done

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related to #21762 (closed)

Edited Mar 14, 2021 by Denys Mishunov
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: 21762-link-to-a-line

Enable Gitpod?

To use Gitpod you must first enable the feature in the integrations section of your user preferences.

Cancel Enable Gitpod