Skip to content

Commit f060aa6

Browse files
committed
DM-6500: changes in response to reviews
set min-width replaced with an IRSA's icon fix xyplot and image overlay on table sort.
1 parent 9b295ec commit f060aa6

File tree

7 files changed

+29
-28
lines changed

7 files changed

+29
-28
lines changed

src/firefly/js/core/FireflyViewer.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,15 @@ export class FireflyViewer extends Component {
8181

8282
render() {
8383
var {isReady, menu={}, appTitle, appIcon, altAppIcon, dropDown,
84-
searchPanels, views, footer} = this.state;
84+
searchPanels, views, footer, style} = this.state;
8585
const {visible, view} = dropDown || {};
8686
const searches = getDropDownNames();
8787

8888
if (!isReady || !this.mounted) {
8989
return (<div style={{top: 0}} className='loading-mask'/>);
9090
} else {
9191
return (
92-
<div id='App' className='rootStyle'>
92+
<div id='App' className='rootStyle' style={style}>
9393
<header>
9494
<BannerSection {...{menu, appTitle, appIcon, altAppIcon}}/>
9595
<DropDownContainer
@@ -121,7 +121,8 @@ FireflyViewer.propTypes = {
121121
altAppIcon: PropTypes.string,
122122
footer: PropTypes.element,
123123
searchPanels: PropTypes.arrayOf(PropTypes.element),
124-
views: PropTypes.string // combination of LO_VIEW separated by ' | '. ie. 'images | tables'.
124+
views: PropTypes.string, // combination of LO_VIEW separated by ' | '. ie. 'images | tables'.
125+
style: PropTypes.object
125126
};
126127

127128
FireflyViewer.defaultProps = {

src/firefly/js/core/LayoutCntlr.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,10 @@ export function* layoutManager({title, views='tables | images | xyPlots'}) {
133133

134134
while (true) {
135135
const action = yield take([
136-
ImagePlotCntlr.PLOT_IMAGE, ImagePlotCntlr.DELETE_PLOT_VIEW, REPLACE_IMAGES,
137-
TBL_RESULTS_ADDED, TABLE_REMOVE, TABLE_NEW,
138-
SHOW_DROPDOWN, SET_LAYOUT_MODE
139-
]);
136+
REPLACE_IMAGES, ImagePlotCntlr.PLOT_IMAGE, ImagePlotCntlr.DELETE_PLOT_VIEW, ImagePlotCntlr.PLOT_IMAGE_FAIL,
137+
TBL_RESULTS_ADDED, TABLE_REMOVE, TABLE_NEW,
138+
SHOW_DROPDOWN, SET_LAYOUT_MODE
139+
]);
140140

141141
var {hasImages, hasTables, hasXyPlots, mode, ...others} = getLayouInfo();
142142
// eslint-disable-next-line

src/firefly/js/tables/TablesCntlr.js

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,16 @@ export const UI_PREFIX = 'tableUi';
2121

2222
/*---------------------------- ACTIONS -----------------------------*/
2323
export const TABLE_SEARCH = `${DATA_PREFIX}.search`;
24-
export const TABLE_FETCH = `${DATA_PREFIX}.fetch`;
2524
export const TABLE_NEW = `${DATA_PREFIX}.new`;
2625
export const TABLE_NEW_LOADED = `${DATA_PREFIX}.newLoaded`;
27-
export const TABLE_UPDATE = `${DATA_PREFIX}.update`;
28-
export const TABLE_REPLACE = `${DATA_PREFIX}.replace`;
29-
3026
export const TABLE_SORT = `${DATA_PREFIX}.sort`;
31-
export const TABLE_FILTER = `${DATA_PREFIX}.filter`;
3227
export const TABLE_REMOVE = `${DATA_PREFIX}.remove`;
28+
29+
export const TABLE_FETCH = `${DATA_PREFIX}.fetch`;
3330
export const TABLE_SELECT = `${DATA_PREFIX}.select`;
3431
export const TABLE_HIGHLIGHT = `${DATA_PREFIX}.highlight`;
32+
export const TABLE_UPDATE = `${DATA_PREFIX}.update`;
33+
export const TABLE_REPLACE = `${DATA_PREFIX}.replace`;
3534

3635
export const TBL_RESULTS_ADDED = `${RESULTS_PREFIX}.added`;
3736
export const TBL_RESULTS_UPDATE = `${RESULTS_PREFIX}.update`;
@@ -86,16 +85,13 @@ export function tableFetch(action) {
8685
return (dispatch) => {
8786
if (!action.err) {
8887
var {request, hlRowIdx} = action.payload;
89-
var actionType, {tbl_id} = request;
90-
switch (action.type) {
91-
case (TABLE_SORT) :
92-
actionType = TABLE_REPLACE;
93-
break;
94-
95-
case (TABLE_FETCH) :
88+
const {tbl_id} = request;
89+
var actionType = action.type;
90+
if (action.type === TABLE_FETCH) {
9691
actionType = TABLE_NEW;
9792
dispatchAddSaga(doOnTblLoaded, {tbl_id, callback:dispatchTableLoaded});
9893
}
94+
9995
request.startIdx = 0;
10096
dispatch({type: TABLE_REPLACE, payload: {tbl_id, isFetching: true}});
10197
TblUtil.doFetchTable(request, hlRowIdx).then ( (tableModel) => {

src/firefly/js/tables/reducer/TableDataReducer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ export function dataReducer(state={data:{}}, action={}) {
3030
case (Cntlr.TABLE_UPDATE) :
3131
return TblUtil.smartMerge(root, {[tbl_id] : action.payload});
3232

33-
case (Cntlr.TABLE_NEW) :
33+
case (Cntlr.TABLE_NEW) :
34+
case (Cntlr.TABLE_SORT) :
3435
case (Cntlr.TABLE_REPLACE) :
3536
const rowCount = action.payload.totalRows || get(action, 'payload.tableData.data.length', 0);
3637
const nTable = Object.assign({isFetching:false, selectInfo: SelectInfo.newInstance({rowCount}).data},action.payload);

src/firefly/js/tables/reducer/TableUiReducer.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@ export function uiReducer(state={ui:{}}, action={}) {
2424
const {options} = action.payload || {};
2525
return Object.assign(root, {[tbl_ui_id]:{tbl_ui_id, tbl_id, ...options}});
2626

27-
case (Cntlr.TABLE_NEW) :
28-
case (Cntlr.TABLE_UPDATE) :
29-
case (Cntlr.TABLE_REPLACE):
30-
case (Cntlr.TABLE_SELECT) :
31-
case (Cntlr.TABLE_NEW_LOADED) :
27+
case (Cntlr.TABLE_NEW) :
28+
case (Cntlr.TABLE_SORT) :
29+
case (Cntlr.TABLE_UPDATE) :
30+
case (Cntlr.TABLE_REPLACE) :
31+
case (Cntlr.TABLE_SELECT) :
32+
case (Cntlr.TABLE_NEW_LOADED) :
3233
case (Cntlr.TABLE_HIGHLIGHT) :
3334
// state is in-progress(fresh) data.. use it to reduce ui state.
3435
return uiStateReducer(root, get(state, ['data', tbl_id]));

src/firefly/js/visualize/saga/CatalogWatcher.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import {take} from 'redux-saga/effects';
66
import {isEmpty, get} from 'lodash';
7-
import {TABLE_NEW_LOADED,TABLE_SELECT,TABLE_HIGHLIGHT,TABLE_REMOVE,TABLE_UPDATE, TABLE_RESULTS_PATH} from '../../tables/TablesCntlr.js';
7+
import {TABLE_NEW_LOADED,TABLE_SORT, TABLE_SELECT,TABLE_HIGHLIGHT,TABLE_REMOVE,TABLE_UPDATE} from '../../tables/TablesCntlr.js';
88
import {dispatchCreateDrawLayer,dispatchAttachLayerToPlot,dispatchDestroyDrawLayer, dispatchModifyCustomField} from '../DrawLayerCntlr.js';
99
import ImagePlotCntlr, {visRoot} from '../ImagePlotCntlr.js';
1010
import {getTblById, doFetchTable, getTableGroup} from '../../tables/TableUtil.js';
@@ -42,10 +42,11 @@ export function* watchCatalogs() {
4242

4343

4444
while (true) {
45-
const action= yield take([TABLE_NEW_LOADED,TABLE_SELECT,TABLE_HIGHLIGHT, TABLE_UPDATE,
45+
const action= yield take([TABLE_NEW_LOADED, TABLE_SORT, TABLE_SELECT,TABLE_HIGHLIGHT, TABLE_UPDATE,
4646
TABLE_REMOVE, ImagePlotCntlr.PLOT_IMAGE]);
4747
const {tbl_id}= action.payload;
4848
switch (action.type) {
49+
case TABLE_SORT:
4950
case TABLE_NEW_LOADED:
5051
handleCatalogUpdate(tbl_id);
5152
break;

src/firefly/js/visualize/saga/ChartsSync.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function* syncCharts() {
2222
var tableStatsState, xyPlotState, histogramState;
2323

2424
while (true) {
25-
const action= yield take([TableStatsCntlr.SETUP_TBL_TRACKING, TablesCntlr.TABLE_NEW_LOADED]);
25+
const action= yield take([TableStatsCntlr.SETUP_TBL_TRACKING, TablesCntlr.TABLE_NEW_LOADED, TablesCntlr.TABLE_SORT]);
2626
const request= action.payload.request;
2727
switch (action.type) {
2828
case TableStatsCntlr.SETUP_TBL_TRACKING:
@@ -31,6 +31,7 @@ export function* syncCharts() {
3131
TableStatsCntlr.dispatchLoadTblStats(TableUtil.getTblById(tblId)['request']);
3232
}
3333
break;
34+
case TablesCntlr.TABLE_SORT:
3435
case TablesCntlr.TABLE_NEW_LOADED:
3536
const {tbl_id} = action.payload;
3637
tableStatsState = flux.getState()[TableStatsCntlr.TBLSTATS_DATA_KEY];

0 commit comments

Comments
 (0)