Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
46 changes: 24 additions & 22 deletions webviews/components/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,29 +85,31 @@ function Title({ title, number, url, canEdit, isCurrentlyCheckedOut, isIssue }:

return (
<div className="overview-title">
{editableTitle}
<div className="block-select">
{/*
For whatever reason, triple click on a block element in MacOS will select everything in that element, *and* every `user-select: false` block adjacent to that element.
Add an empty selectable div here to block triple click on title from selecting the following buttons. Issue #628.
*/}
</div>
{canEdit && !inEditMode ? (
<div className="flex-action-bar comment-actions">
{
<button title="Edit" onClick={() => setEditMode(true)}>
{editIcon}
</button>
}
{
<button title="Copy Link" onClick={copyPrLink}>
{copyIcon}
</button>
}
<div className="title-and-edit">
{editableTitle}
<div className="block-select">
{/*
For whatever reason, triple click on a block element in MacOS will select everything in that element, *and* every `user-select: false` block adjacent to that element.
Add an empty selectable div here to block triple click on title from selecting the following buttons. Issue #628.
*/}
</div>
) : (
<div className="flex-action-bar comment-actions"></div>
)}
{canEdit && !inEditMode ? (
<div className="flex-action-bar comment-actions">
{
<button title="Edit" onClick={() => setEditMode(true)}>
{editIcon}
</button>
}
{
<button title="Copy Link" onClick={copyPrLink}>
{copyIcon}
</button>
}
</div>
) : (
<div className="flex-action-bar comment-actions"></div>
)}
</div>
<div className="button-group">
<CheckoutButtons {...{ isCurrentlyCheckedOut, isIssue }} />
<button onClick={refresh}>Refresh</button>
Expand Down
16 changes: 13 additions & 3 deletions webviews/editorWebview/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,8 @@ body button .icon {
.overview-title {
display: flex;
position: relative;
flex-wrap: wrap;
justify-content: space-between;
}

.overview-title h2 {
Expand All @@ -357,11 +359,15 @@ body button .icon {

.overview-title .button-group {
padding-top: 2px;
margin-left: auto;
display: flex;
align-self: start;
}

.overview-title .title-and-edit {
display: flex;
flex-grow: 1;
}

.title-container {
width: 100%;
}
Expand All @@ -387,10 +393,13 @@ body button .icon {
}

body .overview-title .button-group button {
margin-left: 10px;
display: flex;
}

body .overview-title .button-group button:last-child {
margin-left: 10px;
}

#status {
box-sizing: border-box;
line-height: 18px;
Expand Down Expand Up @@ -603,6 +612,7 @@ textarea {
padding: 5px 0;
display: flex;
flex-direction: column;
min-width: 300px;
}

.editing-form .form-actions {
Expand Down Expand Up @@ -968,7 +978,7 @@ code {
display: flex;
justify-content: space-between;
z-index: 100;
top: 9px;
top: 9px;
right: 9px;
}

Expand Down