Skip to content
Snippets Groups Projects
Commit eb10f226 authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent 10d0e569
No related branches found
No related tags found
No related merge requests found
Showing with 95 additions and 9 deletions
---
title: Updated hugo project_template
merge_request: 20109
author: Marc Schwede
type: other
---
title: Move merge request description into discussions tab
merge_request: 18940
author:
type: changed
doc/user/project/merge_requests/img/merge_request_tab_position_v12_6.png

73 KiB

Loading
Loading
@@ -40,6 +40,40 @@ B. Consider you're a web developer writing a webpage for your company's website:
1. Once approved, your merge request is [squashed and merged](squash_and_merge.md), and [deployed to staging with GitLab Pages](https://about.gitlab.com/blog/2016/08/26/ci-deployment-and-environments/)
1. Your production team [cherry picks](cherry_pick_changes.md) the merge commit into production
 
## Overview
Merge requests (aka "MRs") display a great deal of information about the changes proposed.
The body of an MR contains its description, along with its widget (displaying information
about CI/CD pipelines, when present), followed by the discussion threads of the people
collaborating with that MR.
MRs also contain navigation tabs from which you can see the discussion happening on the thread,
the list of commits, the list of pipelines and jobs, the code changes and inline code reviews.
## Merge request navigation tabs at the top
> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/33813) in GitLab 12.6. This positioning is experimental.
So far, the navigation tabs present in merge requests to display **Discussion**,
**Commits**, **Pipelines**, and **Changes** were located after the merge request
widget.
To facilitate this navigation without having to scroll up and down through the page
to find these tabs, based on user feedback, we are experimenting with a new positioning
of these tabs. They are now located at the top of the merge request, with a new
**Overview** tab, containing the description of the merge request followed by the
widget. Next to **Overview**, you can find **Pipelines**, **Commits**, and **Changes**.
![Merge request tab positions](img/merge_request_tab_position_v12_6.png)
Please note this change is currently behind a feature flag which is enabled by default. For
self-managed instances, it can be disabled through the Rails console by a GitLab
administrator with the following command:
```ruby
Feature.disable(:mr_tabs_position)
```
## Creating merge requests
 
While making changes to files in the `master` branch of a repository is possible, it is not
Loading
Loading
Loading
Loading
@@ -41,7 +41,7 @@ forking (copying) a [sample project from the most popular Static Site Generators
and click **Run pipeline** to trigger GitLab CI/CD to build and deploy your
site to the server.
1. Once the pipeline has finished successfully, find the link to visit your
website from your project's **Settings > Pages**. It can take aproximatelly
website from your project's **Settings > Pages**. It can take approximately
30 minutes to be deployed.
 
You can also take some **optional** further steps:
Loading
Loading
Loading
Loading
@@ -11212,6 +11212,9 @@ msgstr ""
msgid "More information"
msgstr ""
 
msgid "More information and share feedback"
msgstr ""
msgid "More information is available|here"
msgstr ""
 
Loading
Loading
@@ -11823,6 +11826,9 @@ msgstr ""
msgid "November"
msgstr ""
 
msgid "Now you can access the merge request navigation tabs at the top, where they’re easier to find."
msgstr ""
msgid "Number of Elasticsearch replicas"
msgstr ""
 
Loading
Loading
Loading
Loading
@@ -8,6 +8,7 @@ describe 'Merge request > User sees pipelines triggered by merge request', :js d
 
let(:project) { create(:project, :public, :repository) }
let(:user) { project.creator }
let(:enable_mr_tabs_position_flag) { true }
 
let(:config) do
{
Loading
Loading
@@ -26,6 +27,7 @@ describe 'Merge request > User sees pipelines triggered by merge request', :js d
end
 
before do
stub_feature_flags(mr_tabs_position: enable_mr_tabs_position_flag)
stub_application_setting(auto_devops_enabled: false)
stub_feature_flags(ci_merge_request_pipeline: true)
stub_ci_pipeline_yaml_file(YAML.dump(config))
Loading
Loading
@@ -51,6 +53,7 @@ describe 'Merge request > User sees pipelines triggered by merge request', :js d
Ci::CreatePipelineService.new(project, user, ref: 'feature')
.execute(:merge_request_event, merge_request: merge_request)
end
let(:enable_mr_tabs_position_flag) { false }
 
before do
visit project_merge_request_path(project, merge_request)
Loading
Loading
@@ -67,9 +70,23 @@ describe 'Merge request > User sees pipelines triggered by merge request', :js d
end
end
 
it 'sees the latest detached merge request pipeline as the head pipeline', :sidekiq_might_not_need_inline do
page.within('.ci-widget-content') do
expect(page).to have_content("##{detached_merge_request_pipeline.id}")
context 'when merge request tabs feature flag is disabled' do
it 'sees the latest detached merge request pipeline as the head pipeline', :sidekiq_might_not_need_inline do
page.within('.ci-widget-content') do
expect(page).to have_content("##{detached_merge_request_pipeline.id}")
end
end
end
context 'when merge request tabs feature flag is enabled' do
let(:enable_mr_tabs_position_flag) { true }
it 'sees the latest detached merge request pipeline as the head pipeline', :sidekiq_might_not_need_inline do
click_link "Overview"
page.within('.ci-widget-content') do
expect(page).to have_content("##{detached_merge_request_pipeline.id}")
end
end
end
 
Loading
Loading
@@ -243,9 +260,23 @@ describe 'Merge request > User sees pipelines triggered by merge request', :js d
end
end
 
it 'sees the latest detached merge request pipeline as the head pipeline' do
page.within('.ci-widget-content') do
expect(page).to have_content("##{detached_merge_request_pipeline.id}")
context 'when merge request tabs feature flag is enabled' do
it 'sees the latest detached merge request pipeline as the head pipeline' do
click_link "Overview"
page.within('.ci-widget-content') do
expect(page).to have_content("##{detached_merge_request_pipeline.id}")
end
end
end
context 'when merge request tabs feature flag is disabled' do
let(:enable_mr_tabs_position_flag) { false }
it 'sees the latest detached merge request pipeline as the head pipeline' do
page.within('.ci-widget-content') do
expect(page).to have_content("##{detached_merge_request_pipeline.id}")
end
end
end
 
Loading
Loading
@@ -309,6 +340,8 @@ describe 'Merge request > User sees pipelines triggered by merge request', :js d
end
 
it 'sees the latest detached merge request pipeline as the head pipeline' do
click_link "Overview"
page.within('.ci-widget-content') do
expect(page).to have_content("##{detached_merge_request_pipeline_2.id}")
end
Loading
Loading
@@ -323,6 +356,8 @@ describe 'Merge request > User sees pipelines triggered by merge request', :js d
 
context 'when a user merges a merge request from a forked project to the parent project' do
before do
click_link("Overview")
click_button 'Merge when pipeline succeeds'
 
wait_for_requests
Loading
Loading
Loading
Loading
@@ -25,15 +25,16 @@ describe 'Merge request > User sees MR with deleted source branch', :js do
 
it 'still contains Discussion, Commits and Changes tabs' do
within '.merge-request-details' do
expect(page).to have_content('Discussion')
expect(page).to have_content('Overview')
expect(page).to have_content('Commits')
expect(page).to have_content('Changes')
end
 
expect(page).to have_content('Source branch does not exist.')
click_on 'Changes'
wait_for_requests
 
expect(page).to have_selector('.diffs.tab-pane .file-holder')
expect(page).to have_content('Source branch does not exist.')
end
end
No preview for this file type
No preview for this file type
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment