From a19d50c4d7a7be8e15ae8b60035972f8adfc8aee Mon Sep 17 00:00:00 2001 From: Deepika Guliani <dguliani@gitlab.com> Date: Fri, 1 Dec 2023 10:57:08 +0000 Subject: [PATCH] Move notes.scss to page_bundles from page_specific_bundles Changelog: changed --- app/assets/stylesheets/_page_specific_files.scss | 1 - app/assets/stylesheets/{pages => page_bundles}/notes.scss | 6 +++++- app/views/groups/work_items/index.html.haml | 1 + app/views/layouts/_head.html.haml | 4 ++++ app/views/projects/commit/show.html.haml | 1 + app/views/projects/commits/show.html.haml | 1 + app/views/projects/issues/show.html.haml | 1 + app/views/projects/merge_requests/creations/new.html.haml | 1 + app/views/projects/merge_requests/diffs.html.haml | 1 + app/views/projects/merge_requests/index.html.haml | 1 + app/views/projects/merge_requests/show.html.haml | 1 + app/views/projects/work_items/show.html.haml | 1 + app/views/snippets/edit.html.haml | 1 + app/views/snippets/new.html.haml | 1 + app/views/snippets/show.html.haml | 1 + config/application.rb | 1 + ee/app/views/groups/epics/show.html.haml | 1 + 17 files changed, 23 insertions(+), 2 deletions(-) rename app/assets/stylesheets/{pages => page_bundles}/notes.scss (99%) diff --git a/app/assets/stylesheets/_page_specific_files.scss b/app/assets/stylesheets/_page_specific_files.scss index be9a06d7bb5e2..129a9f207f885 100644 --- a/app/assets/stylesheets/_page_specific_files.scss +++ b/app/assets/stylesheets/_page_specific_files.scss @@ -5,7 +5,6 @@ @import './pages/hierarchy'; @import './pages/issues'; @import './pages/note_form'; -@import './pages/notes'; @import './pages/pipelines'; @import './pages/profile'; @import './pages/registry'; diff --git a/app/assets/stylesheets/pages/notes.scss b/app/assets/stylesheets/page_bundles/notes.scss similarity index 99% rename from app/assets/stylesheets/pages/notes.scss rename to app/assets/stylesheets/page_bundles/notes.scss index eb2061081ae90..1c03cb6a20e73 100644 --- a/app/assets/stylesheets/pages/notes.scss +++ b/app/assets/stylesheets/page_bundles/notes.scss @@ -1,3 +1,7 @@ +@import 'mixins_and_variables_and_functions'; +@import 'framework/notes'; +@import 'framework/buttons'; + $avatar-icon-size: 2rem; $avatar-m-top: 0.5rem; $avatar-m-ratio: 2; @@ -985,7 +989,7 @@ $system-note-icon-m-left: $avatar-m-left + $icon-size-diff / $avatar-m-ratio; .disabled-comment { background-color: $gray-light; - border-radius: $border-radius-base; + border-radius: $gl-border-radius-base; border: 1px solid $border-gray-normal; color: $note-disabled-comment-color; padding: $gl-padding-8 0; diff --git a/app/views/groups/work_items/index.html.haml b/app/views/groups/work_items/index.html.haml index 299a90b362d2d..a586826967c78 100644 --- a/app/views/groups/work_items/index.html.haml +++ b/app/views/groups/work_items/index.html.haml @@ -1,4 +1,5 @@ - page_title s_('WorkItem|Work items') - add_page_specific_style 'page_bundles/issuable_list' +- add_page_specific_style 'page_bundles/notes' .js-work-items-list-root{ data: work_items_list_data(@group) } diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml index 2c97df90110da..b7e485ac0d746 100644 --- a/app/views/layouts/_head.html.haml +++ b/app/views/layouts/_head.html.haml @@ -2,6 +2,10 @@ - site_name = _('GitLab') - omit_og = sign_in_with_redirect? +-# This is a temporary place for the page specific style migrations to be included on all pages like page_specific_files +- if Feature.disabled?(:page_specific_styles, current_user) + - add_page_specific_style('page_bundles/notes') + %head{ omit_og ? { } : { prefix: "og: http://ogp.me/ns#" } } %meta{ charset: "utf-8" } %meta{ 'http-equiv' => 'X-UA-Compatible', content: 'IE=edge' } diff --git a/app/views/projects/commit/show.html.haml b/app/views/projects/commit/show.html.haml index 0868475c49f49..5708eacc8013c 100644 --- a/app/views/projects/commit/show.html.haml +++ b/app/views/projects/commit/show.html.haml @@ -6,6 +6,7 @@ - page_title "#{@commit.title} (#{@commit.short_id})", _('Commits') - page_description @commit.description - add_page_specific_style 'page_bundles/pipelines' +- add_page_specific_style 'page_bundles/notes' .container-fluid{ class: [container_class] } = render "commit_box" diff --git a/app/views/projects/commits/show.html.haml b/app/views/projects/commits/show.html.haml index be2bf43cbb9be..09efc2b9c82f6 100644 --- a/app/views/projects/commits/show.html.haml +++ b/app/views/projects/commits/show.html.haml @@ -2,6 +2,7 @@ - add_page_specific_style 'page_bundles/tree' - add_page_specific_style 'page_bundles/merge_request' - add_page_specific_style 'page_bundles/projects' +- add_page_specific_style 'page_bundles/notes' - page_title _("Commits"), @ref = content_for :meta_tags do diff --git a/app/views/projects/issues/show.html.haml b/app/views/projects/issues/show.html.haml index 457eaf5e194aa..e5ede7f15466a 100644 --- a/app/views/projects/issues/show.html.haml +++ b/app/views/projects/issues/show.html.haml @@ -12,6 +12,7 @@ - add_page_specific_style 'page_bundles/issuable' - add_page_specific_style 'page_bundles/issues_show' - add_page_specific_style 'page_bundles/work_items' +- add_page_specific_style 'page_bundles/notes' - @content_class = "limit-container-width" unless fluid_layout diff --git a/app/views/projects/merge_requests/creations/new.html.haml b/app/views/projects/merge_requests/creations/new.html.haml index f2c2700b01266..3c51e8260929e 100644 --- a/app/views/projects/merge_requests/creations/new.html.haml +++ b/app/views/projects/merge_requests/creations/new.html.haml @@ -4,6 +4,7 @@ - add_page_specific_style 'page_bundles/pipelines' - add_page_specific_style 'page_bundles/ci_status' - add_page_specific_style 'page_bundles/merge_request' +- add_page_specific_style 'page_bundles/notes' - conflicting_mr = @merge_request.existing_mrs_targeting_same_branch.first diff --git a/app/views/projects/merge_requests/diffs.html.haml b/app/views/projects/merge_requests/diffs.html.haml index 03306e9840745..5391d2d28ca96 100644 --- a/app/views/projects/merge_requests/diffs.html.haml +++ b/app/views/projects/merge_requests/diffs.html.haml @@ -1,3 +1,4 @@ - add_page_specific_style 'page_bundles/merge_request' +- add_page_specific_style 'page_bundles/notes' = render 'page' diff --git a/app/views/projects/merge_requests/index.html.haml b/app/views/projects/merge_requests/index.html.haml index e2d3e08228980..d3c9709d59b90 100644 --- a/app/views/projects/merge_requests/index.html.haml +++ b/app/views/projects/merge_requests/index.html.haml @@ -7,6 +7,7 @@ - new_merge_request_email = @project.new_issuable_address(current_user, 'merge_request') - add_page_specific_style 'page_bundles/issuable_list' - add_page_specific_style 'page_bundles/merge_request' +- add_page_specific_style 'page_bundles/notes' = content_for :meta_tags do = auto_discovery_link_tag(:atom, safe_params.merge(rss_url_options).to_h, title: "#{@project.name} merge requests") diff --git a/app/views/projects/merge_requests/show.html.haml b/app/views/projects/merge_requests/show.html.haml index 03306e9840745..5391d2d28ca96 100644 --- a/app/views/projects/merge_requests/show.html.haml +++ b/app/views/projects/merge_requests/show.html.haml @@ -1,3 +1,4 @@ - add_page_specific_style 'page_bundles/merge_request' +- add_page_specific_style 'page_bundles/notes' = render 'page' diff --git a/app/views/projects/work_items/show.html.haml b/app/views/projects/work_items/show.html.haml index 7e0bddf1b5de3..3fee9a73f1743 100644 --- a/app/views/projects/work_items/show.html.haml +++ b/app/views/projects/work_items/show.html.haml @@ -1,6 +1,7 @@ - page_title "##{request.params['iid']}" - add_to_breadcrumbs _("Issues"), project_issues_path(@project) - add_page_specific_style 'page_bundles/work_items' +- add_page_specific_style 'page_bundles/notes' - @gfm_form = true - @noteable_type = 'WorkItem' diff --git a/app/views/snippets/edit.html.haml b/app/views/snippets/edit.html.haml index 2b2035e362b97..1effa0de4d91b 100644 --- a/app/views/snippets/edit.html.haml +++ b/app/views/snippets/edit.html.haml @@ -1,5 +1,6 @@ - breadcrumb_title _("Edit Snippet") - page_title _("Edit"), "#{@snippet.title} (#{@snippet.to_reference})", _("Snippets") +- add_page_specific_style 'page_bundles/notes' - content_for :prefetch_asset_tags do - webpack_preload_asset_tag('monaco') diff --git a/app/views/snippets/new.html.haml b/app/views/snippets/new.html.haml index da2245432ce60..224dd519f6a06 100644 --- a/app/views/snippets/new.html.haml +++ b/app/views/snippets/new.html.haml @@ -1,4 +1,5 @@ - page_title _("New Snippet") +- add_page_specific_style 'page_bundles/notes' .page-title-holder.d-flex.align-items-center %h1.page-title.gl-font-size-h-display= _('New Snippet') diff --git a/app/views/snippets/show.html.haml b/app/views/snippets/show.html.haml index fe05a3de13aab..225789cb3e9d9 100644 --- a/app/views/snippets/show.html.haml +++ b/app/views/snippets/show.html.haml @@ -9,6 +9,7 @@ - add_to_breadcrumbs _("Snippets"), explore_snippets_path - breadcrumb_title @snippet.to_reference - page_title "#{@snippet.title} (#{@snippet.to_reference})", _("Snippets") +- add_page_specific_style 'page_bundles/notes' - content_for :prefetch_asset_tags do - webpack_preload_asset_tag('monaco', prefetch: true) diff --git a/config/application.rb b/config/application.rb index 7fd209b119135..ee7c0f9c17848 100644 --- a/config/application.rb +++ b/config/application.rb @@ -362,6 +362,7 @@ class Application < Rails::Application config.assets.precompile << "page_bundles/work_items.css" config.assets.precompile << "page_bundles/xterm.css" config.assets.precompile << "page_bundles/labels.css" + config.assets.precompile << "page_bundles/notes.css" config.assets.precompile << "lazy_bundles/cropper.css" config.assets.precompile << "lazy_bundles/gridstack.css" config.assets.precompile << "performance_bar.css" diff --git a/ee/app/views/groups/epics/show.html.haml b/ee/app/views/groups/epics/show.html.haml index b0066a419a990..c87b4367eff17 100644 --- a/ee/app/views/groups/epics/show.html.haml +++ b/ee/app/views/groups/epics/show.html.haml @@ -24,6 +24,7 @@ - add_page_specific_style 'page_bundles/roadmap' - add_page_specific_style 'page_bundles/issuable' - add_page_specific_style 'page_bundles/labels' +- add_page_specific_style 'page_bundles/notes' - add_page_startup_api_call discussions_path(@epic) - add_page_startup_graphql_call('epic/epic_details', { fullPath: @group.full_path, iid: @epic.iid }) -- GitLab