Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.
Introduce new fsq studio section in home page (#2308)
Giuseppe Macrì8bb0d46953bb
diff --git a/src/components/src/common/data-table/grid.tsx b/src/components/src/common/data-table/grid.tsxindex 43d391186..8c05edc34 100644--- a/src/components/src/common/data-table/grid.tsx+++ b/src/components/src/common/data-table/grid.tsx@@ -42,7 +42,7 @@ export default class GridHack extends PureComponent<GridProps> {}componentWillUnmount() {- //@ts-expect-error _scrollingContainer not typed in Grid+ // @ts-expect-error _scrollingContainer not typed in Gridthis.grid?._scrollingContainer?.removeEventListener('wheel', this._preventScrollBack, {passive: false});@@ -67,7 +67,7 @@ export default class GridHack extends PureComponent<GridProps> {* This hack exists because we need to add wheel event listener to the div rendered by Grid**/- //@ts-expect-error _scrollingContainer not typed in Grid+ // @ts-expect-error _scrollingContainer not typed in Gridthis.grid?._scrollingContainer?.addEventListener('wheel', this._preventScrollBack, {passive: false});diff --git a/src/components/src/common/data-table/index.tsx b/src/components/src/common/data-table/index.tsxindex 6b1499db3..1c0396f32 100644--- a/src/components/src/common/data-table/index.tsx+++ b/src/components/src/common/data-table/index.tsx@@ -222,7 +222,7 @@ const getRowCell = (const rowIdx = sortOrder && sortOrder.length ? get(sortOrder, rowIndex) : rowIndex;const {type} = colMeta[column];- let value = dataContainer.valueAt(rowIdx, columns.indexOf(column));+ const value = dataContainer.valueAt(rowIdx, columns.indexOf(column));return value === null || value === undefined || value === ''? '': formatterdiff --git a/src/components/src/common/item-selector/item-selector.tsx b/src/components/src/common/item-selector/item-selector.tsxindex 55471dfc5..32642c87c 100644--- a/src/components/src/common/item-selector/item-selector.tsx+++ b/src/components/src/common/item-selector/item-selector.tsx@@ -324,7 +324,7 @@ class ItemSelectorUnmemoized extends Component<ItemSelectorProps> {active: this.state.showTypeahead}),displayOption,- disabled: disabled,+ disabled,onClick: this._showTypeahead,error: this.props.isError,inputTheme,diff --git a/src/components/src/map-container.tsx b/src/components/src/map-container.tsxindex 5acad0399..018d3cf7d 100644--- a/src/components/src/map-container.tsx+++ b/src/components/src/map-container.tsx@@ -516,7 +516,7 @@ export default function MapContainerFactory(_onDeckError = (error, layer) => {const errorMessage = error?.message || 'unknown-error';const layerMessage = layer?.id ? ` in ${layer.id} layer` : '';- let errorMessageFull =+ const errorMessageFull =errorMessage === 'WebGL context is lost'? 'Your GPU was disconnected. This can happen if your computer goes to sleep. It can also occur for other reasons, such as if you are running too many GPU applications.': `An error in deck.gl: ${errorMessage}${layerMessage}.`;diff --git a/test/browser/components/map/map-control-test.js b/test/browser/components/map/map-control-test.jsindex fdb58b77d..e40f93c24 100644--- a/test/browser/components/map/map-control-test.js+++ b/test/browser/components/map/map-control-test.js@@ -122,7 +122,7 @@ test('MapControlFactory - click options', t => {toggleMapControl: onToggleMapControl,setLocale: onSetLocale};- let updateState = keplerGlReducerCore(StateWSplitMaps, toggleMapControl('mapLegend', 0));+ const updateState = keplerGlReducerCore(StateWSplitMaps, toggleMapControl('mapLegend', 0));const mapContainerProps = mapFieldsSelector(mockKeplerPropsWithState({state: updateState,diff --git a/test/browser/components/modals/share-map-modal-test.js b/test/browser/components/modals/share-map-modal-test.jsindex 86981cf49..c4b54ce95 100644--- a/test/browser/components/modals/share-map-modal-test.js+++ b/test/browser/components/modals/share-map-modal-test.js@@ -22,12 +22,7 @@ import React from 'react';import test from 'tape';import {IntlWrapper, mountWithTheme} from 'test/helpers/component-utils';import sinon from 'sinon';-import {- ShareMapUrlModalFactory,- SharingUrl,- CloudTile,- StatusPanel-} from '@kepler.gl/components';+import {ShareMapUrlModalFactory, SharingUrl, CloudTile, StatusPanel} from '@kepler.gl/components';const ShareMapUrlModal = ShareMapUrlModalFactory();test('Components -> ShareMapUrlModal.mount', t => {diff --git a/test/browser/components/plot-container-test.js b/test/browser/components/plot-container-test.jsindex d2c66ca48..397debcaf 100644--- a/test/browser/components/plot-container-test.js+++ b/test/browser/components/plot-container-test.js@@ -22,11 +22,7 @@ import React from 'react';import {IntlWrapper, mountWithTheme} from 'test/helpers/component-utils';import test from 'tape';-import {- appInjector,- PlotContainerFactory,- plotContainerSelector-} from '@kepler.gl/components';+import {appInjector, PlotContainerFactory, plotContainerSelector} from '@kepler.gl/components';import {mockKeplerProps} from '../../helpers/mock-state';const PlotContainer = appInjector.get(PlotContainerFactory);diff --git a/test/browser/layer-tests/geojson-layer-specs.js b/test/browser/layer-tests/geojson-layer-specs.jsindex 171f9c2b8..e6f3a19f4 100644--- a/test/browser/layer-tests/geojson-layer-specs.js+++ b/test/browser/layer-tests/geojson-layer-specs.js@@ -19,12 +19,7 @@// THE SOFTWARE.import test from 'tape';-import {- defaultElevation,- defaultLineWidth,- defaultRadius,- KeplerGlLayers-} from '@kepler.gl/layers';+import {defaultElevation, defaultLineWidth, defaultRadius, KeplerGlLayers} from '@kepler.gl/layers';import {copyTableAndUpdate, createNewDataEntry} from '@kepler.gl/table';const {GeojsonLayer} = KeplerGlLayers;diff --git a/test/node/utils/editor-utils-test.js b/test/node/utils/editor-utils-test.jsindex c40d9a0fb..dd20c3caa 100644--- a/test/node/utils/editor-utils-test.js+++ b/test/node/utils/editor-utils-test.js@@ -24,10 +24,7 @@ import {EditableGeoJsonLayer} from '@nebula.gl/layers';import {INITIAL_VIS_STATE} from '@kepler.gl/reducers';import {VisStateActions} from '@kepler.gl/actions';import {EDITOR_LAYER_ID, EDITOR_MODES} from '@kepler.gl/constants';-import {- EditorLayerUtils,- getEditorLayer-} from '@kepler.gl/layers';+import {EditorLayerUtils, getEditorLayer} from '@kepler.gl/layers';test('editorLayerUtils -> isDrawingActive', t => {t.equal(@@ -54,7 +51,11 @@ test('editorLayerUtils -> getCursor', t => {editorMenuActive: true,editor};- t.equal(EditorLayerUtils.getCursor(mockSettings), 'crosshair', 'Should return crosshair for active drawing mode');+ t.equal(+ EditorLayerUtils.getCursor(mockSettings),+ 'crosshair',+ 'Should return crosshair for active drawing mode'+ );mockSettings.editorMenuActive = false;t.equal(@@ -214,20 +215,35 @@ test('editorLayerUtils -> onClick', t => {const {onLayerClick, setSelectedFeature} = VisStateActions;t.equal(- EditorLayerUtils.onClick(info, event, {editor, editorMenuActive: true, onLayerClick, setSelectedFeature}),+ EditorLayerUtils.onClick(info, event, {+ editor,+ editorMenuActive: true,+ onLayerClick,+ setSelectedFeature+ }),true,'Should return true - onClick is handled as drawing is active');t.equal(- EditorLayerUtils.onClick(info, event, {editor, editorMenuActive: false, onLayerClick, setSelectedFeature}),+ EditorLayerUtils.onClick(info, event, {+ editor,+ editorMenuActive: false,+ onLayerClick,+ setSelectedFeature+ }),false,"Should return false - onClick isn't handled");info.layer.id = EDITOR_LAYER_ID;t.equal(- EditorLayerUtils.onClick(info, event, {editor, editorMenuActive: false, onLayerClick, setSelectedFeature}),+ EditorLayerUtils.onClick(info, event, {+ editor,+ editorMenuActive: false,+ onLayerClick,+ setSelectedFeature+ }),true,'Should return true - onClick is handled');diff --git a/website/src/components/common/section.js b/website/src/components/common/section.jsindex 7f50cc908..847f7a882 100644--- a/website/src/components/common/section.js+++ b/website/src/components/common/section.js@@ -41,7 +41,7 @@ export const SectionContainer = styled.div`? `url(${props.background})`: 'white'};padding: ${props => props.theme.margins.huge};- margin-bottom: ${props => props.theme.margins.large};+ // margin-bottom: ${props => props.theme.margins.large};background-size: cover;${media.portable`@@ -57,6 +57,7 @@ export const SectionHeader = styled.div`display: flex;flex-direction: column;align-items: center;+ gap: 40px;`;export const SectionTitle = styled.div`@@ -69,7 +70,7 @@ export const SectionTitle = styled.div`export const SectionDescription = styled.div`font-size: 20px;- max-width: 500px;+ max-width: 700px;${media.palm`font-size: 16px;`};diff --git a/website/src/components/common/swipeable.js b/website/src/components/common/swipeable.jsindex 6cfa40357..f39abb354 100644--- a/website/src/components/common/swipeable.js+++ b/website/src/components/common/swipeable.js@@ -22,6 +22,12 @@ import React, {PureComponent} from 'react';import styled from 'styled-components';import SwipeableViews from 'react-swipeable-views';+const Container = styled.div`+ display: flex;+ flex-direction: column;+ gap: 72px;+`;+const PaginationContainer = styled.div`display: flex;justify-content: center;@@ -58,12 +64,14 @@ export default class Swipeable extends PureComponent {render() {const {children, onChange, selectedIndex} = this.props;return (- <div>+ <Container><SwipeableViews enableMouseEvents index={selectedIndex} onChange={onChange}>{children}</SwipeableViews>- <Pagination items={children} selectedIndex={selectedIndex} onChange={onChange} />- </div>+ <div>+ <Pagination items={children} selectedIndex={selectedIndex} onChange={onChange} />+ </div>+ </Container>);}}diff --git a/website/src/components/footer.js b/website/src/components/footer.jsindex ceaa6784b..4fb0ec7ba 100644--- a/website/src/components/footer.js+++ b/website/src/components/footer.js@@ -27,6 +27,7 @@ import {LinkButton} from './common/styled-components';import {media} from '../styles';import MapboxLogo from './mapbox-logo';import NetlifyLogo from './netlify-logo';+import FoursquareLogo from './foursquare-logo';import {DEMO_LINK} from '../constants';const Container = styled.div`@@ -49,9 +50,8 @@ const BrandingContainer = styled.div`margin-top: ${props => props.theme.margins.small};`};- display: grid;- grid-template-columns: repeat(4, auto);- column-gap: 20px;+ display: flex;+ gap: 20px;align-items: center;`;@@ -139,6 +139,8 @@ const SocialContainer = styled.div``};`;+const GITHUB_BUTTON_STYLE = {marginLeft: '5px'};+export default class Footer extends PureComponent {render() {return (@@ -149,6 +151,7 @@ export default class Footer extends PureComponent {<img src={cdnUrl('icons/uber.svg')} /><MapboxLogo /><NetlifyLogo />+ <FoursquareLogo /><CreatedBy>created by<StyledLogo className="fg">@@ -168,7 +171,7 @@ export default class Footer extends PureComponent {largeoutlineDarkhref="https://github.com/keplergl/kepler.gl"- style={{marginLeft: '5px'}}+ style={GITHUB_BUTTON_STYLE}><img src={cdnUrl('icons/github.svg')} /> Github</LinkButton>diff --git a/website/src/components/foursquare-logo.js b/website/src/components/foursquare-logo.jsnew file mode 100644index 000000000..966246941--- /dev/null+++ b/website/src/components/foursquare-logo.js@@ -0,0 +1,63 @@+import React from 'react';+import {LOCATION_FOURSQUARE_LINK} from '../components/studio';++const LINK_STYLE = {display: 'flex'};+const FoursquareLogo = () => (+ <a href={LOCATION_FOURSQUARE_LINK} style={LINK_STYLE}>+ <svg+ width="217"+ height="15"+ viewBox="0 0 217 15"+ fill="none"+ xmlns="http://www.w3.org/2000/svg"+ >+ <path+ d="M92.8254 0.308594H102.114V1.83821H94.4375V5.82352H101.252V7.35314H94.4375V13.2253H92.8254V0.308594Z"+ fill="white"+ />+ <path+ d="M103.016 6.81562C103.016 2.98639 105.635 0 109.653 0C113.652 0 116.235 3.00373 116.235 6.81562C116.235 10.6969 113.507 13.548 109.653 13.548C105.777 13.548 103.016 10.6969 103.016 6.81562ZM114.511 6.79828C114.511 3.81189 112.609 1.54349 109.649 1.54349C106.689 1.54349 104.769 3.80842 104.769 6.79828C104.769 9.85404 106.831 12.0184 109.649 12.0184C112.45 12.0184 114.511 9.87138 114.511 6.79828Z"+ fill="white"+ />+ <path+ d="M118.206 8.34513V0.308594H119.836V8.34513C119.836 10.7488 121.108 12.0009 123.405 12.0009C125.756 12.0009 127.064 10.7661 127.064 8.36247V0.308594H128.694V8.36247C128.694 11.7096 126.687 13.5479 123.405 13.5479C120.144 13.5479 118.206 11.7443 118.206 8.34513Z"+ fill="white"+ />+ <path+ d="M131.27 0.308594H136.867C139.468 0.308594 141.189 1.86942 141.189 4.01643C141.189 5.47667 140.381 6.65943 138.877 7.24561C140.598 8.20639 140.008 10.4054 141.533 13.2219H139.703C138.646 11.3003 138.877 7.65836 136.439 7.65836H132.889V13.2219H131.277V0.308594H131.27ZM136.831 6.12875C138.428 6.12875 139.537 5.23734 139.537 3.94706C139.537 2.67759 138.479 1.83474 136.831 1.83474H132.885V6.12875H136.831Z"+ fill="white"+ />+ <path+ d="M142.928 9.52799L144.543 9.2193C144.866 11.0576 146.087 12.001 148.112 12.001C150.068 12.001 151.43 11.1096 151.43 9.83669C151.43 8.71983 150.372 7.94635 147.789 7.22837C144.652 6.36818 143.304 5.09871 143.304 3.31243C143.304 1.26947 145.061 0 147.876 0C150.619 0 152.271 1.20357 152.825 3.50319L151.158 3.84658C150.8 2.29962 149.724 1.52961 147.84 1.52961C146.083 1.52961 144.989 2.18169 144.989 3.29855C144.989 4.3287 145.902 5.03281 148.467 5.78894C151.84 6.76706 153.093 8.03654 153.093 9.84016C153.093 12.0912 151.173 13.548 148.195 13.548C145.217 13.548 143.377 12.1398 142.928 9.52799Z"+ fill="white"+ />+ <path+ d="M154.51 6.81562C154.51 2.98639 157.129 0 161.146 0C165.146 0 167.729 3.00373 167.729 6.81562C167.729 8.70596 167.084 10.3535 165.972 11.5363C166.512 12.0496 167.03 12.5664 167.533 13.0971L166.385 14.1793C165.863 13.6486 165.309 13.0971 164.751 12.5491C163.729 13.1838 162.509 13.5445 161.146 13.5445C157.274 13.548 154.51 10.6969 154.51 6.81562ZM163.53 11.4183C162.99 10.9362 162.472 10.4576 161.933 10.0101L163.063 8.92794C163.635 9.41007 164.211 9.90606 164.766 10.4055C165.537 9.49678 166.004 8.25852 166.004 6.79828C166.004 3.81189 164.103 1.54349 161.143 1.54349C158.183 1.54349 156.263 3.80842 156.263 6.79828C156.263 9.85404 158.324 12.0184 161.143 12.0184C162.027 12.0184 162.831 11.8137 163.53 11.4183Z"+ fill="white"+ />+ <path+ d="M169.776 8.34513V0.308594H171.406V8.34513C171.406 10.7488 172.678 12.0009 174.974 12.0009C177.326 12.0009 178.633 10.7661 178.633 8.36247V0.308594H180.264V8.36247C180.264 11.7096 178.257 13.5479 174.974 13.5479C171.71 13.5479 169.776 11.7443 169.776 8.34513Z"+ fill="white"+ />+ <path+ d="M186.317 0.308594H188.219L193.457 13.2219H191.737L190.23 9.49667H184.292L182.803 13.2219H181.046L186.317 0.308594ZM189.581 7.9844L187.284 2.18159L184.933 7.9844H189.581Z"+ fill="white"+ />+ <path+ d="M194.899 0.308594H200.496C203.098 0.308594 204.818 1.86942 204.818 4.01643C204.818 5.47667 204.011 6.65943 202.507 7.24561C204.228 8.20639 203.637 10.4054 205.163 13.2219H203.333C202.275 11.3003 202.507 7.65836 200.069 7.65836H196.519V13.2219H194.907V0.308594H194.899ZM200.457 6.12875C202.054 6.12875 203.163 5.23734 203.163 3.94706C203.163 2.67759 202.105 1.83474 200.457 1.83474H196.511V6.12875H200.457Z"+ fill="white"+ />+ <path+ d="M207.173 0.308594H216.57V1.83821H208.789V5.82352H215.98V7.35314H208.789V11.6784H216.733V13.2253H207.173V0.308594Z"+ fill="white"+ />+ <path+ d="M2.9395 11V4.444H3.7205L3.8415 5.148H3.8745C4.2485 4.642 4.8645 4.345 5.6235 4.345C6.4925 4.345 7.0755 4.719 7.3615 5.357H7.3945C7.7135 4.708 8.3845 4.345 9.2755 4.345C10.4965 4.345 11.3765 5.038 11.3765 6.633V11H10.3425V6.644C10.3425 5.709 9.8255 5.28 8.9785 5.28C8.2745 5.28 7.6805 5.698 7.6805 6.523V11H6.6465V6.523C6.6465 5.621 6.0855 5.28 5.3485 5.28C4.8095 5.28 4.2375 5.566 3.9735 6.017V11H2.9395ZM17.2398 10.175L17.2068 10.164C16.8438 10.736 16.1068 11.11 15.1828 11.11C13.9068 11.11 13.0928 10.472 13.0928 9.009C13.0928 7.777 13.8848 7.018 15.5238 7.018C16.1508 7.018 16.7008 7.128 17.0968 7.271V6.622C17.0968 5.577 16.6458 5.214 15.5018 5.214C14.7318 5.214 14.1598 5.379 13.5768 5.665L13.4778 4.763C14.1048 4.477 14.8198 4.323 15.6778 4.323C17.4708 4.323 18.1198 5.038 18.1198 6.776V11H17.3388L17.2398 10.175ZM17.0968 8.008C16.9318 7.909 16.4368 7.766 15.6998 7.766C14.5448 7.766 14.0718 8.206 14.0718 8.998C14.0718 9.944 14.6218 10.252 15.4688 10.252C16.3598 10.252 17.0968 9.713 17.0968 9.152V8.008ZM21.4767 2.464C21.4767 2.86 21.2457 3.047 20.7837 3.047C20.3327 3.047 20.0907 2.904 20.0907 2.464C20.0907 2.079 20.3327 1.859 20.7837 1.859C21.2457 1.859 21.4767 2.068 21.4767 2.464ZM20.2667 11V4.477L21.3007 4.422V11H20.2667ZM23.4141 11V4.444H24.1951L24.3051 5.214H24.3271C24.7561 4.686 25.3721 4.334 26.2851 4.334C27.6821 4.334 28.5181 5.06 28.5181 6.545V11H27.4841V6.666C27.4841 5.698 26.9891 5.258 26.0761 5.258C25.3501 5.258 24.7671 5.588 24.4481 6.061V11H23.4141ZM32.5916 11.11C31.3376 11.11 30.8646 10.527 30.8646 9.306V5.236H29.7536V4.444H30.8646L31.0296 2.431H31.9096V4.444H33.8456V5.236H31.9096V9.108C31.9096 9.955 32.1736 10.241 32.8446 10.241C33.2626 10.241 33.6586 10.142 33.8566 10.054V10.879C33.6366 10.978 33.1966 11.11 32.5916 11.11ZM39.0035 10.175L38.9705 10.164C38.6075 10.736 37.8705 11.11 36.9465 11.11C35.6705 11.11 34.8565 10.472 34.8565 9.009C34.8565 7.777 35.6485 7.018 37.2875 7.018C37.9145 7.018 38.4645 7.128 38.8605 7.271V6.622C38.8605 5.577 38.4095 5.214 37.2655 5.214C36.4955 5.214 35.9235 5.379 35.3405 5.665L35.2415 4.763C35.8685 4.477 36.5835 4.323 37.4415 4.323C39.2345 4.323 39.8835 5.038 39.8835 6.776V11H39.1025L39.0035 10.175ZM38.8605 8.008C38.6955 7.909 38.2005 7.766 37.4635 7.766C36.3085 7.766 35.8355 8.206 35.8355 8.998C35.8355 9.944 36.3855 10.252 37.2325 10.252C38.1235 10.252 38.8605 9.713 38.8605 9.152V8.008ZM43.2403 2.464C43.2403 2.86 43.0093 3.047 42.5473 3.047C42.0963 3.047 41.8543 2.904 41.8543 2.464C41.8543 2.079 42.0963 1.859 42.5473 1.859C43.0093 1.859 43.2403 2.068 43.2403 2.464ZM42.0303 11V4.477L43.0643 4.422V11H42.0303ZM45.1778 11V4.444H45.9588L46.0688 5.214H46.0908C46.5198 4.686 47.1358 4.334 48.0488 4.334C49.4458 4.334 50.2818 5.06 50.2818 6.545V11H49.2478V6.666C49.2478 5.698 48.7528 5.258 47.8398 5.258C47.1138 5.258 46.5308 5.588 46.2118 6.061V11H45.1778ZM54.9823 11.121C52.8703 11.121 52.0013 9.955 52.0013 7.623C52.0013 5.478 53.0243 4.334 54.8503 4.334C56.4893 4.334 57.3583 5.258 57.3583 7.348C57.3583 7.59 57.3583 7.799 57.3363 7.975H53.0793C53.0903 9.537 53.7283 10.197 55.0593 10.197C55.7853 10.197 56.4783 10.021 57.0283 9.768L57.1273 10.659C56.5773 10.934 55.8183 11.121 54.9823 11.121ZM56.3463 7.117C56.3463 5.698 55.7963 5.181 54.8283 5.181C53.7283 5.181 53.1343 5.797 53.0683 7.117H56.3463ZM63.3459 11L63.2249 10.296L63.1919 10.285C62.7849 10.835 62.1469 11.132 61.2559 11.132C59.4849 11.132 58.7259 10.054 58.7259 7.711C58.7259 5.5 59.5069 4.334 61.2559 4.334C61.9929 4.334 62.6639 4.587 63.1149 5.104L63.1369 5.082L63.1149 4.202V1.76L64.1489 1.694V11H63.3459ZM63.1149 6.028C62.8289 5.577 62.2569 5.28 61.5419 5.28C60.2659 5.28 59.8039 5.973 59.8039 7.755C59.8039 9.592 60.2219 10.274 61.5309 10.274C62.4549 10.274 62.9169 9.834 63.1149 9.471V6.028ZM74.5126 7.711C74.5126 10.175 73.5556 11.132 71.9056 11.132C71.0916 11.132 70.3986 10.824 69.9806 10.307H69.9476L69.7936 11H69.1006V1.76L70.1346 1.694V4.191L70.1126 5.071L70.1456 5.093C70.6076 4.587 71.2786 4.334 72.0266 4.334C73.5446 4.334 74.5126 5.225 74.5126 7.711ZM73.4566 7.733C73.4566 5.731 72.8296 5.258 71.7406 5.258C71.0476 5.258 70.4646 5.555 70.1346 6.039V9.471C70.3986 9.9 70.9486 10.274 71.7516 10.274C72.7746 10.274 73.4566 9.779 73.4566 7.733ZM76.5627 12.43C77.2227 12.43 77.6187 12.045 77.8827 11.363L78.0477 10.923L75.3637 4.444H76.5627L78.2677 9.009L78.5427 9.845H78.5757L78.8507 8.987L80.5557 4.444H81.6667L78.9277 11.385C78.4877 12.507 77.9487 13.31 76.6177 13.31C76.1667 13.31 75.8587 13.233 75.6277 13.145V12.232C75.8587 12.342 76.1557 12.43 76.5627 12.43Z"+ fill="white"+ fillOpacity="0.7"+ />+ </svg>+ </a>+);++export default FoursquareLogo;diff --git a/website/src/components/home.js b/website/src/components/home.jsindex 9eae8ab9f..c364c4812 100644--- a/website/src/components/home.js+++ b/website/src/components/home.js@@ -31,6 +31,7 @@ import Tutorials from './tutorials';import Walkthrough from './walkthrough';import Features from './features';import Ecosystems from './ecosystems';+import Studio from './studio';import Footer from './footer';import Section from './common/section';import Header from './header';@@ -47,7 +48,8 @@ const SECTION_CONTENT = {features: Features,examples: Examples,tutorials: Tutorials,- ecosystems: Ecosystems+ ecosystems: Ecosystems,+ studio: Studio};export default class Home extends PureComponent {diff --git a/website/src/components/mapbox-logo.js b/website/src/components/mapbox-logo.jsindex 2fe420c51..f7f4338cc 100644--- a/website/src/components/mapbox-logo.js+++ b/website/src/components/mapbox-logo.js@@ -25,7 +25,7 @@ const MapboxLogo = styled.a`background-size: 99px 28px;background-repeat: no-repeat;width: 100px;- display: inline-block;+ display: flex;height: 28px;flex-shrink: 0;`;diff --git a/website/src/components/netlify-logo.js b/website/src/components/netlify-logo.jsindex f5652932d..19db09faa 100644--- a/website/src/components/netlify-logo.js+++ b/website/src/components/netlify-logo.js@@ -20,8 +20,10 @@import React from 'react';+const LINK_STYLE = {display: 'flex'};+const NetlifyLogo = () => (- <a href="https://www.netlify.com">+ <a href="https://www.netlify.com" style={LINK_STYLE}><svg width="114" height="51"><gxmlns="http://www.w3.org/2000/svg"diff --git a/website/src/components/studio.js b/website/src/components/studio.jsnew file mode 100644index 000000000..c9b3f36bd--- /dev/null+++ b/website/src/components/studio.js@@ -0,0 +1,248 @@+// Copyright (c) 2023 Uber Technologies, Inc.+//+// Permission is hereby granted, free of charge, to any person obtaining a copy+// of this software and associated documentation files (the "Software"), to deal+// in the Software without restriction, including without limitation the rights+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell+// copies of the Software, and to permit persons to whom the Software is+// furnished to do so, subject to the following conditions:+//+// The above copyright notice and this permission notice shall be included in+// all copies or substantial portions of the Software.+//+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN+// THE SOFTWARE.++import React, {useCallback, useState} from 'react';+import styled from 'styled-components';+import Swipeable from './common/swipeable';+import {fsqStudioUrl} from '../utils';+import {LinkButton} from './common/styled-components';++export const LOCATION_FOURSQUARE_LINK =+ 'https://location.foursquare.com/products/studio/keplergl-vs-studio';++const getFSQLink = utmCampaign =>+ `${LOCATION_FOURSQUARE_LINK}?utm_source=Kepler&&utm_medium=partner_site&utm_campaign=${utmCampaign}`;++const LEARN_MORE_LINK = getFSQLink('studio_signup');++const SECTIONS = [+ [+ {+ imageUrl: fsqStudioUrl('screenshots/Flow_layer.png'),+ icon: fsqStudioUrl('logos/Flow_layer.png'),+ title: 'Flow layer',+ description: 'Visualize origin-destination movement patterns',+ link: getFSQLink('Keplermap1_Flow_layer')+ },+ {+ imageUrl: fsqStudioUrl('screenshots/3D_tiles.png'),+ icon: fsqStudioUrl('logos/3D_tiles.png'),+ title: '3D tiles',+ description: 'Stream and render massive 3D geospatial datasets',+ link: getFSQLink('Keplermap2_3D_tiles')+ },+ {+ imageUrl: fsqStudioUrl('screenshots/Analytics_modules.png'),+ icon: fsqStudioUrl('logos/Analytics_modules.png'),+ title: 'Analytics modules',+ description: 'Expedite spatial data analysis to extract valuable information',+ link: getFSQLink('Keplermap3_Analytics_modules')+ }+ ],+ [+ {+ imageUrl: fsqStudioUrl('screenshots/Charts.png'),+ icon: fsqStudioUrl('logos/Charts.png'),+ title: 'Charts',+ description: 'Add statistics and charts to maps including tooltip, bar and line charts',+ link: getFSQLink('Keplermap4_Charts')+ },+ {+ imageUrl: fsqStudioUrl('screenshots/Administrative_boundaries.png'),+ icon: fsqStudioUrl('logos/Administrative_boundaries.png'),+ title: 'Administrative boundaries',+ description: 'Generate the boundary from columns containing administrative identifiers',+ link: getFSQLink('Keplermap5_Adnministrative_boundaries')+ },+ {+ imageUrl: fsqStudioUrl('screenshots/Host_published_maps.png'),+ icon: fsqStudioUrl('logos/Host_published_maps.png'),+ title: 'Host published maps',+ description: 'Host published maps that can be shared with a link',+ link: getFSQLink('Keplermap6_Host_published_maps')+ }+ ],+ [+ {+ imageUrl: fsqStudioUrl('screenshots/Fleet_Visualization.png'),+ icon: fsqStudioUrl('logos/Fleet_Visualization.png'),+ title: 'Fleet Visualization',+ description: 'Playback and study of the movement of entire fleets',+ link: getFSQLink('Keplermap7_Fleet_Visualization')+ },+ {+ imageUrl: fsqStudioUrl('screenshots/Hextile_Analysis.png'),+ icon: fsqStudioUrl('logos/Hextile_Analysis.png'),+ title: 'Hextile Analysis',+ description: 'H3 based tiling system designed for spatial analytics',+ link: getFSQLink('Keplermap8_Hextile_Analysis')+ },+ {+ imageUrl: fsqStudioUrl('screenshots/Tile_Layers.png'),+ icon: fsqStudioUrl('logos/Tile_Layers.png'),+ title: 'Tile Layers',+ description: 'Add layers from Vector tile, Raster tile, and WMS format',+ link: getFSQLink('Keplermap9_Tile_Layers')+ }+ ],+ [+ {+ imageUrl: fsqStudioUrl('screenshots/Dataset_Operation.png'),+ icon: fsqStudioUrl('logos/Dataset_Operation.png'),+ title: 'Dataset Operation',+ description: 'Apply expression, group-by, spatial join operations.',+ link: getFSQLink('Keplermap10_Dataset_Operation')+ },+ {+ imageUrl: fsqStudioUrl('screenshots/Globe.png'),+ icon: fsqStudioUrl('logos/Globe.png'),+ title: 'Globe',+ description: 'A 3D globe view of the Earth for planetary data.',+ link: getFSQLink('Keplermap11_Globe')+ },+ {+ imageUrl: fsqStudioUrl('screenshots/Remote_Sensing.png'),+ icon: fsqStudioUrl('logos/Remote_Sensing.png'),+ title: 'Remote Sensing',+ description: 'Analysis-Ready high bit-depth raster data in your browser',+ link: getFSQLink('Keplermap12_Remote_Sensing')+ }+ ]+];++const Flex = styled.div`+ display: flex;+`;++const StudioContainer = styled(Flex)`+ width: 100%;+ align-items: center;+ flex-direction: column;+ gap: 72px;+`;++const Section = styled(Flex)`+ gap: 56px;+ width: 100%;+ justify-content: center;+ justify-items: center;+ padding-top: 8px;+`;++const MapCardImage = styled.img`+ height: 230px;+ width: 386px;+ box-shadow: 0 12px 24px 0 rgba(0, 0, 0, 0.5);+ transition: transform 350ms;+`;++const MapCard = styled.a`+ display: flex;+ flex-direction: column;+ gap: 56px;+ align-items: center;+ cursor: pointer;+ color: white;++ :visited {+ color: white;+ }++ :hover {+ ${MapCardImage} {+ transform: scale3d(1.05, 1.05, 1.05);+ }+ }+`;++const MapCardBody = styled(Flex)`+ flex-direction: column;+ gap: 16px;+ max-width: 300px;+ align-items: center;+`;++const MapCardIcon = styled.img`+ height: 24px;+ width: 24px;+`;++const MapCardTitle = styled.div`+ font-size: 20px;+ line-height: 28px;+ text-align: center;+`;++const MapCardDescription = styled.div`+ font-size: 16px;+ line-height: 26px;+ text-align: center;+ opacity: 0.7;+`;++const CardSection = ({cards}) => (+ <Section>+ {cards.map(card => (+ <MapCard key={card.imageUrl} href={card.link} target="_blank">+ <MapCardImage src={card.imageUrl} alt={card.title} />+ <MapCardBody>+ <MapCardIcon src={card.icon} alt={card.title} />+ <MapCardTitle>{card.title}</MapCardTitle>+ <MapCardDescription>{card.description}</MapCardDescription>+ </MapCardBody>+ </MapCard>+ ))}+ </Section>+);++const WhiteLinkButton = styled(LinkButton)`+ border-color: white;+ color: white;+ :hover,+ :visited {+ color: white;+ }+`;++const Studio = () => {+ const [selectedIndex, setSelectedIndex] = useState(0);+ const onChange = useCallback(index => {+ setSelectedIndex(index);+ }, []);++ return (+ <StudioContainer>+ <Swipeable+ onChange={onChange}+ selectedIndex={selectedIndex}+ containerStyle={{overflow: 'visible'}}+ >+ {SECTIONS.map((cards, index) => (+ <CardSection key={index} cards={cards} />+ ))}+ </Swipeable>+ <WhiteLinkButton outline large href={LEARN_MORE_LINK} target="_blank">+ Learn More+ </WhiteLinkButton>+ </StudioContainer>+ );+};++export default React.memo(Studio);diff --git a/website/src/content.js b/website/src/content.jsindex a5b23ac33..63b4efdfe 100644--- a/website/src/content.js+++ b/website/src/content.js@@ -41,12 +41,20 @@ export const SECTIONS = [icon: cdnUrl('icons/features.png')},{- id: 'ecosystems',- title: 'Ecosystem',- description: 'A collection of kepler.gl plugins built for common data analytics tools',- icon: fsqCdnUrl('ecosystem.png'),+ id: 'studio',+ title: 'Take The Next Step',+ description: `Built on top of kelper.gl’s framework, Foursquare Studio is a free,+powerful geospatial analytics and visualization tool, with new features and updates released every few weeks.`,+ icon: fsqCdnUrl('fsqlogo.png'),isDark: true},+ // {+ // id: 'ecosystems',+ // title: 'Ecosystem',+ // description: 'A collection of kepler.gl plugins built for common data analytics tools',+ // icon: fsqCdnUrl('ecosystem.png'),+ // isDark: true+ // },{id: 'examples',title: 'See What People Created',diff --git a/website/src/utils.js b/website/src/utils.jsindex a230b2bf9..37d01133f 100644--- a/website/src/utils.js+++ b/website/src/utils.js@@ -26,3 +26,7 @@ export function cdnUrl(path) {export function fsqCdnUrl(path) {return `${KEPLER_FSQ_BUCKET}/${path}`;}++export function fsqStudioUrl(path) {+ return fsqCdnUrl(`studio/${path}`);+}