Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into HEAD
  • Loading branch information
mvance43776 committed Mar 13, 2020
2 parents e3aa001 + 89dae3e commit 05dfb79
Show file tree
Hide file tree
Showing 18 changed files with 127 additions and 206 deletions.
39 changes: 39 additions & 0 deletions ISSUE_TEMPLATE.mdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Issue Overview

## What are you trying to do?



## What did you expect to happen?



## What actually happened?



## Steps to Reproduce

1.
1.
1.

# Issue Details

## Web/Mobile?

- [ ] Web
- [ ] Mobile

## Please provide the browser (for web) and/or mobile device (for mobile):



## Provide the page URL where you encountered the issue:



## Provide a screenshot and/or the screen resolution when encountering the issue:



2 changes: 1 addition & 1 deletion src/_App.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ body {
supported by Chrome and Opera */
}

input {
input, select {
border-radius: 0;
-webkit-appearance: none;
}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Home/MapPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ADD_MULTIPLE_PLACES } from "../../GraphQL";

import { TravelScoreCalculator } from "../../TravelScore";
import CountryMap from "./subcomponents/CountryMap";
import CityMap from "./subcomponents/CityMapTrialConst";
import CityMap from "./subcomponents/CityMap";
import Loader from "../../components/common/Loader/Loader";

const MapPage = ({
Expand Down
30 changes: 30 additions & 0 deletions src/pages/Home/_MapPage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -286,5 +286,35 @@
cursor: pointer;
}
}
.country-svg {
fill: #6E7377;
stroke: rgb(100, 100, 100);
stroke-width: 0.75;
outline: none;
&:hover {
fill: rgb(180, 180, 180);
stroke: rgb(180, 180, 180);
stroke-width: 0.75;
outline: none;
}
&:active {
fill: #a7e1ff;
stroke: #a7e1ff;
stroke-width: 0.75;
outline: none;
}
}
.past-country-fill {
fill: #CB7678;
}
.future-country-fill {
fill: #73A7C3;
}
.live-country-fill {
fill: #96B1A8;
}
.past-future-country-fill {
fill: #a780cd;
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import PopupPrompt from "../../../components/Prompts/PopupPrompt";
import NewUserSuggestions from "./NewUserSuggestions";
import ClusterMarker from "./ClusterMarker";

function CityMapTrialConst(props) {
function CityMap(props) {
const [viewport, handleViewport] = useState({
width: window.innerWidth,
height: window.innerHeight,
Expand Down Expand Up @@ -1124,7 +1124,7 @@ function CityMapTrialConst(props) {
);
}

CityMapTrialConst.propTypes = {
CityMap.propTypes = {
tripData: PropTypes.object,
handleMapTypeChange: PropTypes.func,
deleteCity: PropTypes.func,
Expand All @@ -1141,4 +1141,4 @@ ClusterMarker.propTypes = {
onClick: PropTypes.func
};

export default CityMapTrialConst;
export default CityMap;
107 changes: 19 additions & 88 deletions src/pages/Home/subcomponents/FriendCountryMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,96 +169,27 @@ const FriendCountryMap = props => {
}
}
}
let countryStyles = {
default: {
fill: "#6E7377",
stroke: "rgb(100, 100, 100)",
strokeWidth: 0.75,
outline: "none"
},
hover: {
fill: "rgb(180, 180, 180)",
stroke: "rgb(180, 180, 180)",
strokeWidth: 0.75,
outline: "none"
},
pressed: {
fill: "#a7e1ff",
stroke: "#a7e1ff",
strokeWidth: 0.75,
outline: "none"
}
};

if (isCountryIncluded) {
let countryTimingArraySorted = countryTimingArray.sort((a, b) => a - b);
switch (countryTimingArraySorted.join()) {
case "0":
if (activeTimings[0]) {
countryStyles.default.fill = "#CB7678";
}
break;
case "1":
if (activeTimings[1]) {
countryStyles.default.fill = "#73A7C3";
}
break;
case "2":
if (activeTimings[2]) {
countryStyles.default.fill = "#96B1A8";
}
break;
case "0,1":
if (activeTimings[0] && activeTimings[1]) {
countryStyles.default.fill = "#a780cd";
} else if (activeTimings[0]) {
countryStyles.default.fill = "#CB7678";
} else if (activeTimings[1]) {
countryStyles.default.fill = "#73A7C3";
}
break;
case "0,2":
if (activeTimings[0] && activeTimings[2]) {
countryStyles.default.fill = "#96B1A8";
} else if (activeTimings[0]) {
countryStyles.default.fill = "#CB7678";
} else if (activeTimings[2]) {
countryStyles.default.fill = "#96B1A8";
}
break;
case "1,2":
if (activeTimings[1] && activeTimings[2]) {
countryStyles.default.fill = "#96B1A8";
} else if (activeTimings[1]) {
countryStyles.default.fill = "#73A7C3";
} else if (activeTimings[2]) {
countryStyles.default.fill = "#96B1A8";
}
break;
case "0,1,2":
if (activeTimings[0] && activeTimings[1]) {
if (activeTimings[2]) {
countryStyles.default.fill = "#96B1A8";
} else {
countryStyles.default.fill = "#a780cd";
}
} else if (activeTimings[0] && activeTimings[2]) {
countryStyles.default.fill = "#96B1A8";
} else if (activeTimings[1] && activeTimings[2]) {
countryStyles.default.fill = "#96B1A8";
} else if (activeTimings[0]) {
countryStyles.default.fill = "#DBC071";
} else if (activeTimings[1]) {
countryStyles.default.fill = "#73A7C3";
} else if (activeTimings[2]) {
countryStyles.default.fill = "#96B1A8";
}
break;
default:
break;
let filteredTimings = countryTimingArray.filter(
timing => activeTimings[timing] !== false
);
if (filteredTimings.indexOf(2) !== -1) {
return "country-svg live-country-fill";
} else if (
filteredTimings.length === 1 &&
filteredTimings.indexOf(0) !== -1
) {
return "country-svg past-country-fill";
} else if (
filteredTimings.length === 1 &&
filteredTimings.indexOf(1) !== -1
) {
return "country-svg future-country-fill";
} else if (filteredTimings.length === 2) {
return "country-svg past-future-country-fill";
}
}
return countryStyles;
return "country-svg";
}

function handleClickedCountry(geography) {
Expand Down Expand Up @@ -373,7 +304,7 @@ const FriendCountryMap = props => {
projection={projection}
onMouseEnter={() => countryInfo(geography)}
onClick={() => handleClickedCountry(geography)}
style={computedStyles(geography)}
className={computedStyles(geography)}
/>
))
}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Home/subcomponents/FriendReadonlyCountry.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ const FriendReadonlyCountry = props => {
} else if (activeTimings[1] && activeTimings[2]) {
countryStyles.default.fill = "#8caeb0";
} else if (activeTimings[0]) {
countryStyles.default.fill = "#DBC071";
countryStyles.default.fill = "#CB7678";
} else if (activeTimings[1]) {
countryStyles.default.fill = "#73A7C3";
} else if (activeTimings[2]) {
Expand Down
16 changes: 1 addition & 15 deletions src/pages/Home/subcomponents/LeaderboardCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,7 @@ import { NavLink, withRouter } from "react-router-dom";
import UserAvatar from "../../../components/UserAvatar/UserAvatar";

function LeaderboardCard({ user, rank }) {
function handleFontSize() {
console.log(user.username);
if (user.username.length < 13) {
console.log(user.username);
return "18px";
} else if (user.username.length < 16) {
return "16px";
} else if (user.username.length < 18) {
return "14px";
} else if (user.username.length < 24) {
return "12px";
} else {
return "10px";
}
}

return (
<NavLink
to={{
Expand Down
25 changes: 18 additions & 7 deletions src/pages/Home/subcomponents/_CityMap.scss
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@
}
@media screen and (max-width: 500px) {
min-width: 350px;
transform: translateX(20px);
}
@media screen and (max-width: 450px) {
min-width: 300px;
Expand All @@ -391,8 +392,8 @@
min-width: 280px;
}
@media screen and (max-width: 320px) {
max-width: 300px;
min-width: 300px;
max-width: 260px;
min-width: 260px;
}

input {
Expand Down Expand Up @@ -436,6 +437,9 @@
@media screen and (max-height: 1000px) {
bottom: 20px;
}
@media screen and (max-width: 500px) {
left: calc(50% - 80px);
}
@media screen and (max-height: 400px) {
left: calc(50% + 240px);
bottom: 20px;
Expand Down Expand Up @@ -502,6 +506,9 @@
flex-direction: column;
font-size: 24px;
}
@media screen and (max-width: 500px) {
left: calc(50% - 280px);
}
select {
background: none;
border: none;
Expand All @@ -525,7 +532,7 @@
top: 60px;
color: #769f93;
background: $light-green;
box-shadow: 0 0 14px 2px rgba(255, 225, 167, 0.75);
box-shadow: 0 0 14px 2px rgba(197, 238, 143, 0.75);
svg {
margin-left: 6px;
fill: #769f93;
Expand All @@ -541,7 +548,7 @@
left: calc(50% - 210px);
}
@media screen and (max-width: 500px) {
left: calc(50% - 60px);
left: calc(50% - 40px);
}
}

Expand Down Expand Up @@ -571,7 +578,7 @@
left: calc(50% + 160px);
}
@media screen and (max-width: 500px) {
left: calc(50% + 8px);
left: calc(50% + 28px);
}
}

Expand Down Expand Up @@ -654,9 +661,9 @@
#sc-controls-city-side-menu {
display: flex;
flex-direction: column;
width: 80px;
width: 60px;
height: 48px;
left: 85px;
left: 95px;
top: 320px;
}

Expand All @@ -678,4 +685,8 @@
transform: translate(-40px, 140px);
}
}
}

.mapboxgl-ctrl-geocoder--icon-close {
margin-top: 4px;
}
2 changes: 1 addition & 1 deletion src/pages/Home/subcomponents/_NewUserCity.scss
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@
overflow-x: hidden; /* Disable horizontal scroll */
padding-top: 60px; /* Place content 60px from the top */
transition: 0.5s; /* 0.5 second transition effect to slide in the sidenav */
z-index: 5000;
z-index: 1000;
a {
padding: 8px 8px 8px 32px;
text-decoration: none;
Expand Down
2 changes: 0 additions & 2 deletions src/pages/Place/PlaceReviewCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ function PlaceReviewCard({
default:
break;
}
console.log(user);
let filteredArray = user.CityReviews.filter(review => {
for (let i in keyWords) {
if (review.attraction_type === keyWords[i]) {
Expand All @@ -83,7 +82,6 @@ function PlaceReviewCard({
}
return false;
});
console.log(filteredArray);
handleFilteredCityReviews(filteredArray);
handleLoaded(true);
}, [page]);
Expand Down
Loading

0 comments on commit 05dfb79

Please sign in to comment.