Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2022-02-23 21:15:56 +00:00
parent 94299354d1
commit 67770e6591
9 changed files with 73 additions and 19 deletions

View File

@ -16,6 +16,9 @@ inherit_from:
- ./rubocop/rubocop-migrations.yml
- ./rubocop/rubocop-usage-data.yml
- ./rubocop/rubocop-code_reuse.yml
<% Dir.glob('jh/rubocop/**/*.yml').each do |jh_rubocop_yaml| %>
- '<%= jh_rubocop_yaml %>'
<% end %>
inherit_mode:
merge:

View File

@ -118,6 +118,7 @@ export default {
markdownPreviewLoading: false,
previewMarkdown: false,
suggestions: this.note.suggestions || [],
debouncedFetchMarkdownLoading: false,
};
},
computed: {
@ -203,8 +204,10 @@ export default {
const justRemovedAll = hadAll && !hasAll;
if (justAddedAll) {
this.debouncedFetchMarkdownLoading = false;
this.debouncedFetchMarkdown();
} else if (justRemovedAll) {
this.debouncedFetchMarkdownLoading = true;
this.referencedUsers = [];
}
},
@ -284,7 +287,12 @@ export default {
},
debouncedFetchMarkdown: debounce(function debouncedFetchMarkdown() {
return this.fetchMarkdown();
return this.fetchMarkdown().then(() => {
if (this.debouncedFetchMarkdownLoading) {
this.referencedUsers = [];
this.debouncedFetchMarkdownLoading = false;
}
});
}, 400),
renderMarkdown(data = {}) {

View File

@ -5,9 +5,10 @@
#
# For a list of all options, see https://errata-ai.gitbook.io/vale/getting-started/styles
extends: existence
message: 'Avoid words like "%s" that promise future changes, because documentation is about the current state of the product.'
message: 'Avoid words like "%s" when you write about future features. Our documentation is about the current state of the product.'
level: suggestion
ignorecase: true
link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#usage-list
link: https://docs.gitlab.com/ee/development/documentation/styleguide/#promising-features-in-future-versions
tokens:
- currently
- yet

View File

@ -1,6 +1,6 @@
---
stage: Enablement
group: Distribution
stage: Manage
group: Authentication and Authorization
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
---

View File

@ -65,6 +65,9 @@ From left to right, the performance bar displays:
can be added by its full URL (authenticated as the current user), or by the value of
its `X-Request-Id` header.
- **Download**: a link to download the raw JSON used to generate the Performance Bar reports.
- **Memory Report**: a link that generates a
[memory profiling](../../../development/performance.md#using-memory-profiler)
report of the current URL.
- **Flamegraph** with mode: a link to generate a [flamegraph](../../../development/profiling.md#speedscope-flamegraphs)
of the current URL with the selected [Stackprof mode](https://github.com/tmm1/stackprof#sampling):
- The **Wall** mode samples every *interval* of the time on a clock on a wall. The interval is set to `10100` microseconds.

View File

@ -951,6 +951,17 @@ One exception: You can use **we recommend** instead of **it is recommended** or
Do not use **whitelist**. Another option is **allowlist**. ([Vale](../testing.md#vale) rule: [`InclusionCultural.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/InclusionCultural.yml))
## yet
Do not use **yet** when talking about the product or its features. The documentation describes the product as it is today.
Sometimes you might need to use **yet** when writing a task. If you use
**yet**, ensure the surrounding phrases are written
in present tense, active voice.
[View guidance about how to write about future features](index.md#promising-features-in-future-versions).
([Vale](../testing.md#vale) rule: [`CurrentStatus.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/CurrentStatus.yml))
## you, your, yours
Use **you**, **your**, and **yours** instead of [**the user** and **the user's**](#user-users).

View File

@ -459,11 +459,14 @@ The `mem_*` values represent different aspects of how objects and memory are all
We can use `memory_profiler` for profiling.
The [`memory_profiler`](https://github.com/SamSaffron/memory_profiler) gem is already present in the GitLab `Gemfile`,
you just need to require it:
The [`memory_profiler`](https://github.com/SamSaffron/memory_profiler)
gem is already present in the GitLab `Gemfile`. It's also available in the [performance bar](../administration/monitoring/performance/performance_bar.md)
for the current URL.
To use the memory profiler directly in your code, use `require` to add it:
```ruby
require 'sidekiq/testing'
require 'memory_profiler'
report = MemoryProfiler.report do
# Code you want to profile
@ -473,10 +476,17 @@ output = File.open('/tmp/profile.txt','w')
report.pretty_print(output)
```
The report breaks down 2 key concepts:
The report shows the retained and allocated memory grouped by gem, file, location, and class. The
memory profiler also performs a string analysis that shows how often a string is allocated and
retained.
- Retained: long lived memory use and object count retained due to the execution of the code block.
- Allocated: all object allocation and memory allocation during code block.
#### Retained versus allocated
- Retained memory: long-lived memory use and object count retained due to the execution of the code
block. This has a direct impact on memory and the garbage collector.
- Allocated memory: all object allocation and memory allocation during the code block. This might
have minimal impact on memory, but substantial impact on performance. The more objects you
allocate, the more work is being done and the slower the application is.
As a general rule, **retained** is always smaller than or equal to **allocated**.

View File

@ -145,7 +145,7 @@ Each schema entry supports two properties:
## Configure the Web IDE
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/23352) in GitLab Free 13.1.
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/23352) in GitLab 13.1.
The Web IDE supports configuration of certain editor settings by using
[`.editorconfig` files](https://editorconfig.org/). When opening a file, the
@ -164,8 +164,8 @@ The Web IDE currently supports the following `.editorconfig` settings:
## Commit changes
> - Starting with [GitLab 12.7](https://gitlab.com/gitlab-org/gitlab/-/issues/33441), files are automatically staged.
> - In [GitLab 12.9](https://gitlab.com/gitlab-org/gitlab/-/issues/196609), support for staging files was removed to prevent loss of unstaged data. All of your current changes must be committed or discarded.
> - [Starting](https://gitlab.com/gitlab-org/gitlab/-/issues/33441) with GitLab 12.7, files are automatically staged.
> - In GitLab 12.9, support for staging files was [removed](https://gitlab.com/gitlab-org/gitlab/-/issues/196609) to prevent loss of unstaged data. All of your current changes must be committed or discarded.
After making your changes, select **Commit** on the bottom-left to
review the list of changed files.
@ -215,8 +215,8 @@ different branch.
## Markdown editing
> - Support for pasting images [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/22822) in GitLab Free 13.1.
> - Side-by-side Markdown preview [introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/68274) in GitLab Free 14.3.
> - Support for pasting images [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/22822) in GitLab 13.1.
> - Side-by-side Markdown preview [introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/68274) in GitLab 14.3.
To edit Markdown files in the Web IDE:
@ -286,7 +286,7 @@ An example `package.json`:
## Interactive Web Terminals for the Web IDE
> [Moved](https://gitlab.com/gitlab-org/gitlab/-/issues/211685) to GitLab Free in 13.1.
> [Moved](https://gitlab.com/gitlab-org/gitlab/-/issues/211685) from GitLab Ultimate to GitLab Free in 13.1.
WARNING:
Interactive Web Terminals for the Web IDE is currently in **Beta**.
@ -308,7 +308,7 @@ to work:
This section requires at least a `session_timeout` value (which defaults to 1800
seconds) and a `listen_address` value. If `advertise_address` is not defined, `listen_address` is used.
- If you are using a reverse proxy with your GitLab instance, web terminals must be
[enabled](../../../administration/integration/terminal.md#enabling-and-disabling-terminal-support). **(ULTIMATE SELF)**
[enabled](../../../administration/integration/terminal.md#enabling-and-disabling-terminal-support).
If you have the terminal open and the job has finished with its tasks, the
terminal blocks the job from finishing for the duration configured in
@ -391,7 +391,7 @@ click **Restart Terminal** to start a new terminal session.
### File syncing to web terminal
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/5276) in GitLab Ultimate 12.0.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/5276) in GitLab 12.0.
> - [Moved](https://gitlab.com/gitlab-org/gitlab/-/issues/211686) from GitLab Ultimate to GitLab Free in 13.1.
File changes in the Web IDE can be synced to a running web terminal.

View File

@ -268,6 +268,24 @@ describe('Markdown field component', () => {
'You are about to add 11 people to the discussion. They will all receive a notification.',
);
});
it('removes warning when all mention is removed while endpoint is loading', async () => {
axiosMock.onPost(markdownPreviewPath).reply(200, { references: { users } });
jest.spyOn(axios, 'post');
subject.setProps({ textareaValue: 'hello @all' });
await nextTick();
subject.setProps({ textareaValue: 'hello @allan' });
await axios.waitFor(markdownPreviewPath);
expect(axios.post).toHaveBeenCalled();
expect(subject.text()).not.toContain(
'You are about to add 11 people to the discussion. They will all receive a notification.',
);
});
});
});
});