Skip to content

Commit

Permalink
Merge pull request #6551 from hotosm/upgrade/iD-editor-2.30.2
Browse files Browse the repository at this point in the history
iD editor upgrade to v2.30.2
  • Loading branch information
ramyaragupathy authored Sep 19, 2024
2 parents 62a4e36 + 8390fd7 commit cae8fb4
Show file tree
Hide file tree
Showing 7 changed files with 15,499 additions and 21,488 deletions.
1 change: 1 addition & 0 deletions frontend/craco.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module.exports = {
});
}
}
webpackConfig.module.noParse = /\/node_modules\/@hotosm\/id\/dist\/iD.min.js/;
return webpackConfig;
},
},
Expand Down
15 changes: 7 additions & 8 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"license": "BSD-2-Clause",
"private": false,
"dependencies": {
"@hotosm/id": "^2.21.1",
"@hotosm/id": "^2.30.2",
"@hotosm/iso-countries-languages": "^1.1.2",
"@hotosm/underpass-ui": "^0.0.4",
"@mapbox/mapbox-gl-draw": "^1.4.3",
Expand Down Expand Up @@ -81,14 +81,13 @@
},
"scripts": {
"build-locales": "combine-messages -i './src/**/messages.js' -o './src/locales/en.json'",
"copy-static": "bash -c \"mkdir -p public/static/id; mkdir -p public/static/rapid; if ! (test -a public/static/id/index.js); then cp -R node_modules/@hotosm/id/dist/* public/static/id; fi; if ! (test -a public/static/rapid/rapid.js); then cp -R node_modules/@rapideditor/rapid/dist/* public/static/rapid; fi\"",
"update-static": "bash -c \"mkdir -p public/static/id; mkdir -p public/static/rapid; cp -R node_modules/@hotosm/id/dist/* public/static/id; cp -R node_modules/@rapideditor/rapid/dist/* public/static/rapid;\"",
"patch-id": "bash -c \"cp patch/imagery.min.json public/static/id/data\"",
"patch-rapid": "bash -c \"cp patch/rapid-imagery.min.json public/static/rapid/data/imagery.min.json\"",
"copy-static": "bash -c \"mkdir -p public/static/rapid; if ! (test -a public/static/rapid/rapid.js); then cp -R node_modules/@rapideditor/rapid/dist/* public/static/rapid; fi\"",
"copy-id-static": "bash -c \"mkdir -p public/static/id; if ! (test -a public/static/id/data); then cp -R node_modules/@hotosm/id/dist/data public/static/id && cp -R node_modules/@hotosm/id/dist/img public/static/id && cp -R node_modules/@hotosm/id/dist/locales public/static/id; fi;\"",
"update-static": "bash -c \"mkdir -p public/static/rapid; cp -R node_modules/@rapideditor/rapid/dist/* public/static/rapid;\"",
"update-id-static": "bash -c \"mkdir -p public/static/id; cp -R node_modules/@hotosm/id/dist/data public/static/id && cp -R node_modules/@hotosm/id/dist/img public/static/id && cp -R node_modules/@hotosm/id/dist/locales public/static/id;\"", "patch-rapid": "bash -c \"cp patch/rapid-imagery.min.json public/static/rapid/data/imagery.min.json\"",
"preparation": "bash -c \"if (test -a ../tasking-manager.env); then grep -hs ^ ../tasking-manager.env .env.expand > .env; else cp .env.expand .env; fi\"",
"start": "npm run preparation && npm run copy-static && npm run patch-id && npm run patch-rapid && craco start",
"build": "npm run preparation && npm run update-static && npm run patch-id && npm run patch-rapid && craco build && npm run sentry:sourcemaps",
"prettier": "prettier --write 'src/**/*.js'",
"start": "npm run preparation && npm run copy-static && npm run copy-id-static && npm run patch-rapid && craco start",
"build": "npm run preparation && npm run update-static && npm run update-id-static && npm run patch-rapid && craco build && npm run sentry:sourcemaps", "prettier": "prettier --write 'src/**/*.js'",
"lint": "eslint src",
"test": "npm run lint && craco test --env=jsdom",
"coverage": "npm run test -- --coverage --watchAll=false",
Expand Down
1 change: 0 additions & 1 deletion frontend/patch/imagery.min.json

This file was deleted.

10 changes: 0 additions & 10 deletions frontend/src/components/taskSelection/tests/imagery.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,6 @@ describe('Imagery', () => {
expect(screen.queryByRole('img')).not.toBeInTheDocument();
});

it('with a Maxar-Premium layer', () => {
render(
<IntlProviders>
<Imagery value={'Maxar-Premium'} />
</IntlProviders>,
);
expect(screen.getByText('Maxar Premium')).toBeInTheDocument();
expect(screen.queryByRole('img')).not.toBeInTheDocument();
});

it('with a Maxar-Standard layer', () => {
render(
<IntlProviders>
Expand Down
1 change: 0 additions & 1 deletion frontend/src/hooks/UseImageryOption.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export const IMAGERY_OPTIONS = [
{ label: 'Mapbox Satellite', value: 'Mapbox' },
{ label: 'ESRI World Imagery', value: 'EsriWorldImagery' },
{ label: 'ESRI World Imagery (Clarity) Beta', value: 'EsriWorldImageryClarity' },
{ label: 'Maxar Premium', value: 'Maxar-Premium' },
{ label: 'Maxar Standard', value: 'Maxar-Standard' },
{ label: 'Custom', value: 'custom' },
];
Expand Down
4 changes: 0 additions & 4 deletions frontend/src/hooks/tests/UseImageryOption.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ describe('useImageryOption', () => {
const { result } = renderHook(() => useImageryOption('Bing'));
expect(result.current).toEqual({ label: 'Bing', value: 'Bing' });
});
it('with Maxar-Premium', () => {
const { result } = renderHook(() => useImageryOption('Maxar-Premium'));
expect(result.current).toEqual({ label: 'Maxar Premium', value: 'Maxar-Premium' });
});
it('with EsriWorldImagery', () => {
const { result } = renderHook(() => useImageryOption('EsriWorldImagery'));
expect(result.current).toEqual({ label: 'ESRI World Imagery', value: 'EsriWorldImagery' });
Expand Down
Loading

0 comments on commit cae8fb4

Please sign in to comment.