Skip to content

Commit 881331e

Browse files
committed
Firefly_1037: response to feedback
- added acknowledgement - added more hyperlinks
1 parent 7a716d6 commit 881331e

File tree

2 files changed

+63
-27
lines changed

2 files changed

+63
-27
lines changed

src/firefly/js/ui/PopupUtil.jsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,14 @@ export function showOptionsPopup({content, title='Options', modal = false, show=
8484
* @param {string | object} content can be a string or a react component
8585
* @param {string} title
8686
* @param {boolean} [isCopyable] true or false, if undefined, then the default to true if it is a string
87+
* @param [wrapperStyle]
8788
* @return {object}
8889
*/
89-
export function showInfoPopup(content, title='Information', isCopyable=undefined) {
90+
export function showInfoPopup(content, title='Information', isCopyable=undefined, wrapperStyle) {
9091
if (isUndefined(isCopyable)) isCopyable = isString(content);
9192
var results= (
9293
<PopupPanel title={title} >
93-
{makeContent(content, isCopyable)}
94+
{makeContent(content, isCopyable, wrapperStyle)}
9495
</PopupPanel>
9596
);
9697
DialogRootContainer.defineDialog(INFO_POPUP, results);
@@ -104,10 +105,10 @@ export function hideInfoPopup() {
104105
dispatchHideDialog(INFO_POPUP);
105106
}
106107

107-
function makeContent(content, isCopyable) {
108+
function makeContent(content, isCopyable, wrapperStyle={}) {
108109
return (
109110
<div style={{padding:5}}>
110-
<div style={{minWidth:350, maxWidth: 500, padding:'10px 10px 15px 10px', fontSize:'120%', overflow: 'hidden'}}
111+
<div style={{minWidth:350, maxWidth: 500, padding:'10px 10px 15px 10px', fontSize:'120%', overflow: 'hidden', ...wrapperStyle}}
111112
className={isCopyable ? 'popup-panel-textcopyable' : ''}>
112113
{content}
113114
</div>

src/firefly/js/ui/VersionInfo.jsx

Lines changed: 58 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {showInfoPopup} from './PopupUtil.jsx';
88
import './VersionInfo.css';
99
import IPAC_LOGO from 'images/ipac_logo-56x40.png';
1010
import CALTECH_LOGO from 'images/caltech-new-logo.png';
11+
import FFTOOLS_ICO from 'html/images/fftools-logo-offset-small-42x42.png';
1112

1213
const VER = 'Version';
1314
const BUILT_ON = 'Built On';
@@ -51,32 +52,66 @@ function VersionInfoFull() {
5152
+ (ffTag ? `\n${FF_TAG}: ${ffTag}` : '');
5253

5354
return (
54-
<div style={{display: 'flex', justifyContent: 'space-evenly'}}>
55-
<div style={{paddingRight:10, display: 'flex', flexDirection:'column', alignItems:'center'}}>
56-
<a href="https://www.caltech.edu" target='caltech-window'><img style={{width:70}} alt="Caltech" src={CALTECH_LOGO}/></a>
57-
<a href="https://www.ipac.caltech.edu" target='ipac-window'><img alt="IPAC" src={IPAC_LOGO}/></a>
58-
</div>
59-
<div className='Version-grid'>
60-
<Entry desc={VER} value={version}/>
61-
<Entry desc={BUILT_ON} value={BuildTime}/>
62-
<Entry desc={COMMIT} value={BuildCommit}/>
63-
{major ? <Entry desc={FF_LIB} value={getFireflyLibraryVersionStr()}/> : ''}
64-
{ffCommit && <Entry desc={FF_COM} value={ffCommit}/>}
65-
{ffTag && <Entry desc={FF_TAG} value={ffTag}/>}
66-
{
67-
!isVersionFormalRelease() &&
68-
<div className='Version-grid-warning'>
69-
{isVersionPreRelease() ?
70-
`Warning: Early preview of Firefly ${getDevCycle()}` :
71-
`Warning: Development build of Firefly on dev cycle ${getDevCycle()}`
72-
}
55+
<div style={{display: 'flex', justifyContent: 'space-evenly', flexDirection:'column'}}>
56+
<div style={{display: 'flex', justifyContent: 'flex-start'}}>
57+
<div style={{paddingRight:10, display: 'flex', flexDirection:'column', alignItems:'center', marginTop:-20}}>
58+
<a href='https://github.com/Caltech-IPAC/firefly' target='github-window'><img alt='Firefly' src={FFTOOLS_ICO} style={{marginTop:10}}/></a>
59+
<a href='https://www.caltech.edu' target='caltech-window'><img style={{width:70}} alt='Caltech' src={CALTECH_LOGO}/></a>
60+
<a href='https://www.ipac.caltech.edu' target='ipac-window'><img alt='IPAC' src={IPAC_LOGO}/></a>
61+
</div>
62+
<div style={{display: 'flex', justifyContent: 'space-evenly', marginLeft:60, alignItems:'flex-start'}}>
63+
<div className='Version-grid'>
64+
<Entry desc={VER} value={version}/>
65+
<Entry desc={BUILT_ON} value={BuildTime}/>
66+
<Entry desc={COMMIT} value={BuildCommit}/>
67+
{major ? <Entry desc={FF_LIB} value={getFireflyLibraryVersionStr()}/> : ''}
68+
{ffCommit && <Entry desc={FF_COM} value={ffCommit}/>}
69+
{ffTag && <Entry desc={FF_TAG} value={ffTag}/>}
7370
</div>
74-
}
71+
<CopyToClipboard style={{justifySelf: 'start', marginLeft:10}}
72+
value={versionAsText} size={16} buttonStyle={{backgroundColor: 'unset'}}/>
73+
</div>
7574
</div>
76-
<CopyToClipboard style={{justifySelf: 'end', marginLeft: 10}}
77-
value={versionAsText} size={16} buttonStyle={{backgroundColor: 'unset'}}/>
75+
{
76+
!isVersionFormalRelease() &&
77+
<div className='Version-grid-warning'>
78+
{isVersionPreRelease() ?
79+
`Warning: Early preview of Firefly ${getDevCycle()}` :
80+
`Warning: Development build of Firefly on dev cycle ${getDevCycle()}`
81+
}
82+
</div>
83+
}
84+
<Acknowledgement/>
7885
</div>
7986
);
8087
}
8188

82-
export const showFullVersionInfoDialog = (title = '') => showInfoPopup( <VersionInfoFull/>, `${title} Version Information`);
89+
90+
const Acknowledgement= () => (
91+
<div style={{padding:'10px 5px 3px 5px', width:600, fontSize:'smaller'}}>
92+
<span>
93+
Firefly development at&nbsp;
94+
</span>
95+
<a href='https://ipac.caltech.edu' target='ipac-window'>IPAC</a>
96+
<span>
97+
&nbsp;has been supported by NASA, principally through&nbsp;
98+
</span>
99+
<a href='https://irsa.ipac.caltech.edu' target='ipac-window'>IRSA</a>
100+
<span>
101+
, and by the National Science Foundation, through the&nbsp;
102+
</span>
103+
<a href='https://www.lsst.org/' target='rubin-window'>Vera C. Rubin Observatory</a>
104+
<span>
105+
. Firefly is open-source software, available on&nbsp;
106+
</span>
107+
<a href='https://github.com/Caltech-IPAC/firefly' target='github-window'>GitHub</a>
108+
<span> and </span>
109+
<a href='https://hub.docker.com/repository/docker/ipac/firefly' target='dockerhub-window'>DockerHub</a>
110+
<span>.</span>
111+
</div>
112+
113+
);
114+
115+
116+
117+
export const showFullVersionInfoDialog = (title = '') => showInfoPopup( <VersionInfoFull/>, `${title} Version Information`, true, {maxWidth:620});

0 commit comments

Comments
 (0)