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
62bd5936
Commit
62bd5936
authored
Oct 07, 2020
by
Natalia Tepluhina
Committed by
Nicolò Maria Mezzopera
Oct 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Design thumbnail after uploading an image with the same filename
parent
1036f80c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
app/assets/javascripts/design_management/utils/cache_update.js
...ssets/javascripts/design_management/utils/cache_update.js
+8
-5
changelogs/unreleased/262051-design-thumbnail-image-is-not-updated-after-uploading-an-image-wit.yml
...ail-image-is-not-updated-after-uploading-an-image-wit.yml
+5
-0
No files found.
app/assets/javascripts/design_management/utils/cache_update.js
View file @
62bd5936
/* eslint-disable @gitlab/require-i18n-strings */
import
{
group
By
}
from
'
lodash
'
;
import
{
difference
By
}
from
'
lodash
'
;
import
produce
from
'
immer
'
;
import
{
deprecatedCreateFlash
as
createFlash
}
from
'
~/flash
'
;
import
{
extractCurrentDiscussion
,
extractDesign
,
extractDesigns
}
from
'
./design_management_utils
'
;
...
...
@@ -132,10 +132,13 @@ const addNewDesignToStore = (store, designManagementUpload, query) => {
const
data
=
produce
(
sourceData
,
draftData
=>
{
const
currentDesigns
=
extractDesigns
(
draftData
);
const
existingDesigns
=
groupBy
(
currentDesigns
,
'
filename
'
);
const
newDesigns
=
currentDesigns
.
concat
(
designManagementUpload
.
designs
.
filter
(
d
=>
!
existingDesigns
[
d
.
filename
]),
);
const
difference
=
differenceBy
(
designManagementUpload
.
designs
,
currentDesigns
,
'
filename
'
);
const
newDesigns
=
currentDesigns
.
map
(
design
=>
{
return
designManagementUpload
.
designs
[
design
.
filename
]
||
design
;
})
.
concat
(
difference
);
let
newVersionNode
;
const
findNewVersions
=
designManagementUpload
.
designs
.
find
(
design
=>
design
.
versions
);
...
...
changelogs/unreleased/262051-design-thumbnail-image-is-not-updated-after-uploading-an-image-wit.yml
0 → 100644
View file @
62bd5936
---
title
:
Update Design thumbnail after uploading an image with the same filename
merge_request
:
44305
author
:
type
:
fixed
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