Commit ff44e565 authored by Tim Zallmann's avatar Tim Zallmann

Merge branch '273777-fix-css-not-loading-on-jira-connect-app' into 'master'

Fix Jira Connect styles not loaded when startup_css is enabled

See merge request gitlab-org/gitlab!47043
parents 25dac6cc d4c8a748
...@@ -361,9 +361,13 @@ module ApplicationHelper ...@@ -361,9 +361,13 @@ module ApplicationHelper
} }
end end
def add_page_specific_style(path) def add_page_specific_style(path, defer: true)
content_for :page_specific_styles do content_for :page_specific_styles do
stylesheet_link_tag_defer path if defer
stylesheet_link_tag_defer path
else
stylesheet_link_tag path
end
end end
end end
......
...@@ -63,4 +63,4 @@ ...@@ -63,4 +63,4 @@
= webpack_bundle_tag 'jira_connect_app' = webpack_bundle_tag 'jira_connect_app'
= page_specific_javascript_tag('jira_connect.js') = page_specific_javascript_tag('jira_connect.js')
- add_page_specific_style 'page_bundles/jira_connect' - add_page_specific_style 'page_bundles/jira_connect', defer: false
...@@ -5,9 +5,10 @@ ...@@ -5,9 +5,10 @@
GitLab GitLab
= stylesheet_link_tag 'https://unpkg.com/@atlaskit/css-reset@3.0.6/dist/bundle.css' = stylesheet_link_tag 'https://unpkg.com/@atlaskit/css-reset@3.0.6/dist/bundle.css'
= stylesheet_link_tag 'https://unpkg.com/@atlaskit/reduced-ui-pack@10.5.5/dist/bundle.css' = stylesheet_link_tag 'https://unpkg.com/@atlaskit/reduced-ui-pack@10.5.5/dist/bundle.css'
= yield :page_specific_styles
= javascript_include_tag 'https://connect-cdn.atl-paas.net/all.js' = javascript_include_tag 'https://connect-cdn.atl-paas.net/all.js'
= javascript_include_tag 'https://unpkg.com/jquery@3.3.1/dist/jquery.min.js' = javascript_include_tag 'https://unpkg.com/jquery@3.3.1/dist/jquery.min.js'
= yield :page_specific_styles
= yield :head = yield :head
%body %body
.ac-content .ac-content
......
---
title: Fix Jira Connect styles not loaded when startup_css is enabled
merge_request: 47043
author:
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment