Skip to content

Commit

Permalink
Merge branch 'main' into Washington_UP_16629
Browse files Browse the repository at this point in the history
  • Loading branch information
victor-chaparro authored Jan 10, 2025
2 parents 954cdc2 + 9ec0a59 commit 0890ca7
Show file tree
Hide file tree
Showing 34 changed files with 595 additions and 1,022 deletions.
24 changes: 10 additions & 14 deletions .github/ISSUE_TEMPLATE/platform-user-story.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,34 +21,30 @@ so that _[Outcome - what is the value add to the user]_."

### Description/Use Case
<!--
_Use this section to describe the 'Why', and/or provide an example scenario in which this feature/functionality would be valueable._
Use this section to describe the 'Why', and/or provide an example scenario in which this feature/functionality would be valueable.
-->

### Risks/Impacts/Considerations
<!--
_Use this section to briefly list out any risks/impacts that may come about, as a result of the proposed solution._
- _System performance may be slowed_
- _Only a single search parameter can be used_
Use this section to briefly list out any risks/impacts that may come about, as a result of the proposed solution.
- _[System performance may be slowed]_
- _[Only a single search parameter can be used]_
-->

### Dev Notes
<!--
_Use this section to describe any useful technical information to duplicate an issue or explain requirements related to this ticket without providing implementation details._
- _Provided is the data that was used to replicate the issue..._
- _To test, use SimpleReport upload CSV page to ..._
Use this section to describe any useful technical information to duplicate an issue or explain requirements related to this ticket without providing implementation details.
- _[Provided is the data that was used to replicate the issue...]_
- _[To test, use SimpleReport upload CSV page to ...]_
-->

### Acceptance Criteria
<!--
What is Acceptance Criteria?
A set of conditions or business rules, as defined by the Product Owner, which the functionality or feature should satisfy, in order to be accepted by the Product Owner.
Use the following template when creating new Acceptance Criteria:
Write the acceptance criteria as a list that can be checked off as work progresses. For example:
"Given _[describe the precondition]_, when I _[describe the action performed]_, then I expect _[describe the expected outcome]_."
_OR... it may be written as a bulleted list._
- _Time must be displayed as HH:MM:SS_
- _Delivery rate must be shown as a percentage_
- [ ] _[Time must be displayed as HH:MM:SS]_
- [ ] _[Delivery rate must be shown as a percentage]_
-->
23 changes: 23 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,29 @@ updates:
time: "00:17"
timezone: "US/Eastern"
rebase-strategy: "disabled"
# Remove ignore entries when frontend is manually migrated for these libraries
ignore:
- dependency-name: "react"
update-types:
- version-update:semver-major
- dependency-name: "react-dom"
update-types:
- version-update:semver-major
- dependency-name: "@types/react"
update-types:
- version-update:semver-major
- dependency-name: "@types/react-dom"
update-types:
- version-update:semver-major
- dependency-name: "react-router"
update-types:
- version-update:semver-major
- dependency-name: "react-router-dom"
update-types:
- version-update:semver-major
- dependency-name: "undici"
update-types:
- version-update:semver-major
groups:
project:
patterns:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/alert_MBUsers_Inactive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ jobs:
echo -e "$messageInactiveUsers">> $GITHUB_OUTPUT
echo "$EOF" >> $GITHUB_OUTPUT
- name: Slack Notification
uses: ./.github/actions/notifications
with:
Expand All @@ -49,8 +48,7 @@ jobs:
message: |
${{ steps.users_out.outputs.MESSAGE_RESPONSE }}
icon-emoji: ':hourglass_flowing_sand:'
channel: pagerduty-alert-dump
webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
channel: temp-cdc-rs-notifications # Updated channel
webhook-url: ${{ secrets.SLACK_NOTIFICATIONS_WEBHOOK_URL }} # Updated webhook secret
color: warning
slackify-markdown: true

4 changes: 2 additions & 2 deletions .github/workflows/alert_cert_expire.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ jobs:
message: |
${{ steps.format_out.outputs.LIST }}
icon-emoji: ':bell:'
channel: pagerduty-alert-dump
webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
channel: temp-cdc-rs-notifications # Updated channel
webhook-url: ${{ secrets.SLACK_NOTIFICATIONS_WEBHOOK_URL }} # Updated webhook secret
color: warning

- name: Remove Runner IP from the KeyVault Firewalls
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/alert_resource_costs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
* **Provisioned by: \`${{ steps.last-pusher.outputs.username }}\`**
* **Last Change Date: \`${{ steps.last-pusher.outputs.last_change_date }}\`**
icon-emoji: ':money_with_wings:'
channel: prime-reportstream-engineering
webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
channel: temp-cdc-rs-notifications # Updated channel
webhook-url: ${{ secrets.SLACK_NOTIFICATIONS_WEBHOOK_URL }} # Updated webhook secret
color: failure
slackify-markdown: true
5 changes: 2 additions & 3 deletions .github/workflows/alert_terraform_changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ jobs:
tf-auth: true

- name: Collect Terraform stats

uses: josiahsiegel/terraform-stats@68b8cbe42c494333fbf6f8d90ac86da1fb69dcc2
## DevSecOps - Aquia (Replace) - uses: ./.github/actions/terraform-stats

Expand Down Expand Up @@ -66,6 +65,6 @@ jobs:
"resource-drifts": "${{ env.resource-drifts }}"
icon-emoji: ':bell:'
channel: pagerduty-alert-dump
webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
channel: temp-cdc-rs-notifications # Updated channel
webhook-url: ${{ secrets.SLACK_NOTIFICATIONS_WEBHOOK_URL }} # Updated webhook secret
color: warning
10 changes: 3 additions & 7 deletions frontend-react/__mocks__/focus-trap-react.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
import type * as FocusTrapType from "focus-trap-react";
import { FocusTrapProps } from "focus-trap-react";
import React from "react";
import { vi } from "vitest";

const FocusTrap = (await vi.importActual("focus-trap-react"))
.default as React.ComponentType<FocusTrapType.Props>;
const FocusTrap = (await vi.importActual("focus-trap-react")).default as React.ComponentType<FocusTrapProps>;

/**
* Override displayCheck for testing. See: https://github.com/focus-trap/tabbable#testing-in-jsdom
*/
const FixedComponent = ({
focusTrapOptions,
...props
}: FocusTrapType.Props) => {
const FixedComponent = ({ focusTrapOptions, ...props }: FocusTrapProps) => {
const fixedOptions = { ...focusTrapOptions };
fixedOptions.tabbableOptions = {
...fixedOptions.tabbableOptions,
Expand Down
44 changes: 22 additions & 22 deletions frontend-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"@microsoft/applicationinsights-react-js": "^17.3.4",
"@microsoft/applicationinsights-web": "^3.3.4",
"@okta/okta-react": "^6.9.0",
"@okta/okta-signin-widget": "^7.26.1",
"@okta/okta-signin-widget": "^7.27.1",
"@rest-hooks/rest": "^3.0.3",
"@tanstack/react-query": "^5.62.11",
"@tanstack/react-query-devtools": "^5.62.11",
"@tanstack/react-query": "^5.62.16",
"@tanstack/react-query-devtools": "^5.62.16",
"@trussworks/react-uswds": "^9.1.0",
"@uswds/uswds": "3.7.1",
"axios": "^1.7.9",
Expand All @@ -20,29 +20,29 @@
"date-fns-tz": "^3.2.0",
"dompurify": "^3.2.3",
"export-to-csv-fix-source-map": "^0.2.1",
"focus-trap-react": "^10.3.1",
"focus-trap-react": "^11.0.2",
"history": "^5.3.0",
"html-to-text": "^9.0.5",
"lodash": "^4.17.21",
"p-limit": "^6.2.0",
"react": "~18.3.1",
"react-dom": "~18.3.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-helmet-async": "^2.0.5",
"react-idle-timer": "^5.7.2",
"react-loader-spinner": "^6.1.6",
"react-markdown": "^9.0.1",
"react-markdown": "^9.0.3",
"react-query-kit": "^3.3.1",
"react-router": "~6.28.0",
"react-router-dom": "~6.28.0",
"react-router": "^6.28.0",
"react-router-dom": "^6.28.0",
"react-scroll-sync": "^0.11.2",
"react-toastify": "^10.0.6",
"react-toastify": "^11.0.2",
"rehype-raw": "^7.0.0",
"rehype-slug": "^5.1.0",
"rest-hooks": "^6.1.7",
"sanitize-html": "^2.14.0",
"tsx": "^4.19.2",
"use-deep-compare-effect": "^1.8.1",
"uuid": "^11.0.3",
"uuid": "^11.0.4",
"web-vitals": "^3.4.0"
},
"scripts": {
Expand Down Expand Up @@ -137,11 +137,11 @@
"@types/eslint__js": "^8.42.3",
"@types/github-slugger": "^2.0.0",
"@types/html-to-text": "^9.0.4",
"@types/lodash": "^4.17.13",
"@types/lodash": "^4.17.14",
"@types/mdx": "^2.0.13",
"@types/node": "^20.12.5",
"@types/react": "~18.3.11",
"@types/react-dom": "~18.3.1",
"@types/react": "^18.3.11",
"@types/react-dom": "^18.3.1",
"@types/react-router-dom": "^5.3.3",
"@types/react-scroll-sync": "^0.9.0",
"@types/sanitize-html": "^2.13.0",
Expand All @@ -151,10 +151,10 @@
"autoprefixer": "^10.4.20",
"browserslist": "^4.24.3",
"browserslist-useragent-regexp": "^4.1.3",
"chromatic": "^11.20.2",
"chromatic": "^11.22.0",
"cross-env": "^7.0.3",
"dotenv-flow": "^4.1.0",
"eslint": "9.17.0",
"eslint": "^9.17.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.7.0",
"eslint-plugin-import": "^2.31.0",
Expand All @@ -164,7 +164,7 @@
"eslint-plugin-react": "^7.37.3",
"eslint-plugin-react-hooks": "^5.1.0",
"eslint-plugin-react-refresh": "^0.4.16",
"eslint-plugin-storybook": "^0.11.1",
"eslint-plugin-storybook": "^0.11.2",
"eslint-plugin-testing-library": "^7.1.1",
"eslint-plugin-vitest": "^0.5.4",
"globals": "^15.14.0",
Expand All @@ -178,25 +178,25 @@
"patch-package": "^8.0.0",
"postcss": "^8.4.49",
"prettier": "^3.4.2",
"react-error-boundary": "^4.1.2",
"react-error-boundary": "^5.0.0",
"remark-frontmatter": "^5.0.0",
"remark-mdx-frontmatter": "^5.0.0",
"remark-mdx-toc": "^0.3.1",
"sass": "^1.83.0",
"sass": "^1.83.1",
"storybook": "^8.4.7",
"storybook-addon-remix-react-router": "^3.0.2",
"ts-node": "^10.9.2",
"tslib": "^2.8.1",
"typescript": "^5.7.2",
"typescript-eslint": "^8.19.0",
"undici": "~6.20.1",
"vite": "^6.0.6",
"undici": "^6.20.1",
"vite": "^6.0.7",
"vite-plugin-checker": "^0.8.0",
"vite-plugin-svgr": "^4.3.0",
"vitest": "^2.1.8"
},
"resolutions": {
"@types/react": "~18.3.11",
"@types/react": "^18.3.11",
"@okta/okta-auth-js": ">=7.8.1",
"cookie": ">=0.7.0",
"send": ">=0.19.0"
Expand Down
58 changes: 11 additions & 47 deletions frontend-react/src/components/App/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ import { QueryClientProvider } from "@tanstack/react-query";
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
import { Suspense, useCallback, useMemo } from "react";
import { HelmetProvider } from "react-helmet-async";
import {
createBrowserRouter,
RouteObject,
RouterProvider,
} from "react-router-dom";
import { createBrowserRouter, RouteObject, RouterProvider } from "react-router-dom";
import { CacheProvider, NetworkErrorBoundary } from "rest-hooks";

import AuthStateGate from "./AuthStateGate";
Expand All @@ -25,7 +21,6 @@ import { RSConsole } from "../../utils/rsConsole/rsConsole";
import { createTelemetryService } from "../../utils/TelemetryService/TelemetryService";
import { PERMISSIONS } from "../../utils/UsefulTypes";

import "react-toastify/dist/ReactToastify.css";
import RSErrorBoundary from "../RSErrorBoundary/RSErrorBoundary";

export interface AppProps {
Expand All @@ -48,10 +43,7 @@ function App({ config, routes }: AppProps) {
() => new RSConsole({ ai: aiReactPlugin, ...config.RSCONSOLE }),
[aiReactPlugin, config.RSCONSOLE],
);
const oktaAuth = useMemo(
() => new OktaAuth(config.OKTA_AUTH),
[config.OKTA_AUTH],
);
const oktaAuth = useMemo(() => new OktaAuth(config.OKTA_AUTH), [config.OKTA_AUTH]);
const router = useMemo(() => createBrowserRouter(routes), [routes]);

const Fallback = useCallback(() => <ErrorPage type="page" />, []);
Expand All @@ -67,25 +59,13 @@ function App({ config, routes }: AppProps) {
let url = originalUri;
if (originalUri === "/") {
/* PERMISSIONS REFACTOR: Redirect URL should be determined by active membership type */
if (
authState?.accessToken &&
permissionCheck(
PERMISSIONS.PRIME_ADMIN,
authState.accessToken,
)
) {
if (authState?.accessToken && permissionCheck(PERMISSIONS.PRIME_ADMIN, authState.accessToken)) {
url = "/admin/settings";
}
if (
authState?.accessToken &&
permissionCheck(PERMISSIONS.SENDER, authState.accessToken)
) {
if (authState?.accessToken && permissionCheck(PERMISSIONS.SENDER, authState.accessToken)) {
url = "/submissions";
}
if (
authState?.accessToken &&
permissionCheck(PERMISSIONS.RECEIVER, authState.accessToken)
) {
if (authState?.accessToken && permissionCheck(PERMISSIONS.RECEIVER, authState.accessToken)) {
url = "/daily-data";
}
}
Expand All @@ -101,36 +81,20 @@ function App({ config, routes }: AppProps) {
return (
<RSErrorBoundary rsConsole={rsConsole}>
<AppInsightsContext.Provider value={aiReactPlugin}>
<Security
restoreOriginalUri={restoreOriginalUri}
oktaAuth={oktaAuth}
>
<Security restoreOriginalUri={restoreOriginalUri} oktaAuth={oktaAuth}>
<AuthStateGate>
<QueryClientProvider client={appQueryClient}>
<SessionProvider
config={config}
rsConsole={rsConsole}
>
<SessionProvider config={config} rsConsole={rsConsole}>
<HelmetProvider>
<FeatureFlagProvider>
<NetworkErrorBoundary
fallbackComponent={Fallback}
>
<NetworkErrorBoundary fallbackComponent={Fallback}>
<CacheProvider>
<ToastProvider>
<DAPScript
pathname={
location.pathname
}
/>
<DAPScript pathname={location.pathname} />
<Suspense>
<RouterProvider
router={router}
/>
<RouterProvider router={router} />
</Suspense>
<ReactQueryDevtools
initialIsOpen={false}
/>
<ReactQueryDevtools initialIsOpen={false} />
</ToastProvider>
</CacheProvider>
</NetworkErrorBoundary>
Expand Down
Loading

0 comments on commit 0890ca7

Please sign in to comment.