-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: Tracks saving #271
feat: Tracks saving #271
Conversation
…nto feat/save-track
…eet modal, and fixed padding in discription input
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.
My previous comment about the custom navigation header that's used in the save tracks screen seems to have been overlooked. that's probably the biggest blocker on my end right now.
Also had a UX question about something i ran into when testing this in the app.
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.
@CDFN @bohdanprog highlighting this in case this got lost in the first review
EDIT: Github does a terrible job of re-surfacing this, so adding the direct comment link
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.
Besides my 2 comments, and andrew's comments, looks good to me.
I have noticed some architecture changes related to the location provider that I think we need to revert, but I will create an issue for that.
I realize that we are not persisting the tracks (after the track has been taken). I added a comment below
navigation, | ||
}) => { | ||
const {formatMessage: t} = useIntl(); | ||
const [description, setDescription] = useState(''); |
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.
We want to persist the description in case the user closes their phone. instead of using setDescription
use updateTags('notes', newVal); and instead of description use const notes = usePersistedDraftObservation(store => store.value?.tags.notes)
If the user has stopped "tracking" but is in the middle of saving it (aka they are on We should follow a similar pattern with tracks. Instead of saving locationHistory to plain zustand state we should save it to persisted state. Also, when the app open we want to do a check to see if ^^When we do this changes the navigation behaviour. When the hit save, they will be navigated to the map. But the user will now be able to press the back button and go back to the saveTrackScreen. So we need to prevent this by resetting the nav stack on save. |
src/frontend/screens/MapScreen/track/saveTrack/DiscardTrackModal.tsx
Outdated
Show resolved
Hide resolved
@ErikSin thoughts on this being a follow-up to this PR? The scope of changes required to get the above working might be large enough to warrant a separate PR to make it easier to review. Not sure if @CDFN @bohdanprog have already started making changes here towards that but if they haven't, would put it into consideration |
Yeah, that sounds good. I do think we should do this sooner, rather than later as it will effect the subsequent Pr, but I think separating it makes sense. |
yeah agreed - would it be helpful to create an issue that details the needed changes that Erik described @CDFN @bohdanprog ? |
I got some changes but it's fairly easy to move it to another branch. For issue, would be great to summarize it there if you could. |
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.
Can this comment about the navigation header be addressed before merging?
Otherwise changes seem ready for merging :)
…nto feat/save-track
Hm...but I already changed Header in SaveTrackScreen :D Here is a link :) |
Im going to merge this as I have a PR stacked on this, and I would like to create another PR based on this |
This PR adds hooks for backend communication and implements tracks saving.
Closes #239