Skip to content

Commit

Permalink
Adapt to carto-lib with workers (#219)
Browse files Browse the repository at this point in the history
* chore: adapt to carto-lib with workers (rc.2)
* chore: remove UserMenuLogin module from skeleton app
* chore: remove unused property from KpiLayer
* chore: remove pending todos
  • Loading branch information
VictorVelarde authored Mar 22, 2021
1 parent f95b40c commit 9bf5782
Show file tree
Hide file tree
Showing 12 changed files with 45 additions and 95 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# CHANGELOG

## Unreleased
- Fix general React warning on SharedArrayBuffer [#218](https://github.com/CartoDB/carto-react-template/pull/218)
- Integrate carto-react lib with workers support [#219](https://github.com/CartoDB/carto-react-template/pull/219)

## 1.0.0-rc.2 (2021-03-12)
- Add improved htmlForFeature in skeleton [#215](https://github.com/CartoDB/carto-react-template/pull/215)
- Fix immutable/serializable checks for redux middleware in skeleton [#216](https://github.com/CartoDB/carto-react-template/pull/216)
- Fix general React warning on SharedArrayBuffer [#218](https://github.com/CartoDB/carto-react-template/pull/218)

## 1.0.0-rc.1 (2021-03-11)
- Add cypress e2e tests in CI [#194](https://github.com/CartoDB/carto-react-template/pull/194)
Expand Down
2 changes: 1 addition & 1 deletion template-sample-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@carto/cra-template-sample-app",
"version": "1.0.0-rc.2",
"version": "1.0.0-rc.3",
"keywords": [
"react",
"create-react-app",
Expand Down
15 changes: 8 additions & 7 deletions template-sample-app/template.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"package": {
"dependencies": {
"@carto/react-api": "1.0.0-rc.1",
"@carto/react-auth": "1.0.0-rc.1",
"@carto/react-basemaps": "1.0.0-rc.1",
"@carto/react-core": "1.0.0-rc.1",
"@carto/react-redux": "1.0.0-rc.1",
"@carto/react-ui": "1.0.0-rc.1",
"@carto/react-widgets": "1.0.0-rc.1",
"@carto/react-api": "1.0.0-rc.2",
"@carto/react-auth": "1.0.0-rc.2",
"@carto/react-basemaps": "1.0.0-rc.2",
"@carto/react-core": "1.0.0-rc.2",
"@carto/react-redux": "1.0.0-rc.2",
"@carto/react-ui": "1.0.0-rc.2",
"@carto/react-widgets": "1.0.0-rc.2",
"@carto/react-workers": "1.0.0-rc.2",
"@formatjs/intl-getcanonicallocales": "^1.5.3",
"@formatjs/intl-locale": "^2.4.14",
"@formatjs/intl-numberformat": "^6.1.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,6 @@ describe('Stores Page', () => {
});

describe('Detail', () => {
// TODO: temporary, while fixing issue on page
beforeEach(() => {
cy.on('uncaught:exception', (err, runnable) => {
// temporary ignore console.errors
return false;
});
});

it('successfully loads one store', () => {
cy.visit(STORE_DETAIL_PAGE);
});
Expand Down
21 changes: 11 additions & 10 deletions template-sample-app/template/package.dev.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
{
"name": "carto-for-react",
"version": "1.0.0-rc.2",
"version": "1.0.0-rc.3",
"private": true,
"dependencies": {
"@carto/react-api": "1.0.0-rc.1",
"@carto/react-auth": "1.0.0-rc.1",
"@carto/react-basemaps": "1.0.0-rc.1",
"@carto/react-core": "1.0.0-rc.1",
"@carto/react-redux": "1.0.0-rc.1",
"@carto/react-ui": "1.0.0-rc.1",
"@carto/react-widgets": "1.0.0-rc.1",
"@carto/react-api": "1.0.0-rc.2",
"@carto/react-auth": "1.0.0-rc.2",
"@carto/react-basemaps": "1.0.0-rc.2",
"@carto/react-core": "1.0.0-rc.2",
"@carto/react-redux": "1.0.0-rc.2",
"@carto/react-ui": "1.0.0-rc.2",
"@carto/react-widgets": "1.0.0-rc.2",
"@carto/react-workers": "1.0.0-rc.2",
"@formatjs/intl-getcanonicallocales": "^1.5.3",
"@formatjs/intl-locale": "^2.4.14",
"@formatjs/intl-numberformat": "^6.1.4",
Expand Down Expand Up @@ -57,8 +58,8 @@
"cy:run": "npx cypress run",
"cy:ci": "START_SERVER_AND_TEST_INSECURE=1 start-server-and-test start https-get://localhost:3000 cy:run",
"eject": "react-scripts eject",
"link-carto-react": "yarn link @carto/react-api @carto/react-auth @carto/react-basemaps @carto/react-core @carto/react-redux @carto/react-ui @carto/react-widgets",
"unlink-carto-react": "yarn unlink @carto/react-api @carto/react-auth @carto/react-basemaps @carto/react-core @carto/react-redux @carto/react-ui @carto/react-widgets",
"link-carto-react": "yarn link @carto/react-api @carto/react-auth @carto/react-basemaps @carto/react-core @carto/react-redux @carto/react-ui @carto/react-widgets @carto/react-workers",
"unlink-carto-react": "yarn unlink @carto/react-api @carto/react-auth @carto/react-basemaps @carto/react-core @carto/react-redux @carto/react-ui @carto/react-widgets @carto/react-workers",
"lint": "eslint './src/**/*.{js,jsx}'",
"lint:fix": "eslint './src/**/*.{js,jsx}' --fix",
"format": "prettier --write \"**/*.+(js|jsx|json|css|md)\" --ignore-path .gitignore",
Expand Down
2 changes: 1 addition & 1 deletion template-sample-app/template/src/components/common/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const useStyles = makeStyles((theme) => ({
padding: theme.spacing(1, 1.5),
borderRadius: theme.shape.borderRadius,
backgroundColor: theme.palette.other.tooltip,
color: 'rgba(255, 255, 255, 0.75)', // TODO: Add emphasis colors to theme
color: 'rgba(255, 255, 255, 0.75)',
transform: `translate(-50%, calc(-100% - ${theme.spacing(2.5)}px))`,

'& .arrow': {
Expand Down
3 changes: 1 addition & 2 deletions template-sample-app/template/src/components/views/Kpi.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ function Kpi() {
dispatch(
addLayer({
id: KPI_LAYER_ID,
source: kpiSource.id,
selectedStore: null,
source: kpiSource.id
})
);

Expand Down
2 changes: 1 addition & 1 deletion template-skeleton/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@carto/cra-template",
"version": "1.0.0-rc.2",
"version": "1.0.0-rc.3",
"keywords": [
"react",
"create-react-app",
Expand Down
15 changes: 8 additions & 7 deletions template-skeleton/template.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"package": {
"dependencies": {
"@carto/react-api": "1.0.0-rc.1",
"@carto/react-auth": "1.0.0-rc.1",
"@carto/react-basemaps": "1.0.0-rc.1",
"@carto/react-core": "1.0.0-rc.1",
"@carto/react-redux": "1.0.0-rc.1",
"@carto/react-ui": "1.0.0-rc.1",
"@carto/react-widgets": "1.0.0-rc.1",
"@carto/react-api": "1.0.0-rc.2",
"@carto/react-auth": "1.0.0-rc.2",
"@carto/react-basemaps": "1.0.0-rc.2",
"@carto/react-core": "1.0.0-rc.2",
"@carto/react-redux": "1.0.0-rc.2",
"@carto/react-ui": "1.0.0-rc.2",
"@carto/react-widgets": "1.0.0-rc.2",
"@carto/react-workers": "1.0.0-rc.2",
"@formatjs/intl-getcanonicallocales": "^1.5.3",
"@formatjs/intl-locale": "^2.4.14",
"@formatjs/intl-numberformat": "^6.1.4",
Expand Down
21 changes: 11 additions & 10 deletions template-skeleton/template/package.dev.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
{
"name": "carto-for-react",
"version": "1.0.0-rc.2",
"version": "1.0.0-rc.3",
"private": true,
"dependencies": {
"@carto/react-api": "1.0.0-rc.1",
"@carto/react-auth": "1.0.0-rc.1",
"@carto/react-basemaps": "1.0.0-rc.1",
"@carto/react-core": "1.0.0-rc.1",
"@carto/react-redux": "1.0.0-rc.1",
"@carto/react-ui": "1.0.0-rc.1",
"@carto/react-widgets": "1.0.0-rc.1",
"@carto/react-api": "1.0.0-rc.2",
"@carto/react-auth": "1.0.0-rc.2",
"@carto/react-basemaps": "1.0.0-rc.2",
"@carto/react-core": "1.0.0-rc.2",
"@carto/react-redux": "1.0.0-rc.2",
"@carto/react-ui": "1.0.0-rc.2",
"@carto/react-widgets": "1.0.0-rc.2",
"@carto/react-workers": "1.0.0-rc.2",
"@formatjs/intl-getcanonicallocales": "^1.5.3",
"@formatjs/intl-locale": "^2.4.14",
"@formatjs/intl-numberformat": "^6.1.4",
Expand Down Expand Up @@ -57,8 +58,8 @@
"cy:run": "npx cypress run",
"cy:ci": "START_SERVER_AND_TEST_INSECURE=1 start-server-and-test start https-get://localhost:3000 cy:run",
"eject": "react-scripts eject",
"link-carto-react": "yarn link @carto/react-api @carto/react-auth @carto/react-basemaps @carto/react-core @carto/react-redux @carto/react-ui @carto/react-widgets",
"unlink-carto-react": "yarn unlink @carto/react-api @carto/react-auth @carto/react-basemaps @carto/react-core @carto/react-redux @carto/react-ui @carto/react-widgets",
"link-carto-react": "yarn link @carto/react-api @carto/react-auth @carto/react-basemaps @carto/react-core @carto/react-redux @carto/react-ui @carto/react-widgets @carto/react-workers",
"unlink-carto-react": "yarn unlink @carto/react-api @carto/react-auth @carto/react-basemaps @carto/react-core @carto/react-redux @carto/react-ui @carto/react-widgets @carto/react-workers",
"lint": "eslint './src/**/*.{js,jsx}'",
"lint:fix": "eslint './src/**/*.{js,jsx}' --fix",
"format": "prettier --write \"**/*.+(js|jsx|json|css|md)\" --ignore-path .gitignore",
Expand Down
2 changes: 1 addition & 1 deletion template-skeleton/template/src/components/common/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const useStyles = makeStyles((theme) => ({
padding: theme.spacing(1, 1.5),
borderRadius: theme.shape.borderRadius,
backgroundColor: theme.palette.grey[900],
color: 'rgba(255, 255, 255, 0.75)', // TODO: Add emphasis colors to theme
color: 'rgba(255, 255, 255, 0.75)',
transform: `translate(-50%, calc(-100% - ${theme.spacing(2.5)}px))`,

'& .arrow': {
Expand Down

This file was deleted.

1 comment on commit 9bf5782

@vercel
Copy link

@vercel vercel bot commented on 9bf5782 Mar 22, 2021

Choose a reason for hiding this comment

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

Please sign in to comment.