@@ -32,8 +32,9 @@ export function Header({
3232 owner,
3333 repo,
3434 busy,
35- stateReason
36- } : PullRequest ) {
35+ stateReason,
36+ isCompact
37+ } : PullRequest & { isCompact ?: boolean } ) {
3738 const [ currentTitle , setCurrentTitle ] = useStateProp ( title ) ;
3839 const [ inEditMode , setEditMode ] = useState ( false ) ;
3940 const codingAgentEvent = mostRecentCopilotEvent ( events ) ;
@@ -51,9 +52,16 @@ export function Header({
5152 canEdit = { canEdit }
5253 owner = { owner }
5354 repo = { repo }
55+ isCompact = { isCompact }
5456 />
55- < Subtitle state = { state } stateReason = { stateReason } head = { head } base = { base } author = { author } isIssue = { isIssue } isDraft = { isDraft } codingAgentEvent = { codingAgentEvent } />
57+ { ! isCompact && < Subtitle state = { state } stateReason = { stateReason } head = { head } base = { base } author = { author } isIssue = { isIssue } isDraft = { isDraft } codingAgentEvent = { codingAgentEvent } /> }
5658 < div className = "header-actions" >
59+ { isCompact && (
60+ < div id = "status" className = { `status-badge-${ getStatus ( state , ! ! isDraft , isIssue , stateReason ) . color } ` } >
61+ < span className = 'icon' > { getStatus ( state , ! ! isDraft , isIssue , stateReason ) . icon } </ span >
62+ < span > { getStatus ( state , ! ! isDraft , isIssue , stateReason ) . text } </ span >
63+ </ div >
64+ ) }
5765 < ButtonGroup
5866 isCurrentlyCheckedOut = { isCurrentlyCheckedOut }
5967 isIssue = { isIssue }
@@ -80,9 +88,10 @@ interface TitleProps {
8088 canEdit : boolean ;
8189 owner : string ;
8290 repo : string ;
91+ isCompact ?: boolean ;
8392}
8493
85- function Title ( { title, titleHTML, number, url, inEditMode, setEditMode, setCurrentTitle, canEdit, owner, repo } : TitleProps ) : JSX . Element {
94+ function Title ( { title, titleHTML, number, url, inEditMode, setEditMode, setCurrentTitle, canEdit, owner, repo, isCompact } : TitleProps ) : JSX . Element {
8695 const { setTitle, copyPrLink } = useContext ( PullRequestContext ) ;
8796
8897 const titleForm = (
@@ -120,22 +129,24 @@ function Title({ title, titleHTML, number, url, inEditMode, setEditMode, setCurr
120129 context [ 'github:copyMenu' ] = true ;
121130
122131 const displayTitle = (
123- < div className = " overview-title" >
132+ < div className = { ` overview-title ${ isCompact ? 'compact' : '' } ` } >
124133 < h2 >
125134 < span dangerouslySetInnerHTML = { { __html : titleHTML } } />
126135 { ' ' }
127136 < a href = { url } title = { url } data-vscode-context = { JSON . stringify ( context ) } >
128137 #{ number }
129138 </ a >
130139 </ h2 >
131- { canEdit ?
140+ { ! isCompact && canEdit ?
132141 < button title = "Rename" onClick = { ( ) => setEditMode ( true ) } className = "icon-button" >
133142 { editIcon }
134143 </ button >
135144 : null }
136- < button title = "Copy Link" onClick = { copyPrLink } className = "icon-button" aria-label = "Copy Pull Request Link" >
137- { copyIcon }
138- </ button >
145+ { ! isCompact && (
146+ < button title = "Copy Link" onClick = { copyPrLink } className = "icon-button" aria-label = "Copy Pull Request Link" >
147+ { copyIcon }
148+ </ button >
149+ ) }
139150 </ div >
140151 ) ;
141152
0 commit comments