Linking to a single line number in Web IDE
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 | ||
WebIDE | ||
Pipeline Editor |
This MR also introduces the "link" icon shown whenever hovering over a line number in the editor:
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 by Denys Mishunov