Skip to content

Improved GPX Sharing: Share as ZIP #501

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
merged 6 commits into from
Feb 10, 2025
Merged

Conversation

Andyporras
Copy link
Member

@Andyporras Andyporras commented Feb 6, 2025

This update enhances the GPX sharing functionality by introducing the ability to share traces as a ZIP file when associated files (e.g., images or other media) are present. If no associated files are detected, the trace is shared as a standard GPX file. This improvement ensures better handling of additional trace data and facilitates seamless sharing of complete trace information.

This feature was implemented in collaboration with @Kevin-Salazar-itcr and @FR3DD221

- Added functionality to package tracks and associated files into a ZIP file.
- Improved user experience when sharing tracks with complementary resources.
@jamescr
Copy link
Member

jamescr commented Feb 7, 2025

This PR is related with #460 and could be related with #64 and #114.

@jamescr jamescr added this to the 2024.12 --> 2025.02 milestone Feb 7, 2025
- Modified `zipCacheFiles` to ensure it only returns a single ZIP file.
- Updated sharing functionality to exclusively share ZIP files.
- Improved handling of associated files to maintain consistency in file sharing.
@jamescr
Copy link
Member

jamescr commented Feb 7, 2025

It is better to always share a zip file that contain the GPX and the multimedia files (if there are). In this way, the expected behavior of the functionality will be constant. Also, this is a step towards implementing #64 but as a separate PR.

Fixed a bug where the filename would be duplicated when sharing a trace. The issue was caused by comparing the name with the trace start date instead of the creation date. Now, the correct comparison ensures the filename is properly assigned.
@jamescr jamescr changed the title Improved GPX Sharing: Share as ZIP When Trace Has Associated Files Improved GPX Sharing: Share as ZIP ~~When Trace Has Associated Files~~ Feb 7, 2025
@jamescr jamescr changed the title Improved GPX Sharing: Share as ZIP ~~When Trace Has Associated Files~~ Improved GPX Sharing: Share as ZIP Feb 7, 2025
@miltonials
Copy link
Member

Hi @Andyporras !👋🏼 I tested your PR with API25 and API35 and works well. However, I noticed that when the trace has too many files associated the app stops while it is generating the .zip (normally a few seconds according to the total size of mulmedia files), this might affect if the user has another tracking in process.

I do not know if it is relevant to implement it asynchronously and display a message indicating that the application is generating the zip file. @jamescr @Binnette

Copy link
Member

@jamescr jamescr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have some refactoring comments to improve the code. Please take a look. While I was reviewing the code, I implemented the suggested changes in this PR in case you want to use it.

@jamescr
Copy link
Member

jamescr commented Feb 10, 2025

I do not know if it is relevant to implement it asynchronously and display a message indicating that the application is generating the zip file. @jamescr @Binnette

I think is relevant to implement it asynchronously.

@Andyporras
Copy link
Member Author

ready, I made a commit with the suggested changes, plus I added the if that fixes the bug I told you about.

@Andyporras Andyporras requested a review from jamescr February 10, 2025 20:22
@jamescr jamescr merged commit 921453e into labexp:develop Feb 10, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants