Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
894ea34c
Commit
894ea34c
authored
Sep 29, 2020
by
Alex Kalderimis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove feature flag for design management reference filter
This completes the release of the design reference filter
parent
f207da68
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
6 additions
and
93 deletions
+6
-93
changelogs/unreleased/ajk-remove-design_management_reference_filter_gfm_pipeline-ff.yml
...ve-design_management_reference_filter_gfm_pipeline-ff.yml
+5
-0
config/feature_flags/development/design_management_reference_filter_gfm_pipeline.yml
...pment/design_management_reference_filter_gfm_pipeline.yml
+0
-7
doc/user/project/issues/design_management.md
doc/user/project/issues/design_management.md
+1
-23
lib/banzai/filter/design_reference_filter.rb
lib/banzai/filter/design_reference_filter.rb
+0
-14
spec/features/projects/issues/design_management/user_links_to_designs_in_issue_spec.rb
.../design_management/user_links_to_designs_in_issue_spec.rb
+0
-29
spec/lib/banzai/filter/design_reference_filter_spec.rb
spec/lib/banzai/filter/design_reference_filter_spec.rb
+0
-20
No files found.
changelogs/unreleased/ajk-remove-design_management_reference_filter_gfm_pipeline-ff.yml
0 → 100644
View file @
894ea34c
---
title
:
Enable design management reference filter
merge_request
:
43731
author
:
type
:
added
config/feature_flags/development/design_management_reference_filter_gfm_pipeline.yml
deleted
100644 → 0
View file @
f207da68
---
name
:
design_management_reference_filter_gfm_pipeline
introduced_by_url
:
rollout_issue_url
:
group
:
type
:
development
default_enabled
:
true
doc/user/project/issues/design_management.md
View file @
894ea34c
...
@@ -263,10 +263,7 @@ Feature.disable(:design_management_todo_button)
...
@@ -263,10 +263,7 @@ Feature.disable(:design_management_todo_button)
## Referring to designs in Markdown
## Referring to designs in Markdown
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/217160) in **GitLab 13.1**.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/217160) in **GitLab 13.1**.
> - It is deployed behind a feature flag, disabled by default.
> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/258662) in **GitLab 13.5**
> - It is disabled on GitLab.com.
> - It is not recommended for production use.
> - To use it in GitLab self-managed instances, ask a GitLab administrator to [enable it](#enable-or-disable-design-references). **(CORE ONLY)**
We support referring to designs in
[
Markdown
](
../../markdown.md
)
, which is available
We support referring to designs in
[
Markdown
](
../../markdown.md
)
, which is available
throughout the application, including in merge request and issue descriptions, in discussions and comments, and in wiki pages.
throughout the application, including in merge request and issue descriptions, in discussions and comments, and in wiki pages.
...
@@ -282,25 +279,6 @@ This will be rendered as:
...
@@ -282,25 +279,6 @@ This will be rendered as:
> See [#123[homescreen.png]](https://gitlab.com/your-group/your-project/-/issues/123/designs/homescreen.png)
> See [#123[homescreen.png]](https://gitlab.com/your-group/your-project/-/issues/123/designs/homescreen.png)
### Enable or disable design references **(CORE ONLY)**
Design reference parsing is
deployed behind a feature flag that is
**enabled by default**
.
[
GitLab administrators with access to the GitLab Rails console
](
../../../administration/feature_flags.md
)
can disable it for your instance.
To disable it:
```
ruby
Feature
.
disable
(
:design_management_reference_filter_gfm_pipeline
)
```
To re-enable it:
```
ruby
Feature
.
enable
(
:design_management_reference_filter_gfm_pipeline
)
```
## Design activity records
## Design activity records
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/33051) in GitLab 13.1.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/33051) in GitLab 13.1.
...
...
lib/banzai/filter/design_reference_filter.rb
View file @
894ea34c
...
@@ -3,8 +3,6 @@
...
@@ -3,8 +3,6 @@
module
Banzai
module
Banzai
module
Filter
module
Filter
class
DesignReferenceFilter
<
AbstractReferenceFilter
class
DesignReferenceFilter
<
AbstractReferenceFilter
FEATURE_FLAG
=
:design_management_reference_filter_gfm_pipeline
class
Identifier
class
Identifier
include
Comparable
include
Comparable
attr_reader
:issue_iid
,
:filename
attr_reader
:issue_iid
,
:filename
...
@@ -35,14 +33,6 @@ module Banzai
...
@@ -35,14 +33,6 @@ module Banzai
self
.
reference_type
=
:design
self
.
reference_type
=
:design
# This filter must be enabled by setting the
# design_management_reference_filter_gfm_pipeline flag
def
call
return
doc
unless
enabled?
super
end
def
find_object
(
project
,
identifier
)
def
find_object
(
project
,
identifier
)
records_per_parent
[
project
][
identifier
]
records_per_parent
[
project
][
identifier
]
end
end
...
@@ -112,10 +102,6 @@ module Banzai
...
@@ -112,10 +102,6 @@ module Banzai
.
in_groups_of
(
100
,
false
)
# limitation of by_issue_id_and_filename, so we batch
.
in_groups_of
(
100
,
false
)
# limitation of by_issue_id_and_filename, so we batch
.
flat_map
{
|
ids
|
DesignManagement
::
Design
.
by_issue_id_and_filename
(
ids
)
}
.
flat_map
{
|
ids
|
DesignManagement
::
Design
.
by_issue_id_and_filename
(
ids
)
}
end
end
def
enabled?
Feature
.
enabled?
(
FEATURE_FLAG
,
parent
,
default_enabled:
true
)
end
end
end
end
end
end
end
spec/features/projects/issues/design_management/user_links_to_designs_in_issue_spec.rb
View file @
894ea34c
...
@@ -90,34 +90,5 @@ RSpec.describe 'viewing issues with design references' do
...
@@ -90,34 +90,5 @@ RSpec.describe 'viewing issues with design references' do
expect
(
page
).
not_to
have_link
(
design_ref_b
)
expect
(
page
).
not_to
have_link
(
design_ref_b
)
end
end
end
end
context
'design management is enabled, but the filter is disabled globally'
do
before
do
enable_design_management
stub_feature_flags
(
Banzai
::
Filter
::
DesignReferenceFilter
::
FEATURE_FLAG
=>
false
)
end
it
'processes design tab links successfully, and design references as issue references'
,
:aggregate_failures
do
visit_page_with_design_references
expect
(
page
).
to
have_text
(
'The designs I mentioned'
)
expect
(
page
).
to
have_link
(
design_tab_ref
)
expect
(
page
).
to
have_link
(
issue_ref
)
expect
(
page
).
not_to
have_link
(
design_ref_a
)
expect
(
page
).
not_to
have_link
(
design_ref_b
)
end
end
context
'design management is enabled, and the filter is enabled for the current project'
do
before
do
stub_feature_flags
(
Banzai
::
Filter
::
DesignReferenceFilter
::
FEATURE_FLAG
=>
public_project
)
end
it_behaves_like
'successful use of design link references'
end
end
end
end
end
spec/lib/banzai/filter/design_reference_filter_spec.rb
View file @
894ea34c
...
@@ -74,26 +74,6 @@ RSpec.describe Banzai::Filter::DesignReferenceFilter do
...
@@ -74,26 +74,6 @@ RSpec.describe Banzai::Filter::DesignReferenceFilter do
it_behaves_like
'a no-op filter'
it_behaves_like
'a no-op filter'
end
end
context
'design reference filter is not enabled'
do
before
do
stub_feature_flags
(
described_class
::
FEATURE_FLAG
=>
false
)
end
it_behaves_like
'a no-op filter'
it
'issues no queries'
do
expect
{
process
(
input_text
)
}.
not_to
exceed_query_limit
(
0
)
end
end
context
'the filter is enabled for the context project'
do
before
do
stub_feature_flags
(
described_class
::
FEATURE_FLAG
=>
project
)
end
it_behaves_like
'a good link reference'
end
end
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment