gitea icon indicating copy to clipboard operation
gitea copied to clipboard

Background color of private list-items updated

Open lukeawyatt opened this issue 2 years ago • 8 comments

This PR is for a very minor color update on the dashboard. Previously, the list-item background color for private repositories had been assigned a hardcoded light yellow. This seemed to be out of place against the other blues on the dash. This update simply changes the background to the lightest primary color (var) which is used in the contribution histogram to better match the rest of the page.

 

Before: Screenshot from 2022-08-02 10-14-31

 

After: Screenshot from 2022-08-02 10-15-24

lukeawyatt avatar Aug 02 '22 13:08 lukeawyatt

Can you add screenshot before&after?

lafriks avatar Aug 02 '22 14:08 lafriks

Can you add screenshot before&after?

Updated

lukeawyatt avatar Aug 02 '22 14:08 lukeawyatt

@silverwind I looked at this before the PR. Aesthetically, I think the arc-green theme needs the existing .feeds .list ul li.private override style because --color-primary-light-7 is very dark and seemingly out of place in context to its color scheme. I think the color is already compensated for here, but let me know otherwise. Maybe my eyes aren't the best judge.

lukeawyatt avatar Aug 02 '22 17:08 lukeawyatt

I think we should probably get rid of the background altogether and just color the icon only in --color-gold, which works on both themes, e.g. add text gold classes to the icons for private repos:

{{svg "octicon-icon" 16 "text gold"}}

silverwind avatar Aug 02 '22 17:08 silverwind

Thought, if we color these icons in that list we should color all other repo icons throughout the UI as well which is probably a lot of work. Let me check what's the issue on arc-green.

silverwind avatar Aug 02 '22 17:08 silverwind

I think we need a new color, try this:

Screen Shot 2022-08-02 at 19 52 10 image
diff --git a/web_src/less/_base.less b/web_src/less/_base.less
index 0bf46497e..de4dddbb2 100644
--- a/web_src/less/_base.less
+++ b/web_src/less/_base.less
@@ -122,8 +122,9 @@
   --color-text-light-2: #808080;
   --color-text-light-3: #a0a0a0;
   --color-box-header: #f7f7f7;
   --color-box-body: #ffffff;
+  --color-box-body-highlight: #f8f8f8;
   --color-footer: #ffffff;
   --color-timeline: #ececec;
   --color-input-text: #212121;
   --color-input-background: #ffffff;
diff --git a/web_src/less/_dashboard.less b/web_src/less/_dashboard.less
index c56d2f500..570d77272 100644
--- a/web_src/less/_dashboard.less
+++ b/web_src/less/_dashboard.less
@@ -164,9 +164,9 @@
           border-bottom: 1px solid var(--color-secondary);
         }
 
         &.private {
-          background-color: var(--color-primary-light-7);
+          background-color: var(--color-box-body-highlight);
         }
 
         .repo-list-link {
           padding: 6px 1em;
diff --git a/web_src/less/themes/theme-arc-green.less b/web_src/less/themes/theme-arc-green.less
index cf6358091..4d21a5ac4 100644
--- a/web_src/less/themes/theme-arc-green.less
+++ b/web_src/less/themes/theme-arc-green.less
@@ -94,8 +94,9 @@
   /* target-based colors */
   --color-body: #383c4a;
   --color-box-header: #404652;
   --color-box-body: #303440;
+  --color-box-body-highlight: #353945;
   --color-text-dark: #dbe0ea;
   --color-text: #bbc0ca;
   --color-text-light: #a6aab5;
   --color-text-light-1: #979ba6;
@@ -149,12 +150,8 @@
 .following.bar .top.menu a.item:hover {
   color: #fff;
 }
 
-.feeds .list ul li.private {
-  background: #353945;
-}
-
 .ui.red.label,
 .ui.red.labels .label {
   background-color: #7d3434 !important;
   border-color: #8a2121 !important;

silverwind avatar Aug 02 '22 17:08 silverwind

@silverwind this is more subtle, looks good to me. I'll add them in tonight.

lukeawyatt avatar Aug 02 '22 18:08 lukeawyatt

@silverwind, I pushed the updates

lukeawyatt avatar Aug 02 '22 22:08 lukeawyatt

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@2778990). Click here to learn what that means. The diff coverage is n/a.

@@           Coverage Diff           @@
##             main   #20630   +/-   ##
=======================================
  Coverage        ?   46.80%           
=======================================
  Files           ?      979           
  Lines           ?   135960           
  Branches        ?        0           
=======================================
  Hits            ?    63634           
  Misses          ?    64496           
  Partials        ?     7830           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov-commenter avatar Aug 06 '22 14:08 codecov-commenter