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

Update design elements #1248

Merged
merged 49 commits into from
Sep 2, 2020
Merged

Update design elements #1248

merged 49 commits into from
Sep 2, 2020

Conversation

nicolasmartinrojo
Copy link
Contributor

No description provided.


return FieldListItem;
};
export function FieldListItemFactoryFactory(FieldToken) {
Copy link
Contributor

Choose a reason for hiding this comment

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

FieldListItemFactoryFactory -> FieldListItemFactory?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the previous component had already "Factory" in its name, but wasn't a kepler factory

@@ -48,6 +49,17 @@ const StyledSliderHandle = styled.span`
background-color: ${props => props.theme.sliderHandleHoverColor};
cursor: pointer;
}

////
Copy link
Contributor

Choose a reason for hiding this comment

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

delete?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

deleted

}
};

// NewFilterPanelFactory.deps = [
Copy link
Contributor

Choose a reason for hiding this comment

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

this shouldn't be comment out

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sorry, my mistake. fixed

@@ -124,13 +124,13 @@ export {default as CloudTile} from './modals/cloud-tile';
export {default as FileUploadFactory, FileUpload} from './common/file-uploader/file-upload';
export {default as DatasetLabel} from './common/dataset-label';
export {default as ItemSelector} from './common/item-selector/item-selector';
export {default as FieldSelector} from './common/field-selector';
Copy link
Contributor

Choose a reason for hiding this comment

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

this will break the app that is importing FieldSelector
take a look at how TimeRangeSliderFactory and TimeRangeSlider are exported and do this same

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed. nice catch, feel free to take a look

export {default as Modal, ModalFooter, ModalTitle} from './common/modal';
export {default as AppLogo} from './common/logo';
export {default as Switch} from './common/switch';
export {default as LoadingSpinner} from './common/loading-spinner';
export {default as LoadingDialog} from './modals/loading-dialog';
export {default as FieldToken} from './common/field-token';
Copy link
Contributor

Choose a reason for hiding this comment

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

same for this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same, fixed

@@ -181,6 +180,8 @@ function TooltipConfigFactory(DatasetTag) {
}

return injectIntl(TooltipConfig);
}
// return TooltipConfig;
Copy link
Contributor

Choose a reason for hiding this comment

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

delete?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

text-align: center;
width: 40px;
`;
const ORANGE = '248, 194, 28';
Copy link
Contributor

Choose a reason for hiding this comment

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

why do you move these constant out from default-settings and into field-token.js ? You don't need to move them into the factory if they are not depends on any deps of factory

Copy link
Contributor Author

Choose a reason for hiding this comment

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

these contants are being using just on the field-token, for all the other colors we're using the theme. that's why it makes more sense to move them inside the token component

Copy link
Contributor

Choose a reason for hiding this comment

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

no, please leave the constatns in the constants folder, because they might be used by other files in the future

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@@ -199,6 +204,7 @@ export const panelHeaderHeight = 48;
export const panelBoxShadow = '0 6px 12px 0 rgba(0,0,0,0.16)';
export const panelBorderRadius = '2px';
export const panelBackgroundLT = '#F8F8F9';
export const styledLayerConfigGroupLabelLabelFontSize = '12px';
Copy link
Contributor

Choose a reason for hiding this comment

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

remove styled in theme variable name. Also address variables added in you previous PR that has styled

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, just fixed!

NewFilterPanelFactory.deps = [FilterPanelHeaderFactory, SourceDataSelectorFactory];

function NewFilterPanelFactory(FilterPanelHeader, SourceDataSelector) {
const NewFilterPanelFactory = (FilterPanelHeader, SourceDataSelector, FieldSelector) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

make NewFilterPanelFactory a actual function, instead of const ... = () => {} so you won't have errors like xxx is not declared before it is being used, and put the deps definition on top of the function declaration for easy read.

make it

NewFilterPanelFactory.deps = [...];
function NewFilterPanelFactory(...) {
...
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@@ -68,7 +67,7 @@ const CompareSwitchWrapper = styled.div`
margin-bottom: 8px;
`;

function TooltipConfigFactory(DatasetTag) {
const TooltipConfigFactory = (DatasetTag, FieldSelector) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

same here, make it a function instead of const ...
put the deps definition on top of the function declaration for easy read.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

}
return LayerColumnConfig;
};
const ColumnSelectorFactory = FieldSelector => {
Copy link
Contributor

Choose a reason for hiding this comment

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

same here, make it a function instead of const ...
put the deps definition on top of the function declaration for easy read.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@@ -103,9 +102,7 @@ const StyledTitle = styled(CenterFlexbox)`
}
`;

TimeWidgetFactory.deps = [SpeedControlFactory, TimeRangeFilterFactory, FloatingTimeDisplayFactory];

function TimeWidgetFactory(SpeedControl, TimeRangeFilter, FloatingTimeDisplay) {
Copy link
Contributor

Choose a reason for hiding this comment

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

put the deps definition on top of the function declaration for easy read.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

fieldPairs: PropTypes.arrayOf(PropTypes.any),
columnLabels: PropTypes.object
};
const LayerColumnConfigFactory = ColumnSelector => {
Copy link
Contributor

Choose a reason for hiding this comment

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

same here, make it a function instead of const ...
put the deps definition on top of the function declaration for easy read.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

TextLabelPanelFactory.deps = [RangeSliderFactory, LayerConfigGroupFactory];

export default function TextLabelPanelFactory(RangeSlider, LayerConfigGroup) {
const TextLabelPanelFactory = (RangeSlider, LayerConfigGroup, FieldSelector) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

same here, make it a function instead of const ...
put the deps definition on top of the function declaration for easy read.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done


VisConfigByFieldSelectorFacotry.deps = [InfoHelperFacotry];
export default function VisConfigByFieldSelectorFacotry(InfoHelper) {
const VisConfigByFieldSelectorFactory = (InfoHelper, FieldSelector) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

same here, make it a function instead of const ...
put the deps definition on top of the function declaration for easy read.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

export const secondaryInputBgd = '#242730';
export const secondaryInputBgdHover = '#3A414C';
export const secondaryInputBgdActive = '#3A414C';
export const secondaryInputColor = '#A0A7B4';
export const secondaryInputBorderColor = '#242730';
export const secondaryInputBorderActiveColor = '#D3D8E0';
export const dropdownSelectHeight = '30px';
Copy link
Contributor

Choose a reason for hiding this comment

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

make this 30 and in styled componenets use ${props => props.theme. dropdownSelectHeight}px

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@@ -47,6 +47,8 @@ export const titleColorLT = '#29323C';
export const subtextColor = '#6A7485';
export const subtextColorLT = '#A0A7B4';
export const subtextColorActive = '#FFFFFF';
export const subtextBorderColorActive = '#FFFFFF';
export const subtextWidth = '30px';
Copy link
Contributor

Choose a reason for hiding this comment

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

what is it? why is a text need width

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thos belongs to the width of the panel toggles

padding-bottom: 6px;
width: 30px;
width: ${props => props.theme.subtextWidth};
Copy link
Contributor

Choose a reason for hiding this comment

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

should be panelTabWidth?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -1078,14 +1104,21 @@ export const theme = {
sidePanelScrollBarWidth,
sidePanelScrollBarHeight,
sidePanelTitleFontsize,
sidePanelTitleLineHeight,
Copy link
Contributor

Choose a reason for hiding this comment

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

where is this used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch! I forgot to add it, done.

@@ -46,13 +46,14 @@ const PanelTab = styled.div.attrs({
align-items: flex-end;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: ${props => (props.active ? props.theme.subtextColorActive : 'transparent')};
border-bottom-color: ${props =>
props.active ? props.theme.subtextBorderColorActive : 'transparent'};
Copy link
Contributor

Choose a reason for hiding this comment

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

this should be named panelToggleBorderColor

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@@ -258,10 +267,17 @@ export const sliderBarHeight = 4;
export const sliderHandleHeight = 12;
export const sliderHandleWidth = 12;
export const sliderHandleColor = '#D3D8E0';
export const sliderHandleTextColor = 'black';
Copy link
Contributor

Choose a reason for hiding this comment

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

why black it is coming out of nowhere? make it a same as sliderHandleColor since you are not showing anything

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

export const sliderHandleHoverColor = '#FFFFFF';
export const sliderHandleText = '';
Copy link
Contributor

Choose a reason for hiding this comment

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

rename to sliderHandleAfterContent

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@@ -323,6 +339,9 @@ const progressBarTrackColor = '#E8E8E8';
export const actionPanelWidth = 110;
export const actionPanelHeight = 32;

// Styled Token
export const tokenRightMargin = 4;
Copy link
Contributor

Choose a reason for hiding this comment

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

rename to fieldTokenRightMargin

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@@ -24,6 +24,8 @@ import VisConfigSliderFactory from './side-panel/layer-panel/vis-config-slider';
import LayerConfigGroupFactory from './side-panel/layer-panel/layer-config-group';
import {ChannelByValueSelectorFactory} from './side-panel/layer-panel/layer-configurator';
import {appInjector} from './container';
import FieldSelectorFactory from './common/field-selector';
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick, move the import above appInjector

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

nicolasmartinrojo and others added 6 commits August 30, 2020 02:53
Signed-off-by: Nicolas Rojo <nicolas.martin.rojo@gmail.com>
Signed-off-by: Shan He <heshan0131@gmail.com>
Signed-off-by: Nicolas Rojo <nicolas.martin.rojo@gmail.com>
Signed-off-by: Shan He <heshan0131@gmail.com>
Signed-off-by: Nicolas Rojo <nicolas.martin.rojo@gmail.com>
Signed-off-by: Shan He <heshan0131@gmail.com>
Signed-off-by: Nicolas Rojo <nicolas.martin.rojo@gmail.com>
Signed-off-by: Nicolas Rojo <nicolas.martin.rojo@gmail.com>
Signed-off-by: Nicolas Rojo <nicolas.martin.rojo@gmail.com>
nicolasmartinrojo and others added 4 commits September 1, 2020 14:02
Signed-off-by: Nicolas Rojo <nicolas.martin.rojo@gmail.com>
Signed-off-by: Nicolas Rojo <nicolas.martin.rojo@gmail.com>
Signed-off-by: Nicolas Rojo <nicolas.martin.rojo@gmail.com>
Signed-off-by: Shan He <heshan0131@gmail.com>
Signed-off-by: Nicolas Rojo <nicolas.martin.rojo@gmail.com>
nicolasmartinrojo and others added 22 commits September 1, 2020 14:05
Signed-off-by: Nicolas Rojo <nicolas.martin.rojo@gmail.com>
Signed-off-by: Shan He <heshan0131@gmail.com>
Signed-off-by: Nicolas Rojo <nicolas.martin.rojo@gmail.com>
Signed-off-by: Shan He <heshan0131@gmail.com>
Signed-off-by: Nicolas Rojo <nicolas.martin.rojo@gmail.com>
Signed-off-by: Shan He <heshan0131@gmail.com>
Signed-off-by: Nicolas Rojo <nicolas.martin.rojo@gmail.com>
Signed-off-by: Nicolas Rojo <nicolas.martin.rojo@gmail.com>
Signed-off-by: Nicolas Rojo <nicolas.martin.rojo@gmail.com>
Signed-off-by: Nicolas Rojo <nicolas.martin.rojo@gmail.com>
Signed-off-by: Nicolas Rojo <nicolas.martin.rojo@gmail.com>
Signed-off-by: Nicolas Rojo <nicolas.martin.rojo@gmail.com>
Signed-off-by: Nicolas Rojo <nicolas.martin.rojo@gmail.com>
Signed-off-by: Nicolas Rojo <nicolas.martin.rojo@gmail.com>
Signed-off-by: Nicolas Rojo <nicolas.martin.rojo@gmail.com>
Signed-off-by: Shan He <heshan0131@gmail.com>
Signed-off-by: Nicolas Rojo <nicolas.martin.rojo@gmail.com>
Signed-off-by: Shan He <heshan0131@gmail.com>
Signed-off-by: Shan He <heshan0131@gmail.com>
Signed-off-by: Shan He <heshan0131@gmail.com>
Signed-off-by: Shan He <heshan0131@gmail.com>
Signed-off-by: Shan He <heshan0131@gmail.com>
@heshan0131 heshan0131 merged commit d677c18 into master Sep 2, 2020
@delete-merged-branch delete-merged-branch bot deleted the feature/panelStyle branch September 2, 2020 18:09
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