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
c8396e31
Commit
c8396e31
authored
Jan 02, 2020
by
Sanad Liaquat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a config to disable jQuery and CSS animations
parent
8fc0d79a
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
22 additions
and
4 deletions
+22
-4
app/assets/javascripts/main.js
app/assets/javascripts/main.js
+10
-1
app/assets/stylesheets/disable_animations.scss
app/assets/stylesheets/disable_animations.scss
+0
-0
app/views/layouts/_head.html.haml
app/views/layouts/_head.html.haml
+1
-1
changelogs/unreleased/shl-disable-animations-config.yml
changelogs/unreleased/shl-disable-animations-config.yml
+5
-0
config/application.rb
config/application.rb
+1
-1
config/gitlab.yml.example
config/gitlab.yml.example
+4
-1
lib/gitlab/gon_helper.rb
lib/gitlab/gon_helper.rb
+1
-0
No files found.
app/assets/javascripts/main.js
View file @
c8396e31
...
...
@@ -55,9 +55,18 @@ jQuery.ajaxSetup({
},
});
function
disableJQueryAnimations
()
{
$
.
fx
.
off
=
true
;
}
// Disable jQuery animations
if
(
gon
&&
gon
.
disable_animations
)
{
disableJQueryAnimations
();
}
// inject test utilities if necessary
if
(
process
.
env
.
NODE_ENV
!==
'
production
'
&&
gon
&&
gon
.
test_env
)
{
$
.
fx
.
off
=
true
;
disableJQueryAnimations
()
;
import
(
/* webpackMode: "eager" */
'
./test_utils/
'
);
}
...
...
app/assets/stylesheets/
test
.scss
→
app/assets/stylesheets/
disable_animations
.scss
View file @
c8396e31
File moved
app/views/layouts/_head.html.haml
View file @
c8396e31
...
...
@@ -46,7 +46,7 @@
=
stylesheet_link_tag
"application"
,
media:
"all"
=
stylesheet_link_tag
"print"
,
media:
"print"
=
stylesheet_link_tag
"
test"
,
media:
"all"
if
Rails
.
env
.
test?
=
stylesheet_link_tag
"
disable_animations"
,
media:
"all"
if
Rails
.
env
.
test?
||
Gitlab
.
config
.
gitlab
[
'disable_animations'
]
=
stylesheet_link_tag
'performance_bar'
if
performance_bar_enabled?
=
stylesheet_link_tag
"highlight/themes/
#{
user_color_scheme
}
"
,
media:
"all"
...
...
changelogs/unreleased/shl-disable-animations-config.yml
0 → 100644
View file @
c8396e31
---
title
:
Add a config for disabling CSS and jQuery animations
merge_request
:
22217
author
:
type
:
added
config/application.rb
View file @
c8396e31
...
...
@@ -166,7 +166,7 @@ module Gitlab
config
.
assets
.
precompile
<<
"page_bundles/xterm.css"
config
.
assets
.
precompile
<<
"performance_bar.css"
config
.
assets
.
precompile
<<
"lib/ace.js"
config
.
assets
.
precompile
<<
"
test
.css"
config
.
assets
.
precompile
<<
"
disable_animations
.css"
config
.
assets
.
precompile
<<
"snippets.css"
config
.
assets
.
precompile
<<
"locale/**/app.js"
config
.
assets
.
precompile
<<
"emoji_sprites.css"
...
...
config/gitlab.yml.example
View file @
c8396e31
...
...
@@ -150,6 +150,9 @@ production: &base
## Impersonation settings
impersonation_enabled: true
## Disable jQuery and CSS animations
# disable_animations: true
## Reply by email
# Allow users to comment on issues and merge requests by replying to notification emails.
# For documentation on how to set this up, see http://doc.gitlab.com/ce/administration/reply_by_email.html
...
...
@@ -807,7 +810,7 @@ production: &base
# CAUTION!
# This allows users to login with the specified providers without two factor. Define the allowed providers
# using an array, e.g. ["twitter", 'google_oauth2'], or as true/false to allow all providers or none.
# This option should only be configured for providers which already have two factor.
# This option should only be configured for providers which already have two factor.
# This configration dose not apply to SAML.
# (default: false)
allow_bypass_two_factor: ["twitter", 'google_oauth2']
...
...
lib/gitlab/gon_helper.rb
View file @
c8396e31
...
...
@@ -28,6 +28,7 @@ module Gitlab
gon
.
sprite_file_icons
=
IconsHelper
.
sprite_file_icons_path
gon
.
emoji_sprites_css_path
=
ActionController
::
Base
.
helpers
.
stylesheet_path
(
'emoji_sprites'
)
gon
.
test_env
=
Rails
.
env
.
test?
gon
.
disable_animations
=
Gitlab
.
config
.
gitlab
[
'disable_animations'
]
gon
.
suggested_label_colors
=
LabelsHelper
.
suggested_colors
gon
.
first_day_of_week
=
current_user
&
.
first_day_of_week
||
Gitlab
::
CurrentSettings
.
first_day_of_week
gon
.
ee
=
Gitlab
.
ee?
...
...
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