-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Filter for default-branch selection #29388
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
Changes from 3 commits
c890e82
94663f7
5fe3a3f
941a921
44a9d72
4b907da
76c3d51
a6df81f
c5f57a3
b8f7a6e
2f24ac1
ca230a9
bc49c6a
a6a611f
c32722e
64181ca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,9 +91,11 @@ const sfc = { | |
if (item.tag) { | ||
this.isViewTag = true; | ||
$(`#${this.branchForm} input[name="refType"]`).val('tag'); | ||
$(`#${this.branchForm} input[name="tag"]`).val(item.name); | ||
} else { | ||
this.isViewBranch = true; | ||
$(`#${this.branchForm} input[name="refType"]`).val('branch'); | ||
$(`#${this.branchForm} input[name="branch"]`).val(item.name); | ||
} | ||
if (this.submitForm) { | ||
$(`#${this.branchForm}`).trigger('submit'); | ||
|
@@ -244,14 +246,14 @@ export function initRepoBranchTagSelector(selector) { | |
export default sfc; // activate IDE's Vue plugin | ||
</script> | ||
<template> | ||
<div class="ui dropdown custom"> | ||
<button class="branch-dropdown-button gt-ellipsis ui basic small compact button gt-df gt-m-0" @click="menuVisible = !menuVisible" @keyup.enter="menuVisible = !menuVisible"> | ||
<span class="text gt-df gt-ac gt-mr-2"> | ||
<div class="ui dropdown custom gt-w-full gt-h-full"> | ||
<button type="button" class="branch-dropdown-button gt-ellipsis ui basic small compact button gt-df gt-sb gt-m-0 gt-w-full gt-h-full" @click="menuVisible = !menuVisible" @keyup.enter="menuVisible = !menuVisible"> | ||
<span class="text gt-df gt-ac gt-mr-2 gt-ellipsis"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TBH, I am not a fan of filling these fine-tuning helpers everywhere. Personally I have no motivation to approve .... but I won't block. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Then what's the point of having helper-classes? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Some opinions in my mind:
There is a long argument in the frontend development, some people really like using helpers as much as possible, but I really dislike abusing them. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see your point, but there are ups and downs to each approach. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are still new classes has prefix There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And it's better to use plain javascript instead of jquery because we are removing jquery. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't mind the old classes, it keeps the diff minimal and they will later be replaced in a find-replace action anyways. But if you can, use new classes because otherwise we might run into conflicts with the refactoring PRs. jQuery removal in this PR is also not needed or wanted as it would better be done in a whole-file rewrite later. |
||
<template v-if="release">{{ textReleaseCompare }}</template> | ||
<template v-else> | ||
<svg-icon v-if="isViewTag" name="octicon-tag"/> | ||
<svg-icon v-else name="octicon-git-branch"/> | ||
<strong ref="dropdownRefName" class="gt-ml-3">{{ refNameText }}</strong> | ||
<strong ref="dropdownRefName" class="gt-ml-3 gt-ellipsis">{{ refNameText }}</strong> | ||
</template> | ||
</span> | ||
<svg-icon name="octicon-triangle-down" :size="14" class-name="dropdown icon"/> | ||
|
@@ -261,7 +263,7 @@ export default sfc; // activate IDE's Vue plugin | |
<i class="icon"><svg-icon name="octicon-filter" :size="16"/></i> | ||
<input name="search" ref="searchField" autocomplete="off" v-model="searchTerm" @keydown="keydown($event)" :placeholder="searchFieldPlaceholder"> | ||
</div> | ||
<div v-if="showBranchesInDropdown" class="branch-tag-tab"> | ||
<div v-if="showBranchesInDropdown && !noTag" class="branch-tag-tab"> | ||
<a class="branch-tag-item muted" :class="{active: mode === 'branches'}" href="#" @click="handleTabSwitch('branches')"> | ||
<svg-icon name="octicon-git-branch" :size="16" class-name="gt-mr-2"/>{{ textBranches }} | ||
</a> | ||
|
Uh oh!
There was an error while loading. Please reload this page.