Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Several fixes for mobile UI #25634

Merged
merged 10 commits into from
Jul 4, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions templates/repo/branch/list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
</div>
<p class="info gt-df gt-ac gt-my-2">{{svg "octicon-git-commit" 16 "gt-mr-2"}}<a href="{{.RepoLink}}/commit/{{PathEscape .DefaultBranchBranch.DBBranch.CommitID}}">{{ShortSha .DefaultBranchBranch.DBBranch.CommitID}}</a> · <span class="commit-message">{{RenderCommitMessage $.Context .DefaultBranchBranch.DBBranch.CommitMessage .RepoLink .Repository.ComposeMetas}}</span> · {{.locale.Tr "org.repo_updated"}} {{TimeSince .DefaultBranchBranch.DBBranch.CommitTime.AsTime .locale}}{{if .DefaultBranchBranch.DBBranch.Pusher}} &nbsp;{{template "shared/user/avatarlink" dict "Context" $.Context "user" .DefaultBranchBranch.DBBranch.Pusher}}{{template "shared/user/namelink" .DefaultBranchBranch.DBBranch.Pusher}}{{end}}</p>
</td>
<td class="right aligned overflow-visible">
<td class="right aligned overflow-visible branch-toolbar">
{{if and $.IsWriter (not $.Repository.IsArchived) (not .IsDeleted)}}
<button class="btn interact-bg show-create-branch-modal gt-p-3"
<button class="btn interact-bg show-create-branch-modal"
data-modal="#create-branch-modal"
data-branch-from="{{$.DefaultBranchBranch}}"
data-branch-from-urlcomponent="{{PathEscapeSegments $.DefaultBranchBranch.DBBranch.Name}}"
Expand All @@ -40,10 +40,10 @@
</button>
{{end}}
{{if .EnableFeed}}
<a role="button" class="btn interact-bg gt-p-3" href="{{$.FeedURL}}/rss/branch/{{PathEscapeSegments .DefaultBranchBranch.DBBranch.Name}}">{{svg "octicon-rss"}}</a>
<a role="button" class="btn interact-bg" href="{{$.FeedURL}}/rss/branch/{{PathEscapeSegments .DefaultBranchBranch.DBBranch.Name}}">{{svg "octicon-rss"}}</a>
{{end}}
{{if not $.DisableDownloadSourceArchives}}
<div class="ui dropdown btn interact-bg gt-p-3" data-tooltip-content="{{$.locale.Tr "repo.branch.download" ($.DefaultBranchBranch.DBBranch.Name)}}">
<div class="ui dropdown btn interact-bg" data-tooltip-content="{{$.locale.Tr "repo.branch.download" ($.DefaultBranchBranch.DBBranch.Name)}}">
{{svg "octicon-download"}}
<div class="menu">
<a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments $.DefaultBranchBranch.DBBranch.Name}}.zip" rel="nofollow">{{svg "octicon-file-zip"}}&nbsp;ZIP</a>
Expand All @@ -52,7 +52,7 @@
</div>
{{end}}
{{if and $.IsWriter (not $.Repository.IsArchived) (not .IsDeleted) (not $.IsMirror)}}
<button class="btn interact-bg gt-p-3 show-modal show-rename-branch-modal"
<button class="btn interact-bg show-modal show-rename-branch-modal"
data-is-default-branch="true"
data-modal="#rename-branch-modal"
data-old-branch-name="{{$.DefaultBranchBranch}}"
Expand Down Expand Up @@ -138,9 +138,9 @@
{{end}}
{{end}}
</td>
<td class="three wide right aligned overflow-visible">
<td class="three wide right aligned overflow-visible branch-toolbar">
{{if and $.IsWriter (not $.Repository.IsArchived) (not .DBBranch.IsDeleted)}}
<button class="btn interact-bg gt-p-3 show-modal show-create-branch-modal"
<button class="btn interact-bg show-modal show-create-branch-modal"
data-branch-from="{{.DBBranch.Name}}"
data-branch-from-urlcomponent="{{PathEscapeSegments .DBBranch.Name}}"
data-tooltip-content="{{$.locale.Tr "repo.branch.new_branch_from" .DBBranch.Name}}"
Expand All @@ -150,10 +150,10 @@
</button>
{{end}}
{{if $.EnableFeed}}
<a role="button" class="btn interact-bg gt-p-3" href="{{$.FeedURL}}/rss/branch/{{PathEscapeSegments .DBBranch.Name}}">{{svg "octicon-rss"}}</a>
<a role="button" class="btn interact-bg" href="{{$.FeedURL}}/rss/branch/{{PathEscapeSegments .DBBranch.Name}}">{{svg "octicon-rss"}}</a>
{{end}}
{{if and (not .DBBranch.IsDeleted) (not $.DisableDownloadSourceArchives)}}
<div class="ui dropdown btn interact-bg gt-p-3" data-tooltip-content="{{$.locale.Tr "repo.branch.download" (.DBBranch.Name)}}">
<div class="ui dropdown btn interact-bg" data-tooltip-content="{{$.locale.Tr "repo.branch.download" (.DBBranch.Name)}}">
{{svg "octicon-download"}}
<div class="menu">
<a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments .DBBranch.Name}}.zip" rel="nofollow">{{svg "octicon-file-zip"}}&nbsp;ZIP</a>
Expand All @@ -162,7 +162,7 @@
</div>
{{end}}
{{if and $.IsWriter (not $.Repository.IsArchived) (not .DBBranch.IsDeleted) (not $.IsMirror)}}
<button class="btn interact-bg gt-p-3 show-modal show-rename-branch-modal"
<button class="btn interact-bg show-modal show-rename-branch-modal"
data-is-default-branch="false"
data-old-branch-name="{{.DBBranch.Name}}"
data-modal="#rename-branch-modal"
Expand All @@ -173,13 +173,13 @@
{{end}}
{{if and $.IsWriter (not $.IsMirror) (not $.Repository.IsArchived) (not .IsProtected)}}
{{if .DBBranch.IsDeleted}}
<button class="btn interact-bg gt-p-3 link-action restore-branch-button" data-url="{{$.Link}}/restore?branch_id={{.DBBranch.ID}}&name={{.DBBranch.Name}}&page={{$.Page.Paginater.Current}}" data-tooltip-content="{{$.locale.Tr "repo.branch.restore" (.DBBranch.Name)}}">
<button class="btn interact-bg link-action restore-branch-button" data-url="{{$.Link}}/restore?branch_id={{.DBBranch.ID}}&name={{.DBBranch.Name}}&page={{$.Page.Paginater.Current}}" data-tooltip-content="{{$.locale.Tr "repo.branch.restore" (.DBBranch.Name)}}">
<span class="text blue">
{{svg "octicon-reply"}}
</span>
</button>
{{else}}
<button class="btn interact-bg gt-p-3 delete-button delete-branch-button" data-url="{{$.Link}}/delete?name={{.DBBranch.Name}}&page={{$.Page.Paginater.Current}}" data-tooltip-content="{{$.locale.Tr "repo.branch.delete" (.DBBranch.Name)}}" data-name="{{.DBBranch.Name}}">
<button class="btn interact-bg delete-button delete-branch-button" data-url="{{$.Link}}/delete?name={{.DBBranch.Name}}&page={{$.Page.Paginater.Current}}" data-tooltip-content="{{$.locale.Tr "repo.branch.delete" (.DBBranch.Name)}}" data-name="{{.DBBranch.Name}}">
{{svg "octicon-trash"}}
</button>
{{end}}
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/commits_list.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="ui attached table segment commit-table">
<table class="ui very basic striped table unstackable fixed" id="commits-table">
<table class="ui very basic striped table unstackable" id="commits-table">
<thead>
<tr>
<th class="three wide">{{.locale.Tr "repo.commits.author"}}</th>
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/commits_table.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{{.locale.Tr "repo.commits.no_commits" $.BaseBranch $.HeadBranch}} {{if .RefName}}({{.RefName}}){{end}}
{{end}}
</div>
<div class="commits-table-right gt-df gt-ac">
<div class="commits-table-right">
{{if .PageIsCommits}}
<form class="ignore-dirty" action="{{.RepoLink}}/commits/{{.BranchNameSubURL}}/search">
<div class="ui tiny search input">
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/issue/labels/labels_selector_field.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-label dropdown">
<span class="text gt-df gt-ac muted">
<span class="text muted flex-text-block">
<strong>{{.locale.Tr "repo.issues.new.labels"}}</strong>
{{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}
{{svg "octicon-gear" 16 "gt-ml-2"}}
Expand Down
12 changes: 6 additions & 6 deletions templates/repo/issue/new_form.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@

<input id="milestone_id" name="milestone_id" type="hidden" value="{{.milestone_id}}">
<div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating jump select-milestone dropdown">
<span class="text">
<span class="text flex-text-block">
<strong>{{.locale.Tr "repo.issues.new.milestone"}}</strong>
{{if .HasIssuesOrPullsWritePermission}}
{{svg "octicon-gear"}}
{{svg "octicon-gear" 16 "gt-ml-2"}}
{{end}}
</span>
<div class="menu">
Expand All @@ -86,10 +86,10 @@

<input id="project_id" name="project_id" type="hidden" value="{{.project_id}}">
<div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating jump select-project dropdown">
<span class="text">
<span class="text flex-text-block">
<strong>{{.locale.Tr "repo.issues.new.projects"}}</strong>
{{if .HasIssuesOrPullsWritePermission}}
{{svg "octicon-gear"}}
{{svg "octicon-gear" 16 "gt-ml-2"}}
{{end}}
</span>
<div class="menu">
Expand Down Expand Up @@ -144,10 +144,10 @@
<div class="divider"></div>
<input id="assignee_ids" name="assignee_ids" type="hidden" value="{{.assignee_ids}}">
<div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating jump select-assignees dropdown">
<span class="text">
<span class="text flex-text-block">
<strong>{{.locale.Tr "repo.issues.new.assignees"}}</strong>
{{if .HasIssuesOrPullsWritePermission}}
{{svg "octicon-gear"}}
{{svg "octicon-gear" 16 "gt-ml-2"}}
{{end}}
</span>
<div class="filter menu" data-id="#assignee_ids">
Expand Down
6 changes: 3 additions & 3 deletions templates/repo/issue/view_content/sidebar.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
<div class="divider"></div>

<div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-milestone dropdown">
<a class="text gt-df gt-ac muted">
<a class="text muted flex-text-block">
<strong>{{.locale.Tr "repo.issues.new.milestone"}}</strong>
{{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}
{{svg "octicon-gear" 16 "gt-ml-2"}}
Expand All @@ -153,7 +153,7 @@
<div class="divider"></div>

<div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-project dropdown">
<a class="text gt-df gt-ac muted">
<a class="text muted flex-text-block">
<strong>{{.locale.Tr "repo.issues.new.projects"}}</strong>
{{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}
{{svg "octicon-gear" 16 "gt-ml-2"}}
Expand Down Expand Up @@ -207,7 +207,7 @@

<input id="assignee_id" name="assignee_id" type="hidden" value="{{.assignee_id}}">
<div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-assignees-modify dropdown">
<a class="text gt-df gt-ac muted">
<a class="text muted flex-text-block">
<strong>{{.locale.Tr "repo.issues.new.assignees"}}</strong>
{{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}
{{svg "octicon-gear" 16 "gt-ml-2"}}
Expand Down
2 changes: 1 addition & 1 deletion templates/shared/combomarkdowneditor.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Template Attributes:
</div>
{{end}}
<div class="ui tab active" data-tab-panel="markdown-writer">
<markdown-toolbar class="gt-gap-3">
<markdown-toolbar>
<div class="markdown-toolbar-group">
<md-header class="markdown-toolbar-button" data-tooltip-content="{{.locale.Tr "editor.buttons.heading.tooltip"}}">{{svg "octicon-heading"}}</md-header>
<md-bold class="markdown-toolbar-button" data-tooltip-content="{{.locale.Tr "editor.buttons.bold.tooltip"}}">{{svg "octicon-bold"}}</md-bold>
Expand Down
2 changes: 2 additions & 0 deletions web_src/css/editor/combomarkdowneditor.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
display: flex;
align-items: center;
padding-bottom: 10px;
gap: .5rem;
flex-wrap: wrap;
}

.combo-markdown-editor .markdown-toolbar-group {
Expand Down
41 changes: 35 additions & 6 deletions web_src/css/repo.css
Original file line number Diff line number Diff line change
Expand Up @@ -655,9 +655,19 @@
.repository.view.issue .issue-title {
flex-direction: column;
}
.repository.view.issue .issue-title-buttons, .repository.view.issue .edit-buttons {
denyskon marked this conversation as resolved.
Show resolved Hide resolved
width: 100%;
justify-content: space-between;
}
.repository.view.issue .edit-buttons {
margin-top: .5rem;
}
.comment.form .issue-content-left .avatar {
display: none;
}
.comment.form .issue-content-left .content {
margin-left: 0 !important;
}
}

.repository.view.issue .issue-title {
Expand Down Expand Up @@ -1197,7 +1207,14 @@
text-align: left;
}

.repository.compare.pull .choose.branch .svg {
.repository .choose.branch {
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
}

.repository .choose.branch .svg {
margin-right: 10px;
}

Expand Down Expand Up @@ -1284,6 +1301,11 @@
left: 0;
}

.repository.branches .branch-toolbar .btn {
padding: .5rem;
vertical-align: middle;
}

.repository.commits .header .search input {
font-weight: var(--font-weight-normal);
padding: 5px 10px;
Expand Down Expand Up @@ -2036,12 +2058,15 @@
.repository .ui.segment.sub-menu .list {
width: 100%;
display: flex;
align-items: center;
align-items: stretch;
}

.repository .ui.segment.sub-menu .list .item {
width: 100%;
color: var(--color-text);
display: flex;
align-items: center;
justify-content: center;
}

.repository .ui.segment.sub-menu .list .item:first-of-type {
Expand Down Expand Up @@ -3128,6 +3153,11 @@ tbody.commit-list {
text-wrap: balance;
}

.commits-table .commits-table-right form {
display: flex;
align-items: center;
}
denyskon marked this conversation as resolved.
Show resolved Hide resolved

@media (max-width: 767.98px) {
.repository.file.list #repo-files-table .entry,
.repository.file.list #repo-files-table .commit-list {
Expand Down Expand Up @@ -3198,7 +3228,7 @@ tbody.commit-list {
margin-bottom: 6px;
}
.commits-table .commits-table-right form {
display: flex;
justify-content: center;
flex-wrap: wrap;
}
.commits-table .commits-table-right form > div:nth-child(1) {
Expand All @@ -3223,9 +3253,8 @@ tbody.commit-list {
.commit-table .commit-list span.message-wrapper {
max-width: none;
}
.commit-table .commit-list tr td:last-child {
display: block;
width: max-content;
.commit-table .commit-list tr td:first-child, .commit-table .commit-list tr td:last-child {
white-space: nowrap;
}
.commit-table .commit-list td.author {
display: block;
Expand Down
8 changes: 3 additions & 5 deletions web_src/js/components/RepoActionView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,8 @@ export function initRepositoryActionView() {

<style scoped>
.action-view-body {
padding-top: 12px;
padding-bottom: 12px;
display: flex;
gap: 12px;
}
Expand Down Expand Up @@ -511,11 +513,6 @@ export function initRepositoryActionView() {
margin: 5px 0 0 25px;
}

.action-view-left, .action-view-right {
padding-top: 12px;
padding-bottom: 12px;
}

/* ================ */
/* action view left */

Expand Down Expand Up @@ -729,6 +726,7 @@ export function initRepositoryActionView() {
background-color: var(--color-console-bg);
max-height: 100%;
border-radius: 0 0 var(--border-radius) var(--border-radius);
z-index: 0;
}

.job-step-container .job-step-summary {
Expand Down