Skip to content

Commit 10bab0a

Browse files
hamir-suspectskipi
authored andcommitted
fix(front): updated copy in dropdown and clear pagination when changing list type
1 parent a3905b1 commit 10bab0a

File tree

3 files changed

+38
-6
lines changed

3 files changed

+38
-6
lines changed

front/assets/js/project/components/choose_select.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ export class ChooseSelect {
4242
const url = new Url
4343
url.query['listing'] = selection.listing
4444
url.query['requester'] = selection.requester
45+
delete url.query['page_token']
46+
delete url.query['direction']
4547

4648
window.location.href = url.toString()
4749
}

front/lib/front_web/templates/project/_tabs.html.eex

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
11
<style>
2+
#chooseSelect select optgroup {
3+
color: #999;
4+
font-style: normal;
5+
font-weight: normal;
6+
}
7+
8+
#chooseSelect select option {
9+
color: #000;
10+
font-weight: normal;
11+
}
12+
213
.project-jumpto {
314
position: relative;
415
}
@@ -53,9 +64,13 @@
5364
<div class="flex-auto">
5465
<div id="chooseSelect" class="flex-m items-center flex-wrap">
5566
<select data-key="listing_requester" class="db form-control mb3 mb0-m mr3">
56-
<option value="all_pipelines" <%= if @listing_requester == "all_pipelines", do: "selected" %>>All pipelines</option>
57-
<option value="all_by_me" <%= if @listing_requester == "all_by_me", do: "selected" %>>All by me</option>
58-
<option value="latest_per_branch" <%= if @listing_requester == "latest_per_branch", do: "selected" %>>Latest per branch</option>
67+
<optgroup label="Show all workflows">
68+
<option value="all_pipelines" <%= if @listing_requester == "all_pipelines", do: "selected" %>>Everyone's workflows</option>
69+
<option value="all_by_me" <%= if @listing_requester == "all_by_me", do: "selected" %>>My workflows</option>
70+
</optgroup>
71+
<optgroup label="Show latest workflows per branch, PR, or tag">
72+
<option value="latest_per_branch" <%= if @listing_requester == "latest_per_branch", do: "selected" %>>Latest workflows</option>
73+
</optgroup>
5974
</select>
6075
<div class="flex items-center">
6176
<select data-key="type" class="db form-control mb3 mb0-m mr3">

front/lib/front_web/templates/project/public/_tabs.html.eex

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
11
<style>
2+
#chooseSelect select optgroup {
3+
color: #999;
4+
font-style: normal;
5+
font-weight: normal;
6+
}
7+
8+
#chooseSelect select option {
9+
color: #000;
10+
font-weight: normal;
11+
}
12+
213
.project-jumpto {
314
position: relative;
415
}
@@ -50,9 +61,13 @@
5061
<div class="flex-auto">
5162
<div id="chooseSelect" class="flex-m items-center mb2 flex-wrap">
5263
<select data-key="listing_requester" class="db form-control mb3 mb0-m mr3">
53-
<option value="all_pipelines" <%= if @listing_requester == "all_pipelines", do: "selected" %>>All pipelines</option>
54-
<option value="all_by_me" <%= if @listing_requester == "all_by_me", do: "selected" %>>All by me</option>
55-
<option value="latest_per_branch" <%= if @listing_requester == "latest_per_branch", do: "selected" %>>Latest per branch</option>
64+
<optgroup label="Show all workflows">
65+
<option value="all_pipelines" <%= if @listing_requester == "all_pipelines", do: "selected" %>>Everyone's workflows</option>
66+
<option value="all_by_me" <%= if @listing_requester == "all_by_me", do: "selected" %>>My workflows</option>
67+
</optgroup>
68+
<optgroup label="Show latest workflows per branch, PR, or tag">
69+
<option value="latest_per_branch" <%= if @listing_requester == "latest_per_branch", do: "selected" %>>Latest workflows</option>
70+
</optgroup>
5671
</select>
5772
<div class="flex items-center">
5873
<select data-key="type" class="db form-control mb3 mb0-m mr3">

0 commit comments

Comments
 (0)