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

MPDX-7878 Performance Enhancements and Codebase Simplification #950

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
50 changes: 8 additions & 42 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
15 changes: 8 additions & 7 deletions amplify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,24 @@ frontend:
- nvm install 18.13
- nvm use 18.13
- |
if [[ "${AWS_BRANCH_ARN#*/branches/}" == *"pr-"* ]]; then
if [[ "${AWS_BRANCH_ARN#*/branches/}" != "main" ]] && [["${AWS_BRANCH_ARN#*/branches/}" != "staging"]]; then
PREVIEW_URL="https://${AWS_BRANCH_ARN#*/branches/}.${AWS_APP_ID}.amplifyapp.com";
NEXTAUTH_URL=$PREVIEW_URL;
echo "PREVIEW_URL=$PREVIEW_URL" >> .env;
elif [[ "${AWS_BRANCH}" != "main" && "${AWS_BRANCH}" != "staging" ]]; then
PREVIEW_URL="https://${AWS_BRANCH}.${AWS_APP_ID}.amplifyapp.com";
NEXTAUTH_URL=$PREVIEW_URL;
echo "PREVIEW_URL=$PREVIEW_URL" >> .env;
fi
- echo "NEXTAUTH_URL=$NEXTAUTH_URL" >> .env
- echo "NODE_ENV=$NODE_ENV" >> .env
- yarn set version 3.3.0
- yarn set version 3.2.3
- yarn config set nodeLinker node-modules
- yarn -v
- yarn
- yarn disable-telemetry
- yarn gql
- |
if [[ "${AWS_BRANCH_ARN#*/branches/}" != "main" ]] && [["${AWS_BRANCH_ARN#*/branches/}" != "staging"]]; then
API_URL=https://api.mpdx.org/graphql yarn gql
else
yarn gql
fi
build:
commands:
- yarn build:amplify
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"react-dnd-html5-backend": "^14.0.2",
"react-dom": "^18.2.0",
"react-i18next": "^11.18.6",
"react-virtuoso": "2.19.0",
"react-virtuoso": "^4.7.4",
"recharts": "2.3.2",
"rollbar": "^2.25.2",
"storybook": "^6.5.16",
Expand Down
3 changes: 1 addition & 2 deletions pages/_app.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@
import makeClient from 'src/lib/apollo/client';
import i18n from 'src/lib/i18n';
import theme from 'src/theme';
import './helpscout.css';
import './print.css';
import './styles.css';

Check warning on line 38 in pages/_app.page.tsx

View check run for this annotation

Codecov / codecov/patch

pages/_app.page.tsx#L38

Added line #L38 was not covered by tests

export type PageWithLayout = NextPage & {
layout?: React.FC;
Expand Down
11 changes: 9 additions & 2 deletions pages/_document.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,20 @@
href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300;400;700&display=swap"
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300;400;700&display=swap"
rel="preload"
as="font"
type="font/woff2"
crossOrigin="true"
/>
{process.env.DATADOG_CONFIGURED === 'true' && (
<Script id="datadog-rum" strategy="afterInteractive">
<Script id="datadog-rum" strategy="lazyOnload">

Check warning on line 33 in pages/_document.page.tsx

View check run for this annotation

Codecov / codecov/patch

pages/_document.page.tsx#L33

Added line #L33 was not covered by tests
{`!function(a,e,t,n,s){a=a[s]=a[s]||{q:[],onReady:function(e){a.q.push(e)}},(s=e.createElement(t)).async=1,s.src=n,(n=e.getElementsByTagName(t)[0]).parentNode.insertBefore(s,n)}(window,document,"script","https://www.datadoghq-browser-agent.com/datadog-rum-v5.js","DD_RUM"),DD_RUM.onReady(function(){DD_RUM.init({clientToken:"${process.env.DATADOG_CLIENT_TOKEN}",applicationId:"${process.env.DATADOG_APP_ID}",site:"datadoghq.com",service:"mpdx-web-react",sessionSampleRate:100,sessionReplaySampleRate:20,trackUserInteractions:!0,trackResources:!0,trackLongTasks:!0,defaultPrivacyLevel:"mask-user-input",env:"${process.env.DD_ENV}",allowedTracingUrls:["${process.env.API_URL}"]})});`}
</Script>
)}
{process.env.GOOGLE_TAG_MANAGER_CONTAINER_ID && (
<Script id="google-analytics" strategy="afterInteractive">
<Script id="google-analytics" strategy="lazyOnload">

Check warning on line 38 in pages/_document.page.tsx

View check run for this annotation

Codecov / codecov/patch

pages/_document.page.tsx#L38

Added line #L38 was not covered by tests
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how much we use these analytics but do you think we will miss any data if it is lazy loaded?

{`(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','${process.env.GOOGLE_TAG_MANAGER_CONTAINER_ID}');`}
</Script>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
} from 'src/components/Shared/Header/ListHeader';
import { TaskModalEnum } from 'src/components/Task/Modal/TaskModal';
import { TaskRow } from 'src/components/Task/TaskRow/TaskRow';
import { TaskRowSkeleton } from 'src/components/Task/TaskRow/TaskRowSkeleton.skeleton';
import { TaskFilterSetInput } from 'src/graphql/types.generated';
import { useGetTaskIdsForMassSelectionQuery } from 'src/hooks/GetIdsForMassSelection.generated';
import { useAccountListId } from 'src/hooks/useAccountListId';
Expand Down Expand Up @@ -402,6 +403,8 @@ const TasksPage: React.FC = () => {
data-foo="bar"
loading={loading}
data={data?.tasks.nodes}
Skeleton={TaskRowSkeleton}
numberOfSkeletons={25}
style={{
height: `calc(100vh - ${navBarHeight} - ${headerHeight} - ${buttonBarHeight})`,
}}
Expand Down
27 changes: 0 additions & 27 deletions pages/helpscout.css

This file was deleted.

25 changes: 0 additions & 25 deletions pages/print.css

This file was deleted.

Loading
Loading