From 12ed908d0ff610ec5e13a6ba70a3abfb6db6ac1b Mon Sep 17 00:00:00 2001 From: Kelly Innes Date: Mon, 4 Mar 2019 10:15:08 -0500 Subject: [PATCH] Create & implement facilities tab - create facilities tab for displaying a text list of facilities - add free text search field to search on name, and country name fields - add functionality to download a CSV of facilities filtered by free text search - update Redux actions to handle toggling & displaying the facilities tab and storing the free text search value - adjust application HTML element hierarchy & style sheet in order to - prevent the enter app from scrolling vertically - enable select components to scroll vertically when necessary --- src/app/src/App.jsx | 21 +- .../__tests__/utils.facilitiesCSV.tests.js | 79 +++++ src/app/src/actions/ui.js | 6 + src/app/src/components/AppGrid.jsx | 1 - src/app/src/components/AppOverflow.jsx | 16 + src/app/src/components/Contribute.jsx | 51 +-- .../src/components/ControlledTextInput.jsx | 4 + src/app/src/components/FacilityListItems.jsx | 101 +++--- src/app/src/components/FacilityLists.jsx | 27 +- src/app/src/components/FilterSidebar.jsx | 55 ++- .../components/FilterSidebarFacilitiesTab.jsx | 328 ++++++++++++++++++ .../src/components/FilterSidebarGuideTab.jsx | 7 +- .../src/components/FilterSidebarSearchTab.jsx | 7 +- src/app/src/components/Footer.jsx | 4 +- src/app/src/components/LoginForm.jsx | 129 +++---- src/app/src/components/MapAndSidebar.jsx | 6 +- src/app/src/components/OARMap.jsx | 2 +- src/app/src/components/RegisterForm.jsx | 83 ++--- src/app/src/components/UserProfile.jsx | 45 +-- src/app/src/reducers/FacilitiesReducer.js | 1 + src/app/src/reducers/UIReducer.js | 42 +++ src/app/src/styles/css/Map.css | 6 +- src/app/src/util/constants.js | 5 + src/app/src/util/propTypes.js | 1 + src/app/src/util/styles.js | 7 + src/app/src/util/util.facilitiesCSV.js | 45 +++ src/django/api/serializers.py | 6 +- 27 files changed, 844 insertions(+), 241 deletions(-) create mode 100644 src/app/src/__tests__/utils.facilitiesCSV.tests.js create mode 100644 src/app/src/components/AppOverflow.jsx create mode 100644 src/app/src/components/FilterSidebarFacilitiesTab.jsx create mode 100644 src/app/src/util/util.facilitiesCSV.js diff --git a/src/app/src/App.jsx b/src/app/src/App.jsx index 1f1eb5baa..92861e192 100644 --- a/src/app/src/App.jsx +++ b/src/app/src/App.jsx @@ -35,11 +35,18 @@ import { profileRoute, } from './util/constants'; -const styles = { - root: { +const appStyles = Object.freeze({ + root: Object.freeze({ flexGrow: 1, - }, -}; + }), + mainPanelStyle: Object.freeze({ + top: '64px', + right: '0', + left: '0', + position: 'fixed', + bottom: '47px', + }), +}); class App extends Component { componentDidMount() { @@ -52,7 +59,7 @@ class App extends Component {
-
+
-
+