From 5a826e5ac62eb3376fc0a883b4807359a5b28b81 Mon Sep 17 00:00:00 2001 From: Henriette Darge Date: Mon, 17 Jun 2024 14:22:32 +0200 Subject: [PATCH] Replace custom icon solution of gitlab tab with Octicons --- Gemfile | 4 +- Gemfile.lock | 10 +- frontend/package-lock.json | 14 +-- frontend/package.json | 2 +- .../app/shared/components/icon/icon.module.ts | 55 +++++++++++ .../gitlab-tab/gitlab-tab.template.html | 99 ------------------- .../frontend/module/icons/gitlab-icons.svg | 99 ------------------- .../module/issue/issue.component.html | 13 ++- .../module/issue/issue.component.sass | 9 +- .../merge-request.component.html | 29 ++++-- .../merge-request.component.sass | 10 +- .../merge-request/merge-request.component.ts | 7 ++ .../tab-header-issue.template.html | 4 +- .../tab-header-mr/tab-header-mr.template.html | 2 +- 14 files changed, 115 insertions(+), 242 deletions(-) delete mode 100644 modules/gitlab_integration/frontend/module/icons/gitlab-icons.svg diff --git a/Gemfile b/Gemfile index 277b38cbc3a9..ae50f47ccf92 100644 --- a/Gemfile +++ b/Gemfile @@ -388,6 +388,6 @@ gemfiles.each do |file| send(:eval_gemfile, file) if File.readable?(file) end -gem "openproject-octicons", "~>19.14.0" -gem "openproject-octicons_helper", "~>19.14.0" +gem "openproject-octicons", "~>19.14.1" +gem "openproject-octicons_helper", "~>19.14.1" gem "openproject-primer_view_components", "~>0.34.0" diff --git a/Gemfile.lock b/Gemfile.lock index 67d00a822c8d..a44fad2b4157 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -767,10 +767,10 @@ GEM validate_email validate_url webfinger (~> 2.0) - openproject-octicons (19.14.0) - openproject-octicons_helper (19.14.0) + openproject-octicons (19.14.1) + openproject-octicons_helper (19.14.1) actionview - openproject-octicons (= 19.14.0) + openproject-octicons (= 19.14.1) railties openproject-primer_view_components (0.34.0) actionview (>= 5.0.0) @@ -1257,8 +1257,8 @@ DEPENDENCIES openproject-job_status! openproject-ldap_groups! openproject-meeting! - openproject-octicons (~> 19.14.0) - openproject-octicons_helper (~> 19.14.0) + openproject-octicons (~> 19.14.1) + openproject-octicons_helper (~> 19.14.1) openproject-openid_connect! openproject-primer_view_components (~> 0.34.0) openproject-recaptcha! diff --git a/frontend/package-lock.json b/frontend/package-lock.json index aff2b98efecc..88bfb541b0bf 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -46,7 +46,7 @@ "@ng-select/ng-select": "^13.2.0", "@ngneat/content-loader": "^7.0.0", "@ngx-formly/core": "^6.1.4", - "@openproject/octicons-angular": "^19.14.0", + "@openproject/octicons-angular": "^19.14.1", "@openproject/primer-view-components": "^0.34.0", "@openproject/reactivestates": "^3.0.1", "@primer/css": "^21.2.2", @@ -4803,9 +4803,9 @@ "integrity": "sha512-jrqoTI8lk5UziDsDPJ2Y+nmXYCcRhmr6uMARr3v/W6AMxRgsnRLWJyWKYr6FjaGMgbyxXG+OkCUPQY4Xl3toGg==" }, "node_modules/@openproject/octicons-angular": { - "version": "19.14.0", - "resolved": "https://registry.npmjs.org/@openproject/octicons-angular/-/octicons-angular-19.14.0.tgz", - "integrity": "sha512-26r+Fq5f8ZhWfwH3JwK18eOgK3juzNf9dIidVRRmjFXxTY6oreozclCQf1lqZMlxi3gVUTj9qB35hwINWtMPJQ==", + "version": "19.14.1", + "resolved": "https://registry.npmjs.org/@openproject/octicons-angular/-/octicons-angular-19.14.1.tgz", + "integrity": "sha512-kY/QyXs/mcI/2vRsmsAs3w7nBDkg4UGA+YxKmBYPNBRRUeA5Zwwzw1Jh5cogQXqqzstULoV7cMSDY7tXXcBDiw==", "dependencies": { "tslib": "^2.3.0" }, @@ -25234,9 +25234,9 @@ "integrity": "sha512-jrqoTI8lk5UziDsDPJ2Y+nmXYCcRhmr6uMARr3v/W6AMxRgsnRLWJyWKYr6FjaGMgbyxXG+OkCUPQY4Xl3toGg==" }, "@openproject/octicons-angular": { - "version": "19.14.0", - "resolved": "https://registry.npmjs.org/@openproject/octicons-angular/-/octicons-angular-19.14.0.tgz", - "integrity": "sha512-26r+Fq5f8ZhWfwH3JwK18eOgK3juzNf9dIidVRRmjFXxTY6oreozclCQf1lqZMlxi3gVUTj9qB35hwINWtMPJQ==", + "version": "19.14.1", + "resolved": "https://registry.npmjs.org/@openproject/octicons-angular/-/octicons-angular-19.14.1.tgz", + "integrity": "sha512-kY/QyXs/mcI/2vRsmsAs3w7nBDkg4UGA+YxKmBYPNBRRUeA5Zwwzw1Jh5cogQXqqzstULoV7cMSDY7tXXcBDiw==", "requires": { "tslib": "^2.3.0" } diff --git a/frontend/package.json b/frontend/package.json index a6e822a5757b..32bc896ac509 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -97,7 +97,7 @@ "@ng-select/ng-select": "^13.2.0", "@ngneat/content-loader": "^7.0.0", "@ngx-formly/core": "^6.1.4", - "@openproject/octicons-angular": "^19.14.0", + "@openproject/octicons-angular": "^19.14.1", "@openproject/primer-view-components": "^0.34.0", "@openproject/reactivestates": "^3.0.1", "@primer/css": "^21.2.2", diff --git a/frontend/src/app/shared/components/icon/icon.module.ts b/frontend/src/app/shared/components/icon/icon.module.ts index 1a0ab158485d..ecac299d7c18 100644 --- a/frontend/src/app/shared/components/icon/icon.module.ts +++ b/frontend/src/app/shared/components/icon/icon.module.ts @@ -26,6 +26,24 @@ import { StarFillIconComponent, StarIconComponent, XIconComponent, + OpGitlabIssueClosedIconComponent, + OpGitlabLabelsIconComponent, + OpGitlabIssueOpenIconComponent, + OpGitlabMergeRequestClosedIconComponent, + OpGitlabMergeRequestMergedIconComponent, + OpGitlabMergeRequestOpenIconComponent, + OpGitlabMergeRequestReadyIconComponent, + OpGitlabPipelineStatusCanceledIconComponent, + OpGitlabPipelineStatusCreatedIconComponent, + OpGitlabPipelineStatusFailedIconComponent, + OpGitlabPipelineStatusManualIconComponent, + OpGitlabPipelineStatusPendingIconComponent, + OpGitlabPipelineStatusPreparingIconComponent, + OpGitlabPipelineStatusRunningIconComponent, + OpGitlabPipelineStatusScheduledIconComponent, + OpGitlabPipelineStatusSkippedIconComponent, + OpGitlabPipelineStatusSuccessIconComponent, + OpGitlabPipelineStatusWaitingIconComponent, } from '@openproject/octicons-angular'; @NgModule({ @@ -56,6 +74,25 @@ import { StarFillIconComponent, StarIconComponent, XIconComponent, + + OpGitlabIssueClosedIconComponent, + OpGitlabLabelsIconComponent, + OpGitlabIssueOpenIconComponent, + OpGitlabMergeRequestClosedIconComponent, + OpGitlabMergeRequestMergedIconComponent, + OpGitlabMergeRequestOpenIconComponent, + OpGitlabMergeRequestReadyIconComponent, + OpGitlabPipelineStatusCanceledIconComponent, + OpGitlabPipelineStatusCreatedIconComponent, + OpGitlabPipelineStatusFailedIconComponent, + OpGitlabPipelineStatusManualIconComponent, + OpGitlabPipelineStatusPendingIconComponent, + OpGitlabPipelineStatusPreparingIconComponent, + OpGitlabPipelineStatusRunningIconComponent, + OpGitlabPipelineStatusScheduledIconComponent, + OpGitlabPipelineStatusSkippedIconComponent, + OpGitlabPipelineStatusSuccessIconComponent, + OpGitlabPipelineStatusWaitingIconComponent, ], declarations: [ OpIconComponent, @@ -89,6 +126,24 @@ import { StarIconComponent, XIconComponent, + OpGitlabIssueOpenIconComponent, + OpGitlabIssueClosedIconComponent, + OpGitlabLabelsIconComponent, + OpGitlabMergeRequestClosedIconComponent, + OpGitlabMergeRequestMergedIconComponent, + OpGitlabMergeRequestOpenIconComponent, + OpGitlabMergeRequestReadyIconComponent, + OpGitlabPipelineStatusCanceledIconComponent, + OpGitlabPipelineStatusCreatedIconComponent, + OpGitlabPipelineStatusFailedIconComponent, + OpGitlabPipelineStatusManualIconComponent, + OpGitlabPipelineStatusPendingIconComponent, + OpGitlabPipelineStatusPreparingIconComponent, + OpGitlabPipelineStatusRunningIconComponent, + OpGitlabPipelineStatusScheduledIconComponent, + OpGitlabPipelineStatusSkippedIconComponent, + OpGitlabPipelineStatusSuccessIconComponent, + OpGitlabPipelineStatusWaitingIconComponent, ], }) export class IconModule {} diff --git a/modules/gitlab_integration/frontend/module/gitlab-tab/gitlab-tab.template.html b/modules/gitlab_integration/frontend/module/gitlab-tab/gitlab-tab.template.html index a7c04a6dfc13..88d9165e126c 100644 --- a/modules/gitlab_integration/frontend/module/gitlab-tab/gitlab-tab.template.html +++ b/modules/gitlab_integration/frontend/module/gitlab-tab/gitlab-tab.template.html @@ -35,102 +35,3 @@ }); }); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/modules/gitlab_integration/frontend/module/icons/gitlab-icons.svg b/modules/gitlab_integration/frontend/module/icons/gitlab-icons.svg deleted file mode 100644 index 13acb8a8da1d..000000000000 --- a/modules/gitlab_integration/frontend/module/icons/gitlab-icons.svg +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/modules/gitlab_integration/frontend/module/issue/issue.component.html b/modules/gitlab_integration/frontend/module/issue/issue.component.html index 284db7059d56..c9b9f855d78c 100644 --- a/modules/gitlab_integration/frontend/module/issue/issue.component.html +++ b/modules/gitlab_integration/frontend/module/issue/issue.component.html @@ -4,8 +4,11 @@ > - - {{state}} | + + + + + {{state}} | - - - {{state}} | + + + + + + + {{state}} | - + + + + + + + + + + + + + {{ mergeRequest.pipelines[0].status }} @@ -32,7 +49,7 @@ [src]="mergeRequest.gitlabUser.avatarUrl" *ngIf="mergeRequest.gitlabUser" />  --> - + . -