Commit ab6c9f5c authored by Annabel Dunstone Gray's avatar Annabel Dunstone Gray

Merge branch 'ee-integrate-csslab' into 'master'

Integrate csslab (EE)

See merge request gitlab-org/gitlab-ee!8745
parents 9b599334 118ce54f
...@@ -18,8 +18,10 @@ $input-border: $border-color; ...@@ -18,8 +18,10 @@ $input-border: $border-color;
$padding-base-vertical: $gl-vert-padding; $padding-base-vertical: $gl-vert-padding;
$padding-base-horizontal: $gl-padding; $padding-base-horizontal: $gl-padding;
html { body,
// Override default font size used in bs4 .form-control,
.search form {
// Override default font size used in non-csslab UI
font-size: 14px; font-size: 14px;
} }
......
@import "../../../node_modules/@gitlab/csslab/dist/css/csslab-slim";
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
} }
} }
table { &:not(.use-csslab) table {
@extend .table; @extend .table;
} }
......
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
width: 100%; width: 100%;
} }
.md { .md:not(.use-csslab) {
&.md-preview-holder { &.md-preview-holder {
// Reset ul style types since we're nested inside a ul already // Reset ul style types since we're nested inside a ul already
@include bulleted-list; @include bulleted-list;
......
...@@ -368,11 +368,11 @@ code { ...@@ -368,11 +368,11 @@ code {
* Apply Markdown typography * Apply Markdown typography
* *
*/ */
.wiki { .wiki:not(.use-csslab) {
@include md-typography; @include md-typography;
} }
.md { .md:not(.use-csslab) {
@include md-typography; @include md-typography;
} }
......
...@@ -180,7 +180,7 @@ ul.wiki-pages-list.content-list { ...@@ -180,7 +180,7 @@ ul.wiki-pages-list.content-list {
} }
} }
.wiki { .wiki:not(.use-csslab) {
table { table {
@include markdown-table; @include markdown-table;
} }
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
= stylesheet_link_tag "print", media: "print" = stylesheet_link_tag "print", media: "print"
= stylesheet_link_tag "test", media: "all" if Rails.env.test? = stylesheet_link_tag "test", media: "all" if Rails.env.test?
= stylesheet_link_tag 'performance_bar' if performance_bar_enabled? = stylesheet_link_tag 'performance_bar' if performance_bar_enabled?
= stylesheet_link_tag 'csslab' if Feature.enabled?(:csslab)
= Gon::Base.render_data = Gon::Base.render_data
......
...@@ -9,6 +9,6 @@ ...@@ -9,6 +9,6 @@
= render "projects/blob/auxiliary_viewer", blob: blob = render "projects/blob/auxiliary_viewer", blob: blob
#blob-content-holder.blob-content-holder #blob-content-holder.blob-content-holder
%article.file-holder %article.file-holder{ class: ('use-csslab' if Feature.enabled?(:csslab)) }
= render 'projects/blob/header', blob: blob = render 'projects/blob/header', blob: blob
= render 'projects/blob/content', blob: blob = render 'projects/blob/content', blob: blob
.diff-file.file-holder .diff-file.file-holder
.diff-content .diff-content
- if markup?(@blob.name) - if markup?(@blob.name)
.file-content.wiki .file-content.wiki.md{ class: ('use-csslab' if Feature.enabled?(:csslab)) }
= markup(@blob.name, @content, legacy_render_context(params)) = markup(@blob.name, @content, legacy_render_context(params))
- else - else
.file-content.code.js-syntax-highlight .file-content.code.js-syntax-highlight
......
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
- context = legacy_render_context(params) - context = legacy_render_context(params)
- unless context[:markdown_engine] == :redcarpet - unless context[:markdown_engine] == :redcarpet
- context[:rendered] = blob.rendered_markup if blob.respond_to?(:rendered_markup) - context[:rendered] = blob.rendered_markup if blob.respond_to?(:rendered_markup)
.file-content.wiki .file-content.wiki.md{ class: ('use-csslab' if Feature.enabled?(:csslab)) }
= markup(blob.name, blob.data, context) = markup(blob.name, blob.data, context)
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
= render 'shared/snippets/header' = render 'shared/snippets/header'
.project-snippets .project-snippets
%article.file-holder.snippet-file-content %article.file-holder.snippet-file-content{ class: ('use-csslab' if Feature.enabled?(:csslab)) }
= render 'shared/snippets/blob' = render 'shared/snippets/blob'
.row-content-block.top-block.content-component-block .row-content-block.top-block.content-component-block
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
= (s_("WikiHistoricalPage|You can view the %{most_recent_link} or browse the %{history_link}.") % { most_recent_link: most_recent_link, history_link: history_link }).html_safe = (s_("WikiHistoricalPage|You can view the %{most_recent_link} or browse the %{history_link}.") % { most_recent_link: most_recent_link, history_link: history_link }).html_safe
.prepend-top-default.append-bottom-default .prepend-top-default.append-bottom-default
.wiki .wiki.md{ class: ('use-csslab' if Feature.enabled?(:csslab)) }
= render_wiki_content(@page, legacy_render_context(params)) = render_wiki_content(@page, legacy_render_context(params))
= render 'sidebar' = render 'sidebar'
...@@ -168,6 +168,7 @@ module Gitlab ...@@ -168,6 +168,7 @@ module Gitlab
config.assets.precompile << "locale/**/app.js" config.assets.precompile << "locale/**/app.js"
config.assets.precompile << "emoji_sprites.css" config.assets.precompile << "emoji_sprites.css"
config.assets.precompile << "errors.css" config.assets.precompile << "errors.css"
config.assets.precompile << "csslab.css"
# Import gitlab-svgs directly from vendored directory # Import gitlab-svgs directly from vendored directory
config.assets.paths << "#{config.root}/node_modules/@gitlab/svgs/dist" config.assets.paths << "#{config.root}/node_modules/@gitlab/svgs/dist"
......
...@@ -11,6 +11,7 @@ describe "User browses files" do ...@@ -11,6 +11,7 @@ describe "User browses files" do
let(:user) { project.owner } let(:user) { project.owner }
before do before do
stub_feature_flags(csslab: false)
sign_in(user) sign_in(user)
end end
......
...@@ -616,6 +616,13 @@ ...@@ -616,6 +616,13 @@
lodash "^4.17.10" lodash "^4.17.10"
to-fast-properties "^2.0.0" to-fast-properties "^2.0.0"
"@gitlab/csslab@^1.8.0":
version "1.8.0"
resolved "https://registry.yarnpkg.com/@gitlab/csslab/-/csslab-1.8.0.tgz#54a2457fdc80f006665f0e578a5532780954ccfa"
integrity sha512-RZylRElufH1kwsBQlIDaVcrcXMyD5IEGrU6ABUd8W3LG8/F9jJ4Y3Ys7EPTpK/qFJyx86AutTtFGRxRNlMx85w==
dependencies:
bootstrap "4.1.3"
"@gitlab/eslint-config@^1.2.0": "@gitlab/eslint-config@^1.2.0":
version "1.2.0" version "1.2.0"
resolved "https://registry.yarnpkg.com/@gitlab/eslint-config/-/eslint-config-1.2.0.tgz#115568a70edabbc024f1bc13ba1ba499a9ba05a9" resolved "https://registry.yarnpkg.com/@gitlab/eslint-config/-/eslint-config-1.2.0.tgz#115568a70edabbc024f1bc13ba1ba499a9ba05a9"
......
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