Edit Trip Implementation#73
Merged
Merged
Conversation
Two bugs: 1. Form input boxes should be value instead of placeholder when editing a trip. 2. The list of collaborators shows up in each individual box rather than one in each box.
…d for either placeholder or defaultValue props.
…e values rather than placeholders.
…ause duplicate current users when saving trip. Fix invlolves removing current user from list of collaborators when editting collaborator and add Issue #71 to let collaborators remove themselves from a trip.
…e for ease of use anywhere in component class.
This reverts commit 6ac1b0c.
anan-ya-y
requested changes
Jul 21, 2020
anan-ya-y
reviewed
Jul 21, 2020
anan-ya-y
approved these changes
Jul 21, 2020
…ure default value works for date form inputs.
keiffer01
requested changes
Jul 21, 2020
HiramSilvey
requested changes
Jul 21, 2020
Base automatically changed from
edit-trip-modal-infra
to
rename-add-trip-component
July 21, 2020 22:09
Collaborator
Author
I think I have already been doing this in all of my PRs. But I will make sure to do another sweep to make sure I didn't miss any annotations. |
keiffer01
approved these changes
Jul 21, 2020
HiramSilvey
approved these changes
Jul 24, 2020
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What is a quick description of the change?
Adds to the infrastructure in #70 to allow a user to edit an existing trip in the 'Edit Trip' modal when clicking on the 'Edit Trip' button for a trip.
Is this fixing an issue?
fixes #69.
Are there more details that are relevant?
The main addition of this PR is to the
ViewTripsdirectory with the following files:index.js:showEditTripModalpassed down to TripContainer and Trip to be called with that trips id and data soSaveTripModalcan be loaded with default values from the current trip data.placeholderObjrename todefaultformObjfor accuracy.showAddTripModalremoved as there are placeholders for empty form inputs in both types of modals.save-trip-modal.js:defaultValueprops that are used for edit trip modal but not for add trip.collaboratorsRefArrsuch that an add trip modal displays one empty input box for collaborators and edit trip shows all collaborators except for current user (Capability for Current User to Leave a Trip #71 to remove current user later).trip-container.jsandtrip.js: Changes so that current trip info is passed in usable format toshowEditTripModal-->SaveTripModal.Check lists (check
xin[ ]of list items)No additional unit tests were written because the
SaveTripModalcomponent uses the same (logical / non-React generating) code as AddTripModal for adding and editing trips with slight modifications to the code responsible for rendering the React Bootstrap form.As of now, integration (end-to-end) tests were deemed non-critical. Thus, functions related to react and firestore will be tested at a later time. Unit tests for "logical" functions will be included in this PR and for the remaining PRs needed to complete the MVP.
Any additional comments?
GIF walking through editing a trip:
