-
Notifications
You must be signed in to change notification settings - Fork 56
New saved place UI #1388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+119
−130
Merged
New saved place UI #1388
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
c17ec43
add specific classes to trip panel
amy-corson-ibigroup 08810be
update styling for Saved Places
amy-corson-ibigroup cd4f1fe
match the original styling more closely
amy-corson-ibigroup 4930b66
clean up place css
amy-corson-ibigroup 6cbced4
Delete place from edit page
amy-corson-ibigroup 5ae213d
nvm dont mess with css
amy-corson-ibigroup d4bfc75
Update lib/components/user/places/favorite-place-list.js
amy-corson-ibigroup dc8ec09
Update lib/components/user/places/favorite-place-screen.js
amy-corson-ibigroup 8c62b9b
fix i18n conditional rendering
amy-corson-ibigroup 346f288
Merge branch 'new-saved-place-ui' of https://github.com/opentripplann…
amy-corson-ibigroup 434e7a6
fix i18n strings
amy-corson-ibigroup 150696f
Remove mobile specific button layout on save place screen
amy-corson-ibigroup 97e214b
Merge branch 'dev' into new-saved-place-ui
amy-corson-ibigroup b9d7f76
remove unnecessary mobile components
amy-corson-ibigroup c32db8d
Merge branch 'new-saved-place-ui' of https://github.com/opentripplann…
amy-corson-ibigroup dc2dcec
Conditionally render language strings in a way that passes test
amy-corson-ibigroup 9ce06e4
Merge branch 'dev' into new-saved-place-ui
amy-corson-ibigroup 012b4ea
Clean up
amy-corson-ibigroup 2947ba0
Merge branch 'new-saved-place-ui' of https://github.com/opentripplann…
amy-corson-ibigroup File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -250,7 +250,7 @@ | |
} | ||
|
||
@media (max-width: 768px){ | ||
.panel-default { | ||
.saved-trip-panel .panel-default { | ||
width: 90%; | ||
} | ||
} | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,82 +1,81 @@ | ||
import Link from '../../util/link' | ||
import styled from 'styled-components' | ||
|
||
import { GREY_ON_WHITE } from '../../util/colors' | ||
|
||
import Place, { | ||
ActionButton, | ||
ActionButtonPlaceholder, | ||
IconWrapper, | ||
PlaceButton, | ||
PlaceContainer, | ||
PlaceContent, | ||
PlaceDetail, | ||
PlaceLink, | ||
PlaceName | ||
} from './place' | ||
|
||
// Styles and exports for favorite place components | ||
// used in the My account page. | ||
|
||
const FAVORITE_PLACE_HEIGHT_PX = '60px' | ||
|
||
export const StyledFavoritePlace = styled(Place).attrs({ | ||
largeIcon: true | ||
})` | ||
align-items: stretch; | ||
display: flex; | ||
height: ${FAVORITE_PLACE_HEIGHT_PX}; | ||
margin-bottom: 10px; | ||
${PlaceLink} { | ||
${PlaceContainer} { | ||
align-items: center; | ||
display: flex; | ||
flex: 1 0 0; | ||
text-align: left; | ||
display: grid; | ||
font-size: 14px; | ||
gap: 15px; | ||
grid-template-columns: 30px auto 30px; | ||
padding: 10px; | ||
} | ||
${PlaceContent} { | ||
display: flex; | ||
flex: 1 0 0; | ||
flex-direction: column; | ||
margin-left: 10px; | ||
/* overflow is needed here for the nested overflow to take effect. */ | ||
overflow: hidden; | ||
} | ||
${PlaceDetail} { | ||
color: ${GREY_ON_WHITE}; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
white-space: nowrap; | ||
width: 100%; | ||
} | ||
${PlaceName}, | ||
${PlaceDetail} { | ||
display: block; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
white-space: nowrap; | ||
width: 100%; | ||
} | ||
${IconWrapper} { | ||
color: ${GREY_ON_WHITE}; | ||
flex-shrink: 0; | ||
} | ||
${ActionButton}, ${ActionButtonPlaceholder} { | ||
margin-left: 4px; | ||
width: ${FAVORITE_PLACE_HEIGHT_PX}; | ||
} | ||
` | ||
|
||
// Styles and exports for the place component | ||
// used in the main panel. | ||
|
||
export const StyledMainPanelPlace = styled(Place)` | ||
${PlaceButton} { | ||
background: none; | ||
border: none; | ||
&:hover { | ||
background-color: #e6e6e6; | ||
} | ||
} | ||
${PlaceName} { | ||
margin-left: 0.25em; | ||
} | ||
${PlaceDetail} { | ||
display: block; | ||
height: 100%; | ||
} | ||
${ActionButton} { | ||
border: none; | ||
width: 40px; | ||
} | ||
` | ||
|
||
export const NewPlaceButton = styled(Link)` | ||
align-items: center; | ||
display: flex; | ||
margin-top: 15px; | ||
width: fit-content; | ||
gap: 10px; | ||
` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Unchanged files with check annotations Beta
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Field, Form, Formik } from 'formik' | ||
import React, {Component} from 'react' | ||
import { | ||
Button, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createAction } from 'redux-actions' | ||
if (typeof (fetch) === 'undefined') require('isomorphic-fetch') | ||
export const receivedZipcarLocationsError = createAction('ZIPCAR_LOCATIONS_ERROR') | ||
export const receivedZipcarLocationsResponse = createAction('ZIPCAR_LOCATIONS_RESPONSE') | ||
export const requestZipcarLocationsResponse = createAction('ZIPCAR_LOCATIONS_REQUEST') | ||
export function zipcarLocationsQuery (url) { | ||
return async function (dispatch, getState) { | ||
dispatch(requestZipcarLocationsResponse()) | ||
let json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { replace, push } from 'connected-react-router' | ||
import { setPathBeforeSignIn } from '../actions/user' | ||
* @param {Error} err | ||
* @param {AccessTokenRequestOptions} options | ||
*/ | ||
export function showAccessTokenError (err, options) { | ||
return function (dispatch, getState) { | ||
// TODO: improve this. | ||
console.error('Failed to retrieve access token: ', err) | ||
* when signing-in fails for some reason. | ||
* @param {Error} err | ||
*/ | ||
export function showLoginError (err) { | ||
return function (dispatch, getState) { | ||
// TODO: improve this. | ||
if (err) dispatch(push('/oops')) | ||
* @param {Object} appState The state stored when calling useAuth0().loginWithRedirect | ||
* or when instantiating a component that uses withAuhenticationRequired. | ||
*/ | ||
export function processSignIn (appState) { | ||
return function (dispatch, getState) { | ||
if (appState && appState.returnTo) { | ||
// Remove URL parameters that were added by auth0-react |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: Can we change this to an enum? Magic strings are annoying
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm actually going to change the way we handle toasts in imminent follow up PR 🙃