Skip to content

Commit 958140a

Browse files
authored
Merge pull request #16 from oslabs-beta/feature/garrett
Feature/garrett
2 parents 6efed94 + 29203cd commit 958140a

File tree

16 files changed

+76
-1450
lines changed

16 files changed

+76
-1450
lines changed

src/app/components/Buttons/Tutorial.tsx

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -195,12 +195,6 @@ export default class Tutorial extends Component<TutorialProps, TutorialState> {
195195
'<ul><li>Here we can analyze the render times of our app</li> <li>This is the current series of state changes within our app</li> <li>Mouse over the bargraph elements for details on each specific component</li></ul>',
196196
position: 'top',
197197
},
198-
{
199-
title: 'Saving Series & Actions',
200-
element: '.save-series-button',
201-
intro: '<ul><li>Click here to save your current series data</li></ul>',
202-
position: 'top',
203-
},
204198
{
205199
title: 'Saving Series & Actions',
206200
element: '#seriesname',
@@ -214,13 +208,7 @@ export default class Tutorial extends Component<TutorialProps, TutorialState> {
214208
'<ul><li>If we wish to save a specific action to compare later, give it a name here</li></ul>',
215209
position: 'top',
216210
},
217-
{
218-
title: 'Saving Series & Actions',
219-
element: '.save-series-button',
220-
intro:
221-
'<ul><li>Press save series again.</li> <li>Your series and actions are now saved!</li></ul>',
222-
position: 'top',
223-
},
211+
224212
{
225213
title: 'Comparison Tab',
226214
element: '#router-link-performance-comparison',

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

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -121,51 +121,9 @@ const BarGraph = (props: BarGraphProps): JSX.Element => {
121121
data,
122122
};
123123

124-
useEffect(() => {
125-
// Animates the save series button.
126-
const saveButtons = document.getElementsByClassName('save-series-button'); // finds the buttom in the DOM
127-
for (let i = 0; i < saveButtons.length; i++) {
128-
if (tabs[currentTab].seriesSavedStatus === 'saved') {
129-
saveButtons[i].classList.add('animate');
130-
saveButtons[i].innerHTML = 'Saved!';
131-
} else {
132-
saveButtons[i].innerHTML = 'Save Series';
133-
saveButtons[i].classList.remove('animate');
134-
}
135-
}
136-
});
137-
138-
const saveSeriesClickHandler = () => {
139-
// function to save the currently selected series
140-
if (tabs[currentTab].seriesSavedStatus === 'inputBoxOpen') {
141-
const actionNames = document.getElementsByClassName('actionname');
142-
for (let i = 0; i < actionNames.length; i += 1) {
143-
toStorage.data.barStack[i].name = actionNames[i].value;
144-
}
145-
dispatch(save({ newSeries: toStorage, newSeriesName: seriesNameInput })); // saves the series under seriesName
146-
setSeriesNameInput(`Series ${comparison.length}`); // sends a reducer that saves the series/toStorage object the user wants to chrome local storage
147-
return;
148-
}
149-
//if for some reason, code doesn't hit in first conditional, we have error handling below to account it
150-
dispatch(save({ newSeries: toStorage, newSeriesName: '' })); // or use a default value for newSeriesName
151-
};
152-
153-
const textbox = // Need to change so textbox isn't empty before saving
154-
tabs[currentTab].seriesSavedStatus === 'inputBoxOpen' ? (
155-
<input
156-
type='text'
157-
id='seriesname'
158-
placeholder='Enter Series Name'
159-
onChange={(e) => setSeriesNameInput(e.target.value)}
160-
/>
161-
) : null;
162124
return (
163125
<div className='bargraph-position'>
164126
<div className='saveSeriesContainer'>
165-
{textbox}
166-
<button type='button' className='save-series-button' onClick={saveSeriesClickHandler}>
167-
Save Series
168-
</button>
169127
<form className='routesForm' id='routes-formcontrol'>
170128
<label id='routes-dropdown'>Select Route: </label>
171129
<select

0 commit comments

Comments
 (0)