Skip to content

Commit

Permalink
fix: long banner messages get cut off (argoproj#7264)
Browse files Browse the repository at this point in the history
Signed-off-by: Regina Scott <[email protected]>
  • Loading branch information
reginapizza authored Sep 27, 2021
1 parent 65012f5 commit eb2c69d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
11 changes: 11 additions & 0 deletions ui/src/app/ui-banner/ui-banner.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
display: flex;
align-items: center;
justify-content: center;
padding: 5px 10px 5px 70px;

a {
text-decoration: underline;
Expand All @@ -28,3 +29,13 @@
}
}
}

.ui-banner-text {
margin-right: 15px;
overflow-y: auto;
max-height: 50px;
}

.ui-banner-button {
line-height: 1.1;
}
8 changes: 5 additions & 3 deletions ui/src/app/ui-banner/ui-banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const Banner = (props: React.Props<any>) => {
return (
<React.Fragment>
<div className='ui-banner' style={{visibility: show ? 'visible' : 'hidden'}}>
<div style={{marginRight: '15px'}}>
<div className='ui-banner-text'>
{url !== undefined ? (
<a href={url} target='_blank' rel='noopener noreferrer'>
{content}
Expand All @@ -41,10 +41,12 @@ export const Banner = (props: React.Props<any>) => {
<React.Fragment>{content}</React.Fragment>
)}
</div>
<button className='argo-button argo-button--base' style={{marginRight: '5px'}} onClick={() => setVisible(false)}>
<button className='ui-banner-button argo-button argo-button--base' style={{marginRight: '5px'}} onClick={() => setVisible(false)}>
Dismiss for now
</button>
<button className='argo-button argo-button--base' onClick={() => services.viewPreferences.updatePreferences({...prefs, hideBannerContent: content})}>
<button
className='ui-banner-button argo-button argo-button--base'
onClick={() => services.viewPreferences.updatePreferences({...prefs, hideBannerContent: content})}>
Don't show again
</button>
</div>
Expand Down

0 comments on commit eb2c69d

Please sign in to comment.