-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Conversation
990ab41
to
77648f2
Compare
128d809
to
c11286f
Compare
import {DEFAULT_TIME_FORMAT} from '@kepler.gl/constants'; | ||
import {CenterFlexbox} from 'components/common/styled-components'; | ||
import {CenterFlexbox} from '@kepler.gl/constants'; |
There was a problem hiding this comment.
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'; |
There was a problem hiding this comment.
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'; |
There was a problem hiding this comment.
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'; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
src/constants/src/icons/index.ts
Outdated
// eslint-disable-next-line prettier/prettier | ||
export type {BaseProps} from './base'; | ||
export {default as Upload} from './upload'; | ||
export {default as Table} from './table'; |
There was a problem hiding this comment.
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
src/constants/src/icons/index.ts
Outdated
export {default as Base} from './base'; | ||
// eslint-disable-next-line prettier/prettier | ||
export type {BaseProps} from './base'; | ||
export {default as Upload} from './upload'; |
There was a problem hiding this comment.
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
eccb928
to
72bba9c
Compare
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>
72bba9c
to
a8d161a
Compare
import {LayerHoverProp} from '@kepler.gl/reducers'; | ||
import {} from '@kepler.gl/constants'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this line?
test/helpers/mock-state.js
Outdated
@@ -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'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete this line?
a8d161a
to
d9af40d
Compare
Signed-off-by: Daria Terekhova <daria.terekhova@actionengine.com>
d9af40d
to
5f70170
Compare
No description provided.