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

B 21230 resolve canvas dependency int #14213

Draft
wants to merge 33 commits into
base: integrationTesting
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
0a5be2e
initial big chonky commit, functionality and tests added
danieljordan-caci Nov 8, 2024
47ffc14
updating envrc, whoops
danieljordan-caci Nov 8, 2024
43549b7
updating playwright test
danieljordan-caci Nov 8, 2024
19958d8
adjusting CSS to be 100% instead of fixed width
danieljordan-caci Nov 8, 2024
7f59fd0
update react file viewer to 1.4.0
cameroncaci Nov 8, 2024
8ef3395
initial commit, replacing system.os with subprocess.run
danieljordan-caci Nov 11, 2024
d88979c
Merge branch 'main' into MAIN-B-20935
danieljordan-caci Nov 11, 2024
da629fc
enhanced webpack and pdf support
cameroncaci Nov 13, 2024
2d768d3
updated git ignore
cameroncaci Nov 13, 2024
33a3fef
Revert "MAIN B-21679 I-13498 overriding uswds styling"
cameroncaci Nov 14, 2024
efc573b
Merge pull request #14189 from transcom/revert-14178-MAIN-I-13498-ove…
cameroncaci Nov 14, 2024
5a2f10e
Revert "Revert "MAIN B-21679 I-13498 overriding uswds styling""
cameroncaci Nov 14, 2024
4cb17fc
Merge branch 'main' into MAIN-B-20935
danieljordan-caci Nov 14, 2024
37afd31
Merge branch 'main' into MAIN-B-20809
danieljordan-caci Nov 14, 2024
a4158a6
addressing flaky tests
danieljordan-caci Nov 8, 2024
32ed4d4
testing to see what this will do
danieljordan-caci Nov 14, 2024
6401ae8
fixing customer remark form
danieljordan-caci Nov 14, 2024
a84077e
Merge pull request #14157 from transcom/MAIN-B-20935
deandreJones Nov 14, 2024
01d9491
adjust test that passed in INT but is not passing in MAIN? Weird
danieljordan-caci Nov 14, 2024
52b8322
Merge branch 'main' into MAIN-B-20809
danieljordan-caci Nov 14, 2024
d92f244
Merge branch 'main' into revert-14189-revert-14178-MAIN-I-13498-overr…
danieljordan-caci Nov 14, 2024
c8ec09a
Merge pull request #14148 from transcom/MAIN-B-20809
deandreJones Nov 14, 2024
d822c9f
Merge branch 'main' into revert-14189-revert-14178-MAIN-I-13498-overr…
danieljordan-caci Nov 14, 2024
1de5f9f
initial commit, tests added, should be gucci
danieljordan-caci Nov 9, 2024
e28bf69
adding GSR checkbox to request form since work will be complete follo…
danieljordan-caci Nov 11, 2024
e7a1ebc
fixing flaky test
danieljordan-caci Nov 12, 2024
06a42f3
removing flaky line of test because of lack of ordering in endpoint
danieljordan-caci Nov 12, 2024
868e350
Merge pull request #14191 from transcom/revert-14189-revert-14178-MAI…
deandreJones Nov 14, 2024
ccc445a
Merge branch 'main' into MAIN-B-20810
danieljordan-caci Nov 14, 2024
d50cde2
Merge pull request #14198 from transcom/MAIN-B-20810
cameroncaci Nov 15, 2024
a0431c0
canvas dependency and point to dev branch
cameroncaci Nov 15, 2024
3dbc313
Merge remote-tracking branch 'origin/main' into b-21230-resolve-canva…
cameroncaci Nov 15, 2024
e9027b5
Merge remote-tracking branch 'origin/b-21230-resolve-canvas-dependenc…
cameroncaci Nov 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Negative filter for storybook config folder as dot folders are ignored by eslint by default
# See https://github.com/eslint/eslint/issues/8429#issuecomment-355967308
!/.storybook
public/static/react-file-viewer/*
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ schema.sql

*.stamp

public/static/react-file-viewer/*
public/swagger-ui/*
!public/swagger-ui/api.html
!public/swagger-ui/internal.html
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
public/swagger-ui/*
!public/swagger-ui/index.html
public/static/react-file-viewer/*
1 change: 1 addition & 0 deletions Dockerfile.reviewapp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ COPY public /build/public
COPY src /build/src
RUN set -x \
&& ./scripts/copy-swagger-ui \
&& ./scripts/copy-react-file-viewer \
&& yarn build

#########
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ client_deps: .check_hosts.stamp .client_deps.stamp ## Install client dependencie
.client_deps.stamp: yarn.lock .check_node_version.stamp
yarn install
scripts/copy-swagger-ui
scripts/copy-react-file-viewer
touch .client_deps.stamp

.client_build.stamp: .client_deps.stamp $(shell find src -type f)
Expand Down
2 changes: 2 additions & 0 deletions config-overrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ module.exports = {
config.resolve.fallback = {
// This is the Node polyfill for process/browser
http: require.resolve('stream-http'),
https: false,
fs: false,
};
config.plugins.push(
new webpack.ProvidePlugin({
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"@opentelemetry/core": "^1.15.1",
"@tanstack/react-query": "^4.29.12",
"@tanstack/react-query-devtools": "^5.17.12",
"@transcom/react-file-viewer": "git+https://github.com/transcom/react-file-viewer#v1.2.5",
"@transcom/react-file-viewer": "git+https://github.com/transcom/react-file-viewer.git#b-21230-resolve-dependencies",
"@trussworks/react-uswds": "3.2.0",
"axe-playwright": "^1.2.3",
"bytes": "^3.1.2",
Expand Down Expand Up @@ -152,6 +152,7 @@
"@typescript-eslint/eslint-plugin": "^5.61.0",
"@typescript-eslint/parser": "^5.61.0",
"@wojtekmaj/enzyme-adapter-react-17": "^0.8.0",
"canvas": "^2.11.2",
"danger": "^11.3.1",
"danger-plugin-jira-issue": "^1.4.1",
"enzyme": "^3.11.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,6 @@ test.describe('Services counselor user', () => {
await page.getByRole('button', { name: 'Confirm' }).click();
await scPage.waitForPage.moveDetails();

await expect(page.getByText('PACKET READY FOR DOWNLOAD')).toBeVisible();

// Navigate to the "View documents" page
await expect(page.getByRole('button', { name: /View documents/i })).toBeVisible();
await page.getByRole('button', { name: 'View documents' }).click();
Expand Down
1 change: 1 addition & 0 deletions scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ This subset of development scripts is used primarily for building the app.
| Script Name | Description |
| ----------------- | ----------------------------------------------------------------- |
| `copy-swagger-ui` | Copies the assets (other than xxx.html) into the public directory |
| `copy-react-file-viewer` | Copies react-file-viewer assets into the public directory to support dynamic importing of the pdfjs-dist library |
| `gen-server` | generate swagger code from yaml files |
| `openapi` | invokes the openapi redoc swagger tool |

Expand Down
7 changes: 7 additions & 0 deletions scripts/copy-react-file-viewer
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#! /usr/bin/env bash

# Copies the react file viewer webpack chunks to a public static directory to enable serving
# Without this, the client will attempt to HTTP GET the chunk file, but if it cannot be found (Because it isn't served)
# it will default to MilMove's index.html
# This doesn't serve it, but it enables the backend to serve the static chunk fle
cp node_modules/@transcom/react-file-viewer/dist/{*.js,*.png} public/static/react-file-viewer
1 change: 1 addition & 0 deletions src/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module.exports = {
ignorePatterns: ['public/static/react-file-viewer/*'],
rules: {
// okay to disable because the threat actor (web application user) already controls the execution environment (web browser)
'security/detect-object-injection': 'off',
Expand Down
2 changes: 1 addition & 1 deletion src/components/DocumentViewer/Content/Content.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const DocViewerContent = ({
<FontAwesomeIcon icon="search-plus" title="Zoom in" aria-label="Zoom in" />
Zoom in
</Button>
{['jpg', 'jpeg', 'gif', 'png'].includes(fileType) && (
{['jpg', 'jpeg', 'gif', 'png', 'pdf'].includes(fileType) && (
<>
<Button type="button" unstyled onClick={handleRotateLeft}>
<FontAwesomeIcon icon="rotate-left" title="Rotate left" aria-label="Rotate left" />
Expand Down
12,350 changes: 6,668 additions & 5,682 deletions yarn.lock

Large diffs are not rendered by default.