Skip to content

Commit 989a6f7

Browse files
authored
Merge pull request #11 from oslabs-beta/ui-bugs
Ui bugs
2 parents 0dce8f7 + 84805df commit 989a6f7

File tree

4 files changed

+7
-11
lines changed

4 files changed

+7
-11
lines changed

src/app/components/Action.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ import PropTypes from 'prop-types';
33

44
import { changeView, changeSlider } from '../actions/actions';
55

6-
// BUG FIX:
7-
// changeSlider should also respond to the click event on the div
6+
// Launch Feature: Figure out changeView vs changeSlider
7+
// Should we make the btn bigger instead and keep the functionality?
8+
// div onclick event triggers the changeView method
89

910
const Action = props => {
1011
const {

src/app/components/Diff.jsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@ import ReactHtmlParser from 'react-html-parser';
55

66
import { useStoreContext } from '../store';
77

8-
// FIX: Update the div copy to something more explanatory
9-
108
function Diff({ snapshot, show }) {
11-
const [mainState] = useStoreContext();
9+
const [ mainState ] = useStoreContext();
1210
const { currentTab, tabs } = mainState;
1311
const { snapshots, viewIndex, sliderIndex } = tabs[currentTab];
1412
let previous;
@@ -26,7 +24,7 @@ function Diff({ snapshot, show }) {
2624
if (show) formatters.html.showUnchanged();
2725
else formatters.html.hideUnchanged();
2826

29-
if (previous === undefined || delta === undefined) return <div> states are equal </div>;
27+
if (previous === undefined || delta === undefined) return <div> No state change detected. </div>;
3028
return (
3129
<div>
3230
{ ReactHtmlParser(html) }

src/app/components/SwitchApp.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { useStoreContext } from '../store';
44
import { setTab } from '../actions/actions';
55

66

7-
// BUG FIX: Fix the dropdown styling to make it more distinguishable
7+
// Launch Feature: Fix the dropdown styling to make it more distinguishable
88

99
const SwitchAppDropdown = () => {
1010
const [{ currentTab, tabs }, dispatch] = useStoreContext();

src/app/containers/ActionContainer.jsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@ import Action from '../components/Action';
55
import { emptySnapshots } from '../actions/actions';
66
import { useStoreContext } from '../store';
77

8-
// MVP Feature: Include a dropdown functionality
9-
// to show stateful/functional/Context API differentiation
10-
// May want to add another child component to the container
11-
8+
// Launch: render a dropdown filterable list
129
function ActionContainer() {
1310
const [{ tabs, currentTab }, dispatch] = useStoreContext();
1411
const { snapshots, sliderIndex, viewIndex } = tabs[currentTab];

0 commit comments

Comments
 (0)