gitlab-org--gitlab-foss/doc
Fatih Acet 4d37be0fb8 Merge branch '22781-user-generated-permalinks' into 'master'
Resolve "User-generated permalink IDs collide with GitLab interface"

## What does this MR do?

Prevents ID values automatically generated by headers in [GitLab Flavored Markdown](https://github.com/gitlabhq/gitlabhq/blob/master/doc/user/markdown.md#header-ids-and-links) from colliding with IDs used elsewhere in the GitLab interface.  This can cause confusion when, for instance, a selector looks for a merge request tab with `id="pipelines"` and there is a header with the same ID earlier in the DOM.

How this works:
* All header IDs generated with GitLab Flavored Markdown are namespaced with `id="user-content_foo"`
* All anchor links which point to these IDs continue to use the non-namespaced hash `<a href="#foo">...</a>`
* When a page is loaded or when the `hashchange` event is triggered, javascript will automatically search for `#user-content_foo` if `#foo` cannot be found, and scroll to that position instead.

## Before

![2016-11-21-13.00.28](/uploads/e3be2cd6a9142dfd6e64db5462a6aa76/2016-11-21-13.00.28.gif)

## After:

![2016-11-21-13.12.45](/uploads/f7ae3f3a30c91325eaa3665591b6a850/2016-11-21-13.12.45.gif)  
![2016-11-21-13.03.00](/uploads/3a6a782c081ecaa05b8781548d794909/2016-11-21-13.03.00.gif)  

## Does this MR meet the acceptance criteria?

- [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added
- Tests
  - [x] Added for this feature/bug
  - [ ] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

Closes #22781 

See also prior attempts to address this issue:
#3908, !2023, !2024


See merge request !7631
2016-12-01 20:58:08 +00:00
..
administration Fix wrong link in builds artifacts admin docs 2016-12-01 12:13:48 +01:00
api Merge branch 'api-branch-status' into 'master' 2016-11-30 17:40:39 +00:00
ci Document the need to use a PAT with Registry when 2FA is on 2016-12-01 14:24:12 +01:00
container_registry
customization Reduce size of images from 25MB to 13MB using pngquant 2016-11-22 19:53:43 +01:00
development remove id collision caveat from documentation 2016-11-30 15:28:10 -06:00
downgrade_ee_to_ce
gitlab-basics Reduce size of images from 25MB to 13MB using pngquant 2016-11-22 19:53:43 +01:00
hooks
incoming_email
install Move task helpers to a module 2016-11-30 12:20:21 +01:00
integration Fixing typo & Clarifying Key name 2016-11-29 13:07:42 +01:00
intro
legal
logs
markdown
migrate_ci_to_ce
monitoring Reduce size of images from 25MB to 13MB using pngquant 2016-11-22 19:53:43 +01:00
operations Move operations/ to new location 2016-10-11 16:13:04 +02:00
permissions
profile Reduce size of images from 25MB to 13MB using pngquant 2016-11-22 19:53:43 +01:00
project_services Reduce size of images from 25MB to 13MB using pngquant 2016-11-22 19:53:43 +01:00
public_access
raketasks Add Human Readable Timestamp to backup tar file 2016-11-30 11:41:53 +01:00
security Reduce size of images from 25MB to 13MB using pngquant 2016-11-22 19:53:43 +01:00
ssh
system_hooks
university Remove header ids from University docs 2016-11-23 22:17:47 +01:00
update Move task helpers to a module 2016-11-30 12:20:21 +01:00
user Document the need to use a PAT with Registry when 2FA is on 2016-12-01 14:24:12 +01:00
web_hooks Small refactor of webhooks docs 2016-12-01 13:19:00 +01:00
workflow Fix title case to sentence case 2016-11-23 16:34:58 -07:00
README.md Add a link to Git cheatsheet PDF in docs readme 2016-11-09 17:42:44 +01:00

Documentation

User documentation

Administrator documentation

Contributor documentation

  • Development All styleguides and explanations how to contribute.
  • Legal Contributor license agreements.