Skip to content

Commit ba2db1c

Browse files
fixed Map => Link => Step
1 parent d3b1488 commit ba2db1c

File tree

6 files changed

+11
-9
lines changed

6 files changed

+11
-9
lines changed

src/app/components/StateRoute/ComponentMap/ComponentMap.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export default function ComponentMap({
3939
const [layout, setLayout] = useState('cartesian'); // We create a local state "layout" and set it to a string 'cartesian'
4040
const [orientation, setOrientation] = useState('vertical'); // We create a local state "orientation" and set it to a string 'vertical'.
4141
const [linkType, setLinkType] = useState('diagonal'); // We create a local state "linkType" and set it to a string 'diagonal'.
42-
const [stepPercent, setStepPercent] = useState(10); // We create a local state "stepPercent" and set it to a number '10'.
42+
const [stepPercent, setStepPercent] = useState(0.5); // We create a local state "stepPercent" and set it to a number '0.5'. This will be used to scale the Map component's link: Step to 50%
4343
const [selectedNode, setSelectedNode] = useState('root'); // We create a local state "selectedNode" and set it to a string 'root'.
4444
const [, dispatch] = useStoreContext(); // we destructure the returned context object from the invocation of the useStoreContext function to get access to our dispatch function
4545

src/app/components/StateRoute/ComponentMap/LinkControls.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const collectNodes = (node: Node): void => {
3838
export default function LinkControls({
3939
layout, // from the layout local state (initially 'cartesian') in 'ComponentMap'
4040
linkType, // from linkType local state (initially 'vertical') in 'ComponentMap'
41-
stepPercent, // from stepPercent local state (initially '10') in 'ComponentMap'
41+
stepPercent, // from stepPercent local state (initially '0.5') in 'ComponentMap'
4242
setLayout, // from the layout local state in 'ComponentMap'
4343
setOrientation, // from the orientation local state in 'ComponentMap'
4444
setLinkType, // from the linkType local state in 'ComponentMap'
@@ -63,7 +63,8 @@ export default function LinkControls({
6363
</select>
6464
&nbsp;&nbsp;
6565

66-
<label>Orientation:</label> {/* Controls for the Orientation selection, this dropdown will be disabled when the polar layout is selected as it is not needed */}
66+
<label>Orientation:</label> {/* Toggle record button to pause state changes on target application */}
67+
{/* Controls for the Orientation selection, this dropdown will be disabled when the polar layout is selected as it is not needed */}
6768
&nbsp;
6869
<select
6970
onClick={(e) => e.stopPropagation()}

src/app/components/StateRoute/PerformanceVisx/BarGraphComparison.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,16 @@ const BarGraphComparison = (props: BarGraphComparisonProps): JSX.Element => {
135135

136136
const StyledFormControl = styled(FormControl)(({ theme }) => ({ // applies the theme style to the FormControl component
137137
margin: theme.spacing(1),
138-
minWidth: 80,
138+
minWidth: 160,
139139
height: 30,
140140
}));
141141

142142
const StyledSelect = styled(Select)({ // applies the object to customize the style of the 'Select' component
143143
minWidth: 80,
144-
fontSize: '.75rem',
144+
fontSize: '1.2rem',
145145
fontWeight: 200,
146146
height: 30,
147+
border: '1px solid #da262c',
147148
});
148149

149150
const handleSeriesChange = (event: Event) => {

src/app/containers/MainContainer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function MainContainer(): JSX.Element {
5151
// chrome.runtime allows our application to retrieve our service worker (our eventual bundles/background.bundle.js after running npm run build), details about the manifest, and allows us to listen and respond to events in our application lifecycle.
5252
const currentPort = chrome.runtime.connect(); // we connect to our service worker
5353

54-
setInterval(() => { // interval to keep connection to background.js alive
54+
const keepAliveMainContainer = setInterval(() => { // interval to keep connection to background.js alive
5555
currentPort.postMessage({
5656
action: 'keepAlive' // messages sent to port to keep connection alive
5757
})
@@ -109,7 +109,7 @@ function MainContainer(): JSX.Element {
109109
);
110110

111111
currentPort.onDisconnect.addListener(() => { // used to track when the above connection closes unexpectedly. Remember that it should persist throughout the application lifecycle
112-
console.log('this port is disconnecting line 53');
112+
console.log('this port is disconnecting line 52');
113113
});
114114

115115
dispatch(setPort(currentPort)); // assign port to state so it could be used by other components

src/extension/background.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ chrome.runtime.onConnect.addListener((port) => {
168168
action: 'changeTab',
169169
payload: { tabId: activeTab.id, title: activeTab.title },
170170
})
171-
setInterval(() => { // interval used to keep connection to MainContainer alive
171+
const keepAliveServiceWorker = setInterval(() => { // interval used to keep connection to MainContainer alive
172172
bg.postMessage({
173173
action: 'keepAlive' // messages sent to port to keep connection alive
174174
})

src/extension/contentScript.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ window.addEventListener('message', (msg) => {
1919
// One-time request tells the background script that the tab has reloaded.
2020
chrome.runtime.sendMessage({ action: 'tabReload' });
2121
firstMessage = false;
22-
setInterval(() => { // interval to keep connection to service worker connection alive
22+
const keepAliveContentScript = setInterval(() => { // interval to keep connection to service worker connection alive
2323
chrome.runtime.sendMessage({
2424
action: 'keepAlive' // messages sent to port to keep connection alive
2525
})

0 commit comments

Comments
 (0)