Skip to content

Commit 10d83ae

Browse files
GiteaBotsilverwind
andauthored
Action view mobile improvements and fixes (#30309) (#30320)
Backport #30309 by @silverwind Fix the action issue in #30303, specifically: - Use opaque step header hover background to avoid transparency issue - Un-sticky the `action-view-left` on mobile, it would otherwise overlap into right view - Improve commit summary, let it wrap - Fix and comment z-indexes - Tweak width for run-list-item-right so it wastes less space on desktop - Synced latest changes to console colors from dark to light theme <img width="467" alt="Screenshot 2024-04-06 at 18 58 15" src="https://github.com/go-gitea/gitea/assets/115237/8ad26b72-6cd9-4522-8ad1-6fd86b2d0d53"> Co-authored-by: silverwind <me@silverwind.io>
1 parent d26ec5f commit 10d83ae

File tree

4 files changed

+30
-14
lines changed

4 files changed

+30
-14
lines changed

web_src/css/actions.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
}
4545

4646
.run-list-item-right {
47-
flex: 0 0 15%;
47+
flex: 0 0 min(20%, 130px);
4848
display: flex;
4949
flex-direction: column;
5050
gap: 3px;

web_src/css/themes/theme-gitea-dark.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
--color-console-fg-subtle: #bec4c8;
6666
--color-console-bg: #171b1e;
6767
--color-console-border: #2e353b;
68-
--color-console-hover-bg: #e8e8ff16;
68+
--color-console-hover-bg: #292d31;
6969
--color-console-active-bg: #2e353b;
7070
--color-console-menu-bg: #252b30;
7171
--color-console-menu-border: #424b51;

web_src/css/themes/theme-gitea-light.css

+6-6
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@
6363
/* console colors - used for actions console and console files */
6464
--color-console-fg: #f8f8f9;
6565
--color-console-fg-subtle: #bec4c8;
66-
--color-console-bg: #181b1d;
67-
--color-console-border: #313538;
68-
--color-console-hover-bg: #ffffff16;
69-
--color-console-active-bg: #313538;
70-
--color-console-menu-bg: #272b2e;
71-
--color-console-menu-border: #464a4d;
66+
--color-console-bg: #171b1e;
67+
--color-console-border: #2e353b;
68+
--color-console-hover-bg: #292d31;
69+
--color-console-active-bg: #2e353b;
70+
--color-console-menu-bg: #252b30;
71+
--color-console-menu-border: #424b51;
7272
/* named colors */
7373
--color-red: #db2828;
7474
--color-orange: #f2711c;

web_src/js/components/RepoActionView.vue

+22-6
Original file line numberDiff line numberDiff line change
@@ -517,8 +517,16 @@ export function initRepositoryActionView() {
517517
518518
.action-commit-summary {
519519
display: flex;
520+
flex-wrap: wrap;
520521
gap: 5px;
521-
margin: 0 0 0 28px;
522+
margin-left: 28px;
523+
}
524+
525+
@media (max-width: 767.98px) {
526+
.action-commit-summary {
527+
margin-left: 0;
528+
margin-top: 8px;
529+
}
522530
}
523531
524532
/* ================ */
@@ -531,6 +539,14 @@ export function initRepositoryActionView() {
531539
top: 12px;
532540
max-height: 100vh;
533541
overflow-y: auto;
542+
background: var(--color-body);
543+
z-index: 2; /* above .job-info-header */
544+
}
545+
546+
@media (max-width: 767.98px) {
547+
.action-view-left {
548+
position: static; /* can not sticky because multiple jobs would overlap into right view */
549+
}
534550
}
535551
536552
.job-artifacts-title {
@@ -692,7 +708,9 @@ export function initRepositoryActionView() {
692708
position: sticky;
693709
top: 0;
694710
height: 60px;
695-
z-index: 1;
711+
z-index: 1; /* above .job-step-container */
712+
background: var(--color-console-bg);
713+
border-radius: 3px;
696714
}
697715
698716
.job-info-header:has(+ .job-step-container) {
@@ -730,7 +748,7 @@ export function initRepositoryActionView() {
730748
731749
.job-step-container .job-step-summary.step-expandable:hover {
732750
color: var(--color-console-fg);
733-
background-color: var(--color-console-hover-bg);
751+
background: var(--color-console-hover-bg);
734752
}
735753
736754
.job-step-container .job-step-summary .step-summary-msg {
@@ -748,17 +766,15 @@ export function initRepositoryActionView() {
748766
top: 60px;
749767
}
750768
751-
@media (max-width: 768px) {
769+
@media (max-width: 767.98px) {
752770
.action-view-body {
753771
flex-direction: column;
754772
}
755773
.action-view-left, .action-view-right {
756774
width: 100%;
757775
}
758-
759776
.action-view-left {
760777
max-width: none;
761-
overflow-y: hidden;
762778
}
763779
}
764780
</style>

0 commit comments

Comments
 (0)