From 6d9076e3dd584e46a26f038d3cfdfdfd16f2e54f Mon Sep 17 00:00:00 2001 From: Justin Littman Date: Tue, 21 Sep 2021 17:57:05 -0400 Subject: [PATCH] Refactors literal input. closes #3011 --- Dockerfile | 10 +- README.md | 3 +- __tests__/GraphBuilder.test.js | 89 + .../loadResource-ADD_SUBJECT.json | 2119 ++++++++--------- .../newResourceCopy-ADD_SUBJECT.json | 4 +- __tests__/__resource_fixtures__/test.json | 6 +- __tests__/components/App.test.js | 9 +- __tests__/feature/editing/addRemove.test.js | 11 +- .../feature/editing/changeGroups.test.js | 2 - .../feature/editing/editingLiteral.test.js | 87 +- __tests__/feature/editing/reordering.test.js | 4 +- .../editing/saveAndCopyResource.test.js | 16 +- .../feature/editing/saveResource.test.js | 2 +- __tests__/feature/loadResource.test.js | 6 +- .../feature/searchAndViewResource.test.js | 23 +- __tests__/reducers/resources.test.js | 179 +- __tests__/selectors/resources.test.js | 7 + __tests__/testUtilities/stateUtils.js | 11 + cypress/integration/end2end.spec.js | 4 +- cypress/integration/leftNav.spec.js | 9 +- package-lock.json | 13 + package.json | 8 +- src/GraphBuilder.js | 6 +- src/actions/resources.js | 9 + src/components/editor/GroupChoiceModal.jsx | 2 +- .../editor/{property => inputs}/InputLang.jsx | 0 src/components/editor/inputs/InputLiteral.jsx | 58 + .../editor/inputs/InputLiteralValue.jsx | 140 ++ .../editor/inputs/LanguageButton.jsx | 45 + .../editor/inputs/ReadOnlyInputLiteral.jsx | 25 + .../editor/property/InputLiteral.jsx | 157 -- .../editor/property/InputLookup.jsx | 2 +- .../editor/property/LanguageButton.jsx | 2 +- .../editor/property/NestedPropertyHeader.jsx | 23 +- .../editor/property/PropertyComponent.jsx | 44 +- src/hooks/useDiacritics.js | 25 +- src/hooks/useDiacriticsLegacy.js | 88 + src/hooks/useNavigableComponent.js | 13 +- src/reducers/index.js | 6 +- src/reducers/resources.js | 108 +- src/selectors/groups.js | 5 +- src/selectors/resources.js | 3 + src/utilities/Utilities.js | 3 + 43 files changed, 1869 insertions(+), 1517 deletions(-) rename src/components/editor/{property => inputs}/InputLang.jsx (100%) create mode 100644 src/components/editor/inputs/InputLiteral.jsx create mode 100644 src/components/editor/inputs/InputLiteralValue.jsx create mode 100644 src/components/editor/inputs/LanguageButton.jsx create mode 100644 src/components/editor/inputs/ReadOnlyInputLiteral.jsx delete mode 100644 src/components/editor/property/InputLiteral.jsx create mode 100644 src/hooks/useDiacriticsLegacy.js diff --git a/Dockerfile b/Dockerfile index 05a85998b..072754ecb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,15 +17,15 @@ ENV HONEYBADGER_API_KEY=$HONEYBADGER_API_KEY # Set environment variables from the build args ENV INDEX_URL ${INDEX_URL} -# Everything that isn't in .dockerignore ships -COPY --chown=circleci:circleci . . - -RUN mkdir dist -RUN mkdir node_modules +COPY --chown=circleci:circleci package.json . +COPY --chown=circleci:circleci package-lock.json . # Install dependencies RUN npm install --no-optional +# Everything that isn't in .dockerignore ships +COPY --chown=circleci:circleci . . + # Build the app *within* the container because environment variables are fixed at build-time RUN npm run build diff --git a/README.md b/README.md index 67b9bdfc2..394161f1c 100755 --- a/README.md +++ b/README.md @@ -311,11 +311,12 @@ The following are only in the resource subject (that is, the base subject). -> property: {}, literal: , lang: , + -> langLabel: