Skip to content

Commit 7bde26b

Browse files
committed
Merge branch 'dev' into feature/garrett
2 parents 121b2c1 + 3e8edcf commit 7bde26b

File tree

12 files changed

+923
-122
lines changed

12 files changed

+923
-122
lines changed

docs/assets/style.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,6 +1267,7 @@ img {
12671267
border: 0.25rem solid var(--color-icon-background);
12681268
}
12691269

1270+
12701271
/* mobile */
12711272
@media (max-width: 769px) {
12721273
.tsd-widget.options,

docs/classes/app_components_Buttons_Tutorial.default.html

Lines changed: 667 additions & 9 deletions
Large diffs are not rendered by default.

jest.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ module.exports = {
1010
'www',
1111
'./src/backend/__tests__/ignore',
1212
'./src/app/__tests__enzyme/ignore',
13-
'./src/backend/__tests__/linkFiber.test.ts',
13+
// './src/backend/__tests__/linkFiber.test.ts',
1414
'./src/app/slices/mainSlice.ts',
1515
],
1616
coveragePathIgnorePatterns: [
1717
'/src/backend/__tests__/ignore/',
1818
'/src/app/__tests__enzyme/ignore',
19-
'./src/backend/__tests__/linkFiber.test.ts',
19+
// './src/backend/__tests__/linkFiber.test.ts',
2020
'./src/app/slices/mainSlice.ts',
2121
],
2222
transformIgnorePatterns: ['/node_modules/(?!d3|d3-array|internmap|delaunator|robust-predicates)'],

src/app/__tests__/ActionContainer.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ describe('unit testing for ActionContainer', () => {
192192
});
193193

194194
describe('Integration testing for ActionContainer.tsx', () => {
195-
xtest('renders the ActionContainer component', () => {
195+
test('renders the ActionContainer component', () => {
196196
//tests that the clearButton is rendered by testing if we can get "Clear"
197197
//need to set actionView to true to correctly render clearbutton
198198
render(

src/app/components/Buttons/Tutorial.tsx

Lines changed: 53 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,12 @@ export default class Tutorial extends Component<TutorialProps, TutorialState> {
108108
'<ul><li>Toggle record button to pause state changes on target application</li></ul>',
109109
position: 'right',
110110
},
111+
{
112+
title: 'Dropdown Menu',
113+
element: '.css-13cymwt-control',
114+
intro: '<ul><li>Dropdown Menu for picking between Timejump and UseContext</li></ul>',
115+
position: 'right',
116+
},
111117
{
112118
element: '.individual-action',
113119
title: 'Snapshot',
@@ -176,6 +182,12 @@ export default class Tutorial extends Component<TutorialProps, TutorialState> {
176182
'<ul><li>This tab visually displays a JSON Tree containing the different components and states</li></ul>',
177183
position: 'bottom',
178184
},
185+
{
186+
title: 'Accessibility Tree',
187+
element: '.accessibility-tab',
188+
intro: '<ul><li>This tab visually displays a Accessibility Tree</li></ul>',
189+
position: 'bottom',
190+
},
179191
{
180192
title: 'Tutorial Complete',
181193
intro:
@@ -195,45 +207,56 @@ export default class Tutorial extends Component<TutorialProps, TutorialState> {
195207
},
196208
];
197209
break;
198-
case 'webmetrics':
210+
case 'AxTree':
199211
steps = [
200212
{
201-
title: 'Webmetrics Tab',
202-
element: '.web-metrics-container',
203-
intro: 'This section will show 4 webmetrics for your page when it loads.',
204-
position: 'top',
205-
},
206-
{
207-
title: 'LCP',
208-
element: document.querySelectorAll('.metric')[0],
213+
title: 'Accessibility Tree',
214+
element: '.display',
209215
intro:
210-
'<strong>Largest Contentful Paint</strong><br/>The amount of time it takes for the largest image, video or text block within the viewport to be fully rendered and interactive.',
216+
'<ul><li>Nodes from the accessibility tree have either a role <strong>role</strong> or <strong>internalRole</strong><i><b>Role</b></i> refers to ARIA roles, which indicate the purpose of the element to assistive technologies, like screen readers.All of the nodes rendered in this tree have a role of Role.<i><b>internalRole</b></i> refers to browser-specific roles <strong> Chrome </strong> for its own accessibility processing.<p> Each node is given a property labeled <strong>ignored</strong>. Nodes read by the screen reader have their ignored property evaluate to <strong>false</strong>.Nodes not read by the screen reader evaluate to <strong>true</strong>.</p><p> Nodes labeled as <strong>no name</strong> are visible to a screen reader, but were not given a name label.</p></li></ul>',
211217
position: 'top',
212218
},
213-
219+
];
220+
break;
221+
case 'webmetrics':
222+
steps = [
214223
{
215-
title: 'FID',
216-
element: document.querySelectorAll('.metric')[1],
217-
intro:
218-
'<strong>First Input Delay</strong><br/>A measurement of load responsiveness, the time from the first user interaction (for example, a click) to the browser responding to that interaction.',
224+
title: 'Webmetrics Tab',
225+
element: '.web-metrics-container',
226+
intro: 'Additional info can be found be hovering over desired metrics',
219227
position: 'top',
220228
},
229+
// {
230+
// title: 'LCP',
231+
// element: document.querySelectorAll('.metric')[0],
232+
// intro:
233+
// '<strong>Largest Contentful Paint</strong><br/>The amount of time it takes for the largest image, video or text block within the viewport to be fully rendered and interactive.',
234+
// position: 'top',
235+
// },
221236

222-
{
223-
title: 'FCP',
224-
element: document.querySelectorAll('.metric')[2],
225-
intro:
226-
'<strong>First Contentful Paint</strong><br/>The amount of time it takes to render the first DOM element of any variety',
227-
position: 'top',
228-
},
237+
// {
238+
// title: 'FID',
239+
// element: document.querySelectorAll('.metric')[1],
240+
// intro:
241+
// '<strong>First Input Delay</strong><br/>A measurement of load responsiveness, the time from the first user interaction (for example, a click) to the browser responding to that interaction.',
242+
// position: 'top',
243+
// },
229244

230-
{
231-
title: 'TTFB',
232-
element: document.querySelectorAll('.metric')[3],
233-
intro:
234-
"<strong>Time To First Byte</strong><br/>The amount of time it takes for a user's browser to receive the first byte of page content from the server.",
235-
position: 'top',
236-
},
245+
// {
246+
// title: 'FCP',
247+
// element: document.querySelectorAll('.metric')[2],
248+
// intro:
249+
// '<strong>First Contentful Paint</strong><br/>The amount of time it takes to render the first DOM element of any variety',
250+
// position: 'top',
251+
// },
252+
253+
// {
254+
// title: 'TTFB',
255+
// element: document.querySelectorAll('.metric')[3],
256+
// intro:
257+
// "<strong>Time To First Byte</strong><br/>The amount of time it takes for a user's browser to receive the first byte of page content from the server.",
258+
// position: 'top',
259+
// },
237260
];
238261
break;
239262
case 'history':
@@ -247,7 +270,7 @@ export default class Tutorial extends Component<TutorialProps, TutorialState> {
247270
},
248271
{
249272
title: 'Viewing History Snapshot',
250-
element: document.querySelectorAll('.snapshotNode')[0],
273+
element: '.node active',//document.querySelectorAll('.snapshotNode')[0]
251274
intro:
252275
'Each node will represent a snapshot in the page. <ul><li>A single snapshot will show as a node while multiple snapshots will be represented as a timeline.</li><li>Highlighting over one will show any state changes compared to the previous snapshot. </li><li>Clicking a node will set the snapshot as the current one.</li></ul>',
253276
position: 'top',

src/app/components/StateRoute/AxMap/Ax.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState, useRef } from 'react';
1+
import React, { useState, useRef, useEffect } from 'react';
22
import { useDispatch } from 'react-redux';
33
import { Group } from '@visx/group';
44
import { hierarchy, Tree } from '@visx/hierarchy';
@@ -9,7 +9,7 @@ import { useTooltip, useTooltipInPortal, defaultStyles } from '@visx/tooltip';
99
import ToolTipDataDisplay from './ToolTipDataDisplay';
1010
import { ToolTipStyles } from '../../../FrontendTypes';
1111
import { localPoint } from '@visx/event';
12-
import { toggleExpanded } from '../../../slices/mainSlice';
12+
import { toggleExpanded, setCurrentTabInApp } from '../../../slices/mainSlice';
1313

1414
const defaultMargin = {
1515
top: 30,
@@ -93,6 +93,7 @@ export default function AxTree(props) {
9393
sizeHeight = innerWidth;
9494
}
9595

96+
9697
const LinkComponent = getLinkComponent({ linkType, orientation });
9798

9899
const currAxSnapshot = JSON.parse(JSON.stringify(axSnapshots[currLocation.index]));
@@ -147,6 +148,10 @@ export default function AxTree(props) {
147148
// Conditionally render ax legend component (RTK)
148149
const dispatch = useDispatch();
149150

151+
useEffect(() => {
152+
dispatch(setCurrentTabInApp('Axtree')); // dispatch sent at initial page load allowing changing
153+
}, [dispatch]);
154+
150155
return totalWidth < 10 ? null : (
151156
<div>
152157
<div className='axControls'>

src/app/components/StateRoute/AxMap/axLinkControls.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ const AxLinkControls = ({
1515
const dispatch = useDispatch();
1616
const disableAxTree = () => {
1717
dispatch(toggleAxTree('toggleAxRecord'));
18-
dispatch(setCurrentTabInApp('AxTree'));
1918
setShowTree(false);
2019
setShowParagraph(true);
2120
};

src/app/components/StateRoute/StateRoute.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ const StateRoute = (props: StateRouteProps) => {
4242

4343
const enableAxTreeButton = () => {
4444
dispatch(toggleAxTree('toggleAxRecord'));
45-
dispatch(setCurrentTabInApp('AxTree'));
4645
setShowParagraph(false);
4746
setShowTree(true);
4847
};

src/app/containers/TravelContainer.tsx

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ import {
1313
import { useDispatch, useSelector } from 'react-redux';
1414
import { MainState, RootState, TravelContainerProps } from '../FrontendTypes';
1515
import { Button } from '@mui/material';
16-
import FastRewindIcon from '@mui/icons-material/FastRewind';
17-
import FastForwardIcon from '@mui/icons-material/FastForward';
1816

1917
/*
2018
This container renders the time-travel play button, seek bar, playback controls, and the playback speed dropdown, located towards the bottom of the application, above the locked, download, upload, and tutorial buttons
@@ -87,27 +85,8 @@ function TravelContainer(props: TravelContainerProps): JSX.Element {
8785
>
8886
{playing ? 'Pause' : 'Play'}
8987
</Button>
90-
<Button
91-
variant='contained'
92-
className='backward-button'
93-
onClick={() => dispatch(moveBackward(false))}
94-
type='button'
95-
sx={{ height: 25, minWidth: 30, p: 0, mr: 1 }}
96-
aria-label='Backward'
97-
>
98-
<FastRewindIcon className='backward-button-icon' />
99-
</Button>
100-
<Button
101-
variant='contained'
102-
className='forward-button'
103-
onClick={() => dispatch(moveForward(false))}
104-
type='button'
105-
sx={{ height: 25, minWidth: 30, p: 0 }}
106-
aria-label='Forward'
107-
>
108-
<FastForwardIcon className='forward-button-icon' />
109-
</Button>
11088
<Dropdown speeds={speeds} selectedSpeed={selectedSpeed} setSpeed={setSpeed} />
89+
11190
</div>
11291
);
11392
}

src/app/styles/components/_buttons.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@
8787
border-radius: 5px;
8888
}
8989

90-
.backward-button-icon,
91-
.forward-button-icon {
92-
color: $scrub-icon;
93-
}
90+
// .backward-button-icon,
91+
// .forward-button-icon {
92+
// color: $scrub-icon;
93+
// }
9494

9595
.forward-button:hover,
9696
.backward-button:hover {

0 commit comments

Comments
 (0)