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
348af8b4
Commit
348af8b4
authored
Aug 16, 2020
by
Markus Koller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable reorder_designs feature by default
parent
38e321c6
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
5 deletions
+10
-5
app/graphql/mutations/design_management/move.rb
app/graphql/mutations/design_management/move.rb
+1
-1
app/models/design_management/design.rb
app/models/design_management/design.rb
+1
-1
app/policies/project_policy.rb
app/policies/project_policy.rb
+1
-1
app/services/design_management/move_designs_service.rb
app/services/design_management/move_designs_service.rb
+1
-1
changelogs/unreleased/reorder-designs-fixes.yml
changelogs/unreleased/reorder-designs-fixes.yml
+5
-0
config/feature_flags/development/reorder_designs.yml
config/feature_flags/development/reorder_designs.yml
+1
-1
No files found.
app/graphql/mutations/design_management/move.rb
View file @
348af8b4
...
...
@@ -21,7 +21,7 @@ module Mutations
description:
"The current state of the collection"
def
ready
(
*
)
raise
::
Gitlab
::
Graphql
::
Errors
::
ResourceNotAvailable
unless
::
Feature
.
enabled?
(
:reorder_designs
)
raise
::
Gitlab
::
Graphql
::
Errors
::
ResourceNotAvailable
unless
::
Feature
.
enabled?
(
:reorder_designs
,
default_enabled:
true
)
end
def
resolve
(
**
args
)
...
...
app/models/design_management/design.rb
View file @
348af8b4
...
...
@@ -82,7 +82,7 @@ module DesignManagement
scope
:ordered
,
->
(
project
)
do
# TODO: Always order by relative position after the feature flag is removed
# https://gitlab.com/gitlab-org/gitlab/-/issues/34382
if
Feature
.
enabled?
(
:reorder_designs
,
project
)
if
Feature
.
enabled?
(
:reorder_designs
,
project
,
default_enabled:
true
)
# We need to additionally sort by `id` to support keyset pagination.
# See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/17788/diffs#note_230875678
order
(
:relative_position
,
:id
)
...
...
app/policies/project_policy.rb
View file @
348af8b4
...
...
@@ -103,7 +103,7 @@ class ProjectPolicy < BasePolicy
with_scope
:subject
condition
(
:moving_designs_disabled
)
do
!::
Feature
.
enabled?
(
:reorder_designs
,
@subject
)
!::
Feature
.
enabled?
(
:reorder_designs
,
@subject
,
default_enabled:
true
)
end
with_scope
:subject
...
...
app/services/design_management/move_designs_service.rb
View file @
348af8b4
...
...
@@ -13,7 +13,7 @@ module DesignManagement
def
execute
return
error
(
:no_focus
)
unless
current_design
.
present?
return
error
(
:cannot_move
)
unless
::
Feature
.
enabled?
(
:reorder_designs
,
project
)
return
error
(
:cannot_move
)
unless
::
Feature
.
enabled?
(
:reorder_designs
,
project
,
default_enabled:
true
)
return
error
(
:cannot_move
)
unless
current_user
.
can?
(
:move_design
,
current_design
)
return
error
(
:no_neighbors
)
unless
neighbors
.
present?
return
error
(
:not_distinct
)
unless
all_distinct?
...
...
changelogs/unreleased/reorder-designs-fixes.yml
0 → 100644
View file @
348af8b4
---
title
:
Enable reorder_designs feature by default
merge_request
:
39555
author
:
type
:
changed
config/feature_flags/development/reorder_designs.yml
View file @
348af8b4
...
...
@@ -4,4 +4,4 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/37835
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/232992
group
:
group::knowledge
type
:
development
default_enabled
:
fals
e
default_enabled
:
tru
e
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