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
2aff9760
Commit
2aff9760
authored
Aug 11, 2021
by
Donald Cook
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarified some frontend code comments
parent
751d82f7
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
9 additions
and
22 deletions
+9
-22
app/assets/javascripts/blob/blob_file_dropzone.js
app/assets/javascripts/blob/blob_file_dropzone.js
+0
-1
app/assets/javascripts/lib/utils/common_utils.js
app/assets/javascripts/lib/utils/common_utils.js
+0
-3
app/assets/javascripts/milestones/components/milestone_combobox.vue
.../javascripts/milestones/components/milestone_combobox.vue
+1
-2
app/assets/javascripts/ref/components/ref_selector.vue
app/assets/javascripts/ref/components/ref_selector.vue
+1
-2
app/assets/javascripts/rest_api.js
app/assets/javascripts/rest_api.js
+1
-1
app/assets/javascripts/sentry/sentry_config.js
app/assets/javascripts/sentry/sentry_config.js
+0
-1
app/assets/javascripts/static_site_editor/rich_content_editor/services/renderers/render_identifier_instance_text.js
...tor/services/renderers/render_identifier_instance_text.js
+1
-1
app/assets/stylesheets/framework/variables.scss
app/assets/stylesheets/framework/variables.scss
+1
-1
app/assets/stylesheets/mailer.scss
app/assets/stylesheets/mailer.scss
+0
-1
app/assets/stylesheets/page_bundles/merge_requests.scss
app/assets/stylesheets/page_bundles/merge_requests.scss
+1
-1
spec/frontend/__helpers__/local_storage_helper.js
spec/frontend/__helpers__/local_storage_helper.js
+1
-3
spec/frontend/__helpers__/mock_window_location_helper.js
spec/frontend/__helpers__/mock_window_location_helper.js
+1
-3
spec/frontend/shortcuts_spec.js
spec/frontend/shortcuts_spec.js
+1
-2
No files found.
app/assets/javascripts/blob/blob_file_dropzone.js
View file @
2aff9760
...
@@ -31,7 +31,6 @@ export default class BlobFileDropzone {
...
@@ -31,7 +31,6 @@ export default class BlobFileDropzone {
autoProcessQueue
:
false
,
autoProcessQueue
:
false
,
url
:
form
.
attr
(
'
action
'
),
url
:
form
.
attr
(
'
action
'
),
// Rails uses a hidden input field for PUT
// Rails uses a hidden input field for PUT
// http://stackoverflow.com/questions/21056482/how-to-set-method-put-in-form-tag-in-rails
method
,
method
,
clickable
:
true
,
clickable
:
true
,
uploadMultiple
:
false
,
uploadMultiple
:
false
,
...
...
app/assets/javascripts/lib/utils/common_utils.js
View file @
2aff9760
...
@@ -117,7 +117,6 @@ export const handleLocationHash = () => {
...
@@ -117,7 +117,6 @@ export const handleLocationHash = () => {
};
};
// Check if element scrolled into viewport from above or below
// Check if element scrolled into viewport from above or below
// Courtesy http://stackoverflow.com/a/7557433/414749
export
const
isInViewport
=
(
el
,
offset
=
{})
=>
{
export
const
isInViewport
=
(
el
,
offset
=
{})
=>
{
const
rect
=
el
.
getBoundingClientRect
();
const
rect
=
el
.
getBoundingClientRect
();
const
{
top
,
left
}
=
offset
;
const
{
top
,
left
}
=
offset
;
...
@@ -560,8 +559,6 @@ export const addSelectOnFocusBehaviour = (selector = '.js-select-on-focus') => {
...
@@ -560,8 +559,6 @@ export const addSelectOnFocusBehaviour = (selector = '.js-select-on-focus') => {
* Method to round of values with decimal places
* Method to round of values with decimal places
* with provided precision.
* with provided precision.
*
*
* Taken from https://stackoverflow.com/a/7343013/414749
*
* Eg; roundOffFloat(3.141592, 3) = 3.142
* Eg; roundOffFloat(3.141592, 3) = 3.142
*
*
* Refer to spec/frontend/lib/utils/common_utils_spec.js for
* Refer to spec/frontend/lib/utils/common_utils_spec.js for
...
...
app/assets/javascripts/milestones/components/milestone_combobox.vue
View file @
2aff9760
...
@@ -125,8 +125,7 @@ export default {
...
@@ -125,8 +125,7 @@ export default {
// This method is defined here instead of in `methods`
// This method is defined here instead of in `methods`
// because we need to access the .cancel() method
// because we need to access the .cancel() method
// lodash attaches to the function, which is
// lodash attaches to the function, which is
// made inaccessible by Vue. More info:
// made inaccessible by Vue.
// https://stackoverflow.com/a/52988020/1063392
this
.
debouncedSearch
=
debounce
(
function
search
()
{
this
.
debouncedSearch
=
debounce
(
function
search
()
{
this
.
search
(
this
.
searchQuery
);
this
.
search
(
this
.
searchQuery
);
},
SEARCH_DEBOUNCE_MS
);
},
SEARCH_DEBOUNCE_MS
);
...
...
app/assets/javascripts/ref/components/ref_selector.vue
View file @
2aff9760
...
@@ -149,8 +149,7 @@ export default {
...
@@ -149,8 +149,7 @@ export default {
// This method is defined here instead of in `methods`
// This method is defined here instead of in `methods`
// because we need to access the .cancel() method
// because we need to access the .cancel() method
// lodash attaches to the function, which is
// lodash attaches to the function, which is
// made inaccessible by Vue. More info:
// made inaccessible by Vue.
// https://stackoverflow.com/a/52988020/1063392
this
.
debouncedSearch
=
debounce
(
function
search
()
{
this
.
debouncedSearch
=
debounce
(
function
search
()
{
this
.
search
();
this
.
search
();
},
SEARCH_DEBOUNCE_MS
);
},
SEARCH_DEBOUNCE_MS
);
...
...
app/assets/javascripts/rest_api.js
View file @
2aff9760
...
@@ -4,7 +4,7 @@ export * from './api/user_api';
...
@@ -4,7 +4,7 @@ export * from './api/user_api';
export
*
from
'
./api/markdown_api
'
;
export
*
from
'
./api/markdown_api
'
;
// Note: It's not possible to spy on methods imported from this file in
// Note: It's not possible to spy on methods imported from this file in
// Jest tests.
See https://stackoverflow.com/a/53307822/1063392.
// Jest tests.
// As a workaround, in Jest tests, import the methods from the file
// As a workaround, in Jest tests, import the methods from the file
// in which they are defined:
// in which they are defined:
//
//
...
...
app/assets/javascripts/sentry/sentry_config.js
View file @
2aff9760
...
@@ -19,7 +19,6 @@ const IGNORE_ERRORS = [
...
@@ -19,7 +19,6 @@ const IGNORE_ERRORS = [
'
fb_xd_fragment
'
,
'
fb_xd_fragment
'
,
// ISP "optimizing" proxy - `Cache-Control: no-transform` seems to
// ISP "optimizing" proxy - `Cache-Control: no-transform` seems to
// reduce this. (thanks @acdha)
// reduce this. (thanks @acdha)
// See http://stackoverflow.com/questions/4113268
'
bmi_SafeAddOnload
'
,
'
bmi_SafeAddOnload
'
,
'
EBCallBackMessageReceived
'
,
'
EBCallBackMessageReceived
'
,
// See http://toolbar.conduit.com/Developer/HtmlAndGadget/Methods/JSInjection.aspx
// See http://toolbar.conduit.com/Developer/HtmlAndGadget/Methods/JSInjection.aspx
...
...
app/assets/javascripts/static_site_editor/rich_content_editor/services/renderers/render_identifier_instance_text.js
View file @
2aff9760
...
@@ -18,7 +18,7 @@ Regexp notes:
...
@@ -18,7 +18,7 @@ Regexp notes:
const
identifierInstanceRegex
=
/
((?:\[
.+
?\]){1}(?:\[\]
|
\[
.+
?\])?(?!
:
))
/g
;
const
identifierInstanceRegex
=
/
((?:\[
.+
?\]){1}(?:\[\]
|
\[
.+
?\])?(?!
:
))
/g
;
const
isIdentifierInstance
=
(
literal
)
=>
{
const
isIdentifierInstance
=
(
literal
)
=>
{
// Reset lastIndex as global flag in regexp are stateful
(https://stackoverflow.com/a/11477448)
// Reset lastIndex as global flag in regexp are stateful
identifierInstanceRegex
.
lastIndex
=
0
;
identifierInstanceRegex
.
lastIndex
=
0
;
return
identifierInstanceRegex
.
test
(
literal
);
return
identifierInstanceRegex
.
test
(
literal
);
};
};
...
...
app/assets/stylesheets/framework/variables.scss
View file @
2aff9760
...
@@ -505,7 +505,7 @@ $line-removed-dark: #fac5cd !default;
...
@@ -505,7 +505,7 @@ $line-removed-dark: #fac5cd !default;
* would hide other layers (selected text, matching brackets).
* would hide other layers (selected text, matching brackets).
*
*
* When the transparent colors get layered on white background, they create their
* When the transparent colors get layered on white background, they create their
* full opacity counterparts
(computed with https://stackoverflow.com/a/12228643/606571)
:
* full opacity counterparts:
*
*
* - white + $line-added-transparent = $line-added
* - white + $line-added-transparent = $line-added
* - white + $line-added-transparent + $line-added-dark-transparent = $line-added-dark
* - white + $line-added-transparent + $line-added-dark-transparent = $line-added-dark
...
...
app/assets/stylesheets/mailer.scss
View file @
2aff9760
@import
'framework/variables'
;
@import
'framework/variables'
;
// Do not use 3-letter hex codes, bgcolor vs css background-color is problematic in emails
// Do not use 3-letter hex codes, bgcolor vs css background-color is problematic in emails
// See https://stackoverflow.com/questions/28551981/why-are-3-digit-hex-color-code-values-interpreted-differently-in-internet-explor
//
//
// stylelint-disable color-hex-length
// stylelint-disable color-hex-length
...
...
app/assets/stylesheets/page_bundles/merge_requests.scss
View file @
2aff9760
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
position
:
-
webkit-sticky
;
position
:
-
webkit-sticky
;
position
:
sticky
;
position
:
sticky
;
// Unitless zero values are not allowed in calculations
https://stackoverflow.com/a/55391061
// Unitless zero values are not allowed in calculations
// stylelint-disable-next-line length-zero-no-unit
// stylelint-disable-next-line length-zero-no-unit
top
:
calc
(
#{
$top-pos
}
+
var
(
--
system-header-height
,
0px
)
+
var
(
--
performance-bar-height
,
0px
));
top
:
calc
(
#{
$top-pos
}
+
var
(
--
system-header-height
,
0px
)
+
var
(
--
performance-bar-height
,
0px
));
// stylelint-disable-next-line length-zero-no-unit
// stylelint-disable-next-line length-zero-no-unit
...
...
spec/frontend/__helpers__/local_storage_helper.js
View file @
2aff9760
...
@@ -2,9 +2,7 @@
...
@@ -2,9 +2,7 @@
* Manage the instance of a custom `window.localStorage`
* Manage the instance of a custom `window.localStorage`
*
*
* This only encapsulates the setup / teardown logic so that it can easily be
* This only encapsulates the setup / teardown logic so that it can easily be
* reused with different implementations (i.e. a spy or a [fake][1])
* reused with different implementations (i.e. a spy or a fake)
*
* [1]: https://stackoverflow.com/a/41434763/1708147
*
*
* @param {() => any} fn Function that returns the object to use for localStorage
* @param {() => any} fn Function that returns the object to use for localStorage
*/
*/
...
...
spec/frontend/__helpers__/mock_window_location_helper.js
View file @
2aff9760
...
@@ -2,9 +2,7 @@
...
@@ -2,9 +2,7 @@
* Manage the instance of a custom `window.location`
* Manage the instance of a custom `window.location`
*
*
* This only encapsulates the setup / teardown logic so that it can easily be
* This only encapsulates the setup / teardown logic so that it can easily be
* reused with different implementations (i.e. a spy or a [fake][1])
* reused with different implementations (i.e. a spy or a fake)
*
* [1]: https://stackoverflow.com/a/41434763/1708147
*
*
* @param {() => any} fn Function that returns the object to use for window.location
* @param {() => any} fn Function that returns the object to use for window.location
*/
*/
...
...
spec/frontend/shortcuts_spec.js
View file @
2aff9760
...
@@ -70,8 +70,7 @@ describe('Shortcuts', () => {
...
@@ -70,8 +70,7 @@ describe('Shortcuts', () => {
const
mdShortcuts
=
$
(
this
).
data
(
'
md-shortcuts
'
);
const
mdShortcuts
=
$
(
this
).
data
(
'
md-shortcuts
'
);
// jQuery.map() automatically unwraps arrays, so we
// jQuery.map() automatically unwraps arrays, so we
// have to double wrap the array to counteract this:
// have to double wrap the array to counteract this
// https://stackoverflow.com/a/4875669/1063392
return
mdShortcuts
?
[
mdShortcuts
]
:
undefined
;
return
mdShortcuts
?
[
mdShortcuts
]
:
undefined
;
})
})
.
get
();
.
get
();
...
...
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