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
16b56a72
Commit
16b56a72
authored
Oct 29, 2020
by
Alex Kalderimis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Consistent design-id processing
parent
5e96ce00
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
app/graphql/resolvers/design_management/designs_resolver.rb
app/graphql/resolvers/design_management/designs_resolver.rb
+4
-2
app/graphql/resolvers/design_management/version/designs_at_version_resolver.rb
.../design_management/version/designs_at_version_resolver.rb
+10
-5
No files found.
app/graphql/resolvers/design_management/designs_resolver.rb
View file @
16b56a72
...
...
@@ -44,10 +44,12 @@ module Resolvers
end
def
design_ids
(
gids
)
return
if
gids
.
nil?
# TODO: remove this line when the compatibility layer is removed
# See: https://gitlab.com/gitlab-org/gitlab/-/issues/257883
gids
=
Array
.
wrap
(
gids
)
.
map
{
|
id
|
DesignID
.
coerce_isolated_input
(
id
)
}
Array
.
wrap
(
gids
).
compact
.
map
(
&
:model_id
).
presence
gids
=
gids
.
map
{
|
id
|
DesignID
.
coerce_isolated_input
(
id
)
}
gids
.
map
(
&
:model_id
)
end
def
issue
...
...
app/graphql/resolvers/design_management/version/designs_at_version_resolver.rb
View file @
16b56a72
...
...
@@ -32,16 +32,21 @@ module Resolvers
private
def
find
(
ids
,
filenames
)
# TODO: remove this line when the compatibility layer is removed
# See: https://gitlab.com/gitlab-org/gitlab/-/issues/257883
ids
=
ids
&
.
map
{
|
id
|
DesignID
.
coerce_isolated_input
(
id
)
}
::
DesignManagement
::
DesignsFinder
.
new
(
issue
,
current_user
,
ids:
ids
&
.
map
(
&
:model_id
),
ids:
design_ids
(
ids
),
filenames:
filenames
,
visible_at_version:
version
)
end
def
design_ids
(
gids
)
return
if
gids
.
nil?
# TODO: remove this line when the compatibility layer is removed
# See: https://gitlab.com/gitlab-org/gitlab/-/issues/257883
gids
=
gids
.
map
{
|
id
|
DesignID
.
coerce_isolated_input
(
id
)
}
gids
.
map
(
&
:model_id
)
end
def
issue
version
.
issue
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