Skip to content

Commit

Permalink
chore: remove conditional frontend routing (#6190)
Browse files Browse the repository at this point in the history
* chore: remove react migration vars

* chore: remove more conditional code in angular, backend types

* chore: remove angular from express routing rules!

* chore: add back public route

* chore: remove angular public route

* chore: add react router

* chore: delete home folder, rename frontend to frontend-old and frontend-new to frontend

* chore: remove src_e2e ci test, rename tests to better reflect backend-frontend split

* test: add --openssl-legacy-provider to the ci build step

* chore: update node options for build step

* chore: revert ci to node 14
  • Loading branch information
justynoh authored May 17, 2023
1 parent 4daaf5c commit 93fa10b
Show file tree
Hide file tree
Showing 58 changed files with 331 additions and 2,195 deletions.
55 changes: 6 additions & 49 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ jobs:
outputs:
backend: ${{ steps.filter.outputs.backend }}
frontend: ${{ steps.filter.outputs.frontend }}
angularjs: ${{ steps.filter.outputs.angularjs }}
steps:
- uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
Expand All @@ -23,19 +22,13 @@ jobs:
frontend:
- shared/**
- frontend/**
angularjs:
- shared/**
- src/shared/**
- package.json
- package-lock.json
- src/public/**
backend:
- tests/**
- shared/**
- src/shared/**
- src/**
- package.json
- package-lock.json
- src/app/**
install:
runs-on: ubuntu-latest
steps:
Expand All @@ -51,8 +44,6 @@ jobs:
build:
needs: install
runs-on: ubuntu-latest
env:
NODE_OPTIONS: '--max-old-space-size=4096'
steps:
- uses: actions/checkout@v2
- run: mkdir -p build-output/
Expand All @@ -64,6 +55,8 @@ jobs:
cache-dependency-path: '**/package-lock.json'
- run: npm ci
- run: npm run build
env:
NODE_OPTIONS: '--max-old-space-size=4096'
- name: Upload build files
uses: actions/upload-artifact@v2
if: always()
Expand Down Expand Up @@ -126,24 +119,9 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

angularjs_test:
needs: [changes, install]
if: ${{ needs.changes.outputs.angularjs == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 14
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- run: npm ci
- run: npm run test:angularjs

src_lint:
backend_lint:
needs: [changes, install]
if: ${{ needs.changes.outputs.backend == 'true' || needs.changes.outputs.angularjs == 'true' }}
if: ${{ needs.changes.outputs.backend == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -156,24 +134,3 @@ jobs:
- run: npm ci
- run: npm run lint-ci
- run: npm_config_mode=yes npx lockfile-lint --type npm --path package.json --validate-https --allowed-hosts npm

src_e2e:
needs: [changes, build]
if: ${{ needs.changes.outputs.backend == 'true' || needs.changes.outputs.angularjs == 'true' }}
runs-on: ubuntu-latest
env:
NODE_OPTIONS: '--max-old-space-size=4096'
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v3
if: always()
with:
name: build-output
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 14
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- run: npm ci
- run: npm run test-e2e
3 changes: 0 additions & 3 deletions frontend/src/features/admin-form/common/AdminFormLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import { Banner } from '~components/Banner'

import AdminForbiddenErrorPage from '~pages/AdminForbiddenError'
import NotFoundErrorPage from '~pages/NotFoundError'
// TODO #4279: Remove after React rollout is complete
import { AdminFeedbackIcon } from '~features/env/AdminFeedbackIcon'
import { useEnv } from '~features/env/queries'

import { StorageResponsesProvider } from '../responses/ResponsesPage/storage/StorageResponsesProvider'
Expand Down Expand Up @@ -68,7 +66,6 @@ export const AdminFormLayout = (): JSX.Element => {
</Banner>
) : null}
<AdminFormNavbar />
<AdminFeedbackIcon />
<StorageResponsesProvider>
<Outlet />
</StorageResponsesProvider>
Expand Down
3 changes: 0 additions & 3 deletions frontend/src/features/admin-form/preview/PreviewFormPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import { Flex } from '@chakra-ui/react'
import { fillHeightCss } from '~utils/fillHeightCss'
import GovtMasthead from '~components/GovtMasthead'

// TODO #4279: Remove after React rollout is complete
import { AdminFeedbackIcon } from '~features/env/AdminFeedbackIcon'
import FormEndPage from '~features/public-form/components/FormEndPage'
import FormFields from '~features/public-form/components/FormFields'
import { FormSectionsProvider } from '~features/public-form/components/FormFields/FormSectionsContext'
Expand All @@ -28,7 +26,6 @@ export const PreviewFormPage = (): JSX.Element => {
<PreviewFormProvider formId={formId}>
<GovtMasthead />
<PreviewFormBannerContainer />
<AdminFeedbackIcon />
<FormSectionsProvider>
<PublicFormLogo />
<FormStartPage />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import { Flex } from '@chakra-ui/react'
import { fillHeightCss } from '~utils/fillHeightCss'
import GovtMasthead from '~components/GovtMasthead'

// TODO #4279: Remove after React rollout is complete
import { AdminFeedbackIcon } from '~features/env/AdminFeedbackIcon'
import FormEndPage from '~features/public-form/components/FormEndPage'
import FormFields from '~features/public-form/components/FormFields'
import { FormSectionsProvider } from '~features/public-form/components/FormFields/FormSectionsContext'
Expand All @@ -28,7 +26,6 @@ export const TemplateFormPage = (): JSX.Element => {
<TemplateFormProvider formId={formId}>
<GovtMasthead />
<PreviewFormBannerContainer isTemplate />
<AdminFeedbackIcon />
<FormSectionsProvider>
<PublicFormLogo />
<FormStartPage isTemplate />
Expand Down
36 changes: 0 additions & 36 deletions frontend/src/features/env/AdminFeedbackIcon.tsx

This file was deleted.

180 changes: 0 additions & 180 deletions frontend/src/features/env/AdminFeedbackModal.tsx

This file was deleted.

Loading

0 comments on commit 93fa10b

Please sign in to comment.