Skip to content
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

[Chore]: Technical: Isolate components #1967

Merged
merged 11 commits into from Sep 9, 2022

Conversation

dariaterekhova-actionengine
Copy link
Collaborator

No description provided.

import {DEFAULT_TIME_FORMAT} from '@kepler.gl/constants';
import {CenterFlexbox} from 'components/common/styled-components';
import {CenterFlexbox} from '@kepler.gl/constants';
Copy link
Contributor

Choose a reason for hiding this comment

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

styled-componets moved to constants? that seems a little odd

import {FormattedMessage} from '@kepler.gl/localization';
import {Table} from 'components/common/icons';
import {CenterFlexbox, Table} from '@kepler.gl/constants';
Copy link
Contributor

@heshan0131 heshan0131 Sep 4, 2022

Choose a reason for hiding this comment

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

instead of moving CenterFlexbox to constant, can you just copy the implementation here. so we don't need to have layers depends on CenterFlexbox?

Same for Table

@@ -20,7 +20,7 @@

import React from 'react';
import styled from 'styled-components';
import {StyledTable as Table} from 'components/common/styled-components';
import {StyledTable as Table} from '@kepler.gl/constants';
Copy link
Contributor

Choose a reason for hiding this comment

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

looks like the only place StyledTable is used is in screnegraph-layer, you should just move the implementation in here, instead of moving it to constant

@@ -20,7 +20,7 @@

import React, {Component} from 'react';
import PropTypes from 'prop-types';
import Base from 'components/common/icons/base';
import {Base} from '@kepler.gl/constants';
Copy link
Contributor

Choose a reason for hiding this comment

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

can you make a copy of Base and put it inlayers/src/react and keep the Base in components/icons? so that we don't move it to constant?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Base is imported by every other icon. So if we want at less one icon to be in @kepler.gl/constants then we need Base to be there as well

// eslint-disable-next-line prettier/prettier
export type {BaseProps} from './base';
export {default as Upload} from './upload';
export {default as Table} from './table';
Copy link
Contributor

Choose a reason for hiding this comment

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

Move table into @kepler.gl/layers

export {default as Base} from './base';
// eslint-disable-next-line prettier/prettier
export type {BaseProps} from './base';
export {default as Upload} from './upload';
Copy link
Contributor

Choose a reason for hiding this comment

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

Move upload into @kepler.gl/providers

@dariaterekhova-actionengine dariaterekhova-actionengine force-pushed the dt/components_isolation branch 2 times, most recently from eccb928 to 72bba9c Compare September 6, 2022 14:15
Signed-off-by: Daria Terekhova <daria.terekhova@actionengine.com>
Signed-off-by: Daria Terekhova <daria.terekhova@actionengine.com>
Signed-off-by: Daria Terekhova <daria.terekhova@actionengine.com>
Signed-off-by: Daria Terekhova <daria.terekhova@actionengine.com>
Signed-off-by: Daria Terekhova <daria.terekhova@actionengine.com>
Signed-off-by: Daria Terekhova <daria.terekhova@actionengine.com>
Signed-off-by: Daria Terekhova <daria.terekhova@actionengine.com>
Signed-off-by: Daria Terekhova <daria.terekhova@actionengine.com>
Signed-off-by: Daria Terekhova <daria.terekhova@actionengine.com>
import {LayerHoverProp} from '@kepler.gl/reducers';
import {} from '@kepler.gl/constants';
Copy link
Contributor

Choose a reason for hiding this comment

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

remove this line?

@@ -57,7 +57,7 @@ import {
import tripGeojson, {tripDataInfo} from 'test/fixtures/trip-geojson';
import {processCsvData, processGeojson} from '@kepler.gl/processors';
import {MOCK_MAP_STYLE} from './mock-map-styles';
import {getUpdateVisDataPayload} from 'components/geocoder-panel';
import {} from '@kepler.gl/components';
Copy link
Contributor

Choose a reason for hiding this comment

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

delete this line?

Signed-off-by: Daria Terekhova <daria.terekhova@actionengine.com>
Signed-off-by: Daria Terekhova <daria.terekhova@actionengine.com>
@dariaterekhova-actionengine dariaterekhova-actionengine merged commit db39b49 into master Sep 9, 2022
@delete-merged-branch delete-merged-branch bot deleted the dt/components_isolation branch September 9, 2022 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants