aboutsummaryrefslogtreecommitdiffstats
path: root/web_src
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2023-04-30 05:33:25 +0200
committerGitHub <noreply@github.com>2023-04-29 23:33:25 -0400
commit8f4dafcd4e6b0b5d307c3e060ffe908c2a96f047 (patch)
tree64ffc8db1d00e3a608aad99bb9ddaaaca9ad8d56 /web_src
parent0f52beb6b7e9fcb755cad64a60682ea76cfa2c9e (diff)
downloadgitea-8f4dafcd4e6b0b5d307c3e060ffe908c2a96f047.tar.gz
gitea-8f4dafcd4e6b0b5d307c3e060ffe908c2a96f047.zip
Rework header bar on issue, pull requests and milestone (#24420)
- Make search bar dynamic full width via flexbox - Make all buttons `small` so font size is the same for all elements in the header - Remove primary color from search field, add SVG icon like on Code tab - Fix button vertical padding being enlarged by SVG icons [View diff without whitespace](https://github.com/go-gitea/gitea/pull/24420/files?diff=unified&w=1) <img width="1226" alt="Screenshot 2023-04-29 at 11 58 53" src="https://user-images.githubusercontent.com/115237/235296851-74848267-664f-4c1f-b94c-a1b94196ff75.png"> <img width="1219" alt="Screenshot 2023-04-29 at 11 59 39" src="https://user-images.githubusercontent.com/115237/235296852-bcfde5ed-8658-43c2-b7e5-3ad84611e76f.png"> Mobile: <img width="437" alt="Screenshot 2023-04-29 at 11 59 52" src="https://user-images.githubusercontent.com/115237/235296860-99263373-7b27-4540-868c-a93e70f281ca.png"> <img width="433" alt="Screenshot 2023-04-29 at 12 00 00" src="https://user-images.githubusercontent.com/115237/235296862-6cf64317-a864-405a-a00f-b5ab620349f5.png">
Diffstat (limited to 'web_src')
-rw-r--r--web_src/css/base.css19
-rw-r--r--web_src/css/index.css1
-rw-r--r--web_src/css/repository.css14
-rw-r--r--web_src/css/repository/list-header.css36
4 files changed, 57 insertions, 13 deletions
diff --git a/web_src/css/base.css b/web_src/css/base.css
index a5a3377376..0aefbd0c3f 100644
--- a/web_src/css/base.css
+++ b/web_src/css/base.css
@@ -769,6 +769,10 @@ a.label,
border-color: var(--color-primary);
}
+.ui.action.input .button {
+ border-color: var(--color-input-border);
+}
+
/* currently used for search bar dropdowns in repo search and explore code */
.ui.action.input:not([class*="left action"]) > .ui.dropdown.selection {
min-width: 10em;
@@ -778,10 +782,21 @@ a.label,
border-right-color: transparent;
}
+.ui.action.input:not([class*="left action"]) > input:hover {
+ border-right-color: transparent;
+}
+
.ui.action.input:not([class*="left action"]) > input:focus {
border-right-color: var(--color-primary);
}
+/* fix button enlarged vertically by svg icon */
+/* TODO: change to just `.small.button:has(svg)` but may have global side effects */
+.ui.action.input .small.button:has(svg) {
+ padding-top: 7px !important;
+ padding-bottom: 7px !important;
+}
+
.ui.menu,
.ui.vertical.menu {
background: var(--color-menu);
@@ -830,6 +845,10 @@ a.label,
color: var(--color-text-light-3);
}
+.ui.menu .item::before {
+ background: var(--color-secondary);
+}
+
/* sub menu of vertical menu */
.ui.vertical.menu .item .menu .item {
color: var(--color-text-light-2);
diff --git a/web_src/css/index.css b/web_src/css/index.css
index 9d00566674..cdd0c51a54 100644
--- a/web_src/css/index.css
+++ b/web_src/css/index.css
@@ -32,6 +32,7 @@
@import "./repository.css";
@import "./repository/release-tag.css";
@import "./repository/issue-label.css";
+@import "./repository/list-header.css";
@import "./editor.css";
@import "./editor/combomarkdowneditor.css";
@import "./organization.css";
diff --git a/web_src/css/repository.css b/web_src/css/repository.css
index 5ef7bd6c50..6ad6ba88a8 100644
--- a/web_src/css/repository.css
+++ b/web_src/css/repository.css
@@ -161,7 +161,7 @@
.repository .ui.tabs.divider {
margin-top: -1px;
- margin-bottom: 20px;
+ margin-bottom: 12px;
}
.repository #clone-panel #repo-clone-url {
@@ -3289,18 +3289,6 @@ td.blob-excerpt {
.repository.file.list #repo-files-table .commit-list span.commit-summary {
display: none !important;
}
- .issue-list-headers.ui[class].grid > div:nth-child(1) {
- order: 1;
- width: 50%;
- }
- .issue-list-headers.ui[class].grid > div:nth-child(2) {
- order: 3;
- width: 100%;
- }
- .issue-list-headers.ui[class].grid > div.column:not(.row):nth-child(3) {
- order: 2;
- width: 50%;
- }
.repository.view.issue .comment-list .timeline,
.repository.view.issue .comment-list .timeline-item {
margin-left: 0;
diff --git a/web_src/css/repository/list-header.css b/web_src/css/repository/list-header.css
new file mode 100644
index 0000000000..4130383f89
--- /dev/null
+++ b/web_src/css/repository/list-header.css
@@ -0,0 +1,36 @@
+.list-header {
+ display: flex;
+ align-items: center;
+ flex-wrap: wrap;
+ gap: .5rem;
+}
+
+.list-header-sort {
+ display: flex;
+ align-items: center;
+ justify-content: flex-end;
+ padding-left: 1rem;
+ padding-right: 1rem;
+}
+
+.list-header-search {
+ display: flex;
+ flex: 1;
+ align-items: center;
+ flex-wrap: wrap;
+ justify-content: center;
+ min-width: 200px; /* to enable flexbox wrapping on mobile */
+}
+
+.list-header-search .input {
+ flex: 1;
+}
+
+.small-pill-buttons {
+ min-height: 35.4px !important; /* match .small.button in height */
+}
+
+.small-pill-buttons .item {
+ padding-top: 6px !important;
+ padding-bottom: 6px !important;
+}