Skip to content

DM-11094: use default 'Time Series Tool' title #419

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

Merged
merged 1 commit into from
Jul 26, 2017
Merged
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
10 changes: 4 additions & 6 deletions src/firefly/js/templates/lightcurve/LcViewer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import {getAppOptions} from '../../core/AppDataCntlr.js';
import {HelpText} from './../../ui/HelpText.jsx';

const vFileKey = LC.FG_FILE_FINDER;
const DEFAULT_TITLE = 'Time Series Tool';
/**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought this was set already in the entry point?

Copy link
Contributor Author

@tgoldina tgoldina Jul 21, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was set correctly when appTitle was undefined, but not when it was '', like in SUIT.
I did see defaults.appTitle = 'Time Series Tool' in IrsaViewer.js – if it's not used elsewhere, I would suggest removing it, since it's the default title anyway. @ejoliet what do you think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, i can remove it later.

* This is a light curve viewer.
*/
Expand Down Expand Up @@ -115,12 +116,12 @@ export class LcViewer extends PureComponent {

};

let title = appTitle;
let title = appTitle ? appTitle : DEFAULT_TITLE; // use default title when appTitle is undefined or ''
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or 'title = appTitle || DEFAULT_TITLE;'

if (displayMode && displayMode.startsWith('period')) {
title = appTitle + ': Period Finder';
title += ': Period Finder';

} else if(displayMode && !displayMode.startsWith('period')){
title = appTitle + ': Viewer';
title += ': Viewer';
}
if (!isReady) {
return (<div style={{top: 0}} className='loading-mask'/>);
Expand Down Expand Up @@ -164,9 +165,6 @@ LcViewer.propTypes = {
style: PropTypes.object
};

LcViewer.defaultProps = {
appTitle: 'Time Series Tool'
};

function onReady({menu}) {
if (menu) {
Expand Down