Skip to content
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

Allow to edit taken_at date #2954

Merged
merged 4 commits into from
Jan 28, 2025
Merged

Allow to edit taken_at date #2954

merged 4 commits into from
Jan 28, 2025

Conversation

ildyria
Copy link
Member

@ildyria ildyria commented Jan 24, 2025

by popular demand.

Fixes #2537

Copy link

codecov bot commented Jan 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.70%. Comparing base (0bc5ab6) to head (72e4508).
Report is 1 commits behind head on master.

Additional details and impacted files

@ildyria ildyria marked this pull request as ready for review January 25, 2025 19:00
@ildyria ildyria requested a review from a team as a code owner January 25, 2025 19:00
@ildyria ildyria added the Review: easy Easy review expected: probably just need a quick to go through. label Jan 25, 2025
@ildyria
Copy link
Member Author

ildyria commented Jan 25, 2025

After further thoughts, this is not the fully correct approach. There is one problem: the set taken_at date does not will not be considered for sorting etc. This somewhat defeats the purpose of the functionality.

I considered using taken_at_mod to store the original taken at date, but unfortunately changing the date twice would make this old non-existing date (null) gone.

Considering a third approach would require both taken_at_origin and a boolean is_exif_taken_at...

@ildyria
Copy link
Member Author

ildyria commented Jan 26, 2025

After further thoughts, this is not the fully correct approach. There is one problem: the set taken_at date does not will not be considered for sorting etc. This somewhat defeats the purpose of the functionality.

I considered using taken_at_mod to store the original taken at date, but unfortunately changing the date twice would make this old non-existing date (null) gone.

Considering a third approach would require both taken_at_origin and a boolean is_exif_taken_at...

Fixed.

@ildyria ildyria force-pushed the allow-edit-camera-date branch from e65664c to ac89779 Compare January 26, 2025 16:01
Copy link
Contributor

@sancsin sancsin left a comment

Choose a reason for hiding this comment

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

Should we also allow changing the timezone? Right now we can only edit the time, what if there is also timezone information that user wants to edit?

resources/js/components/drawers/PhotoEdit.vue Outdated Show resolved Hide resolved
resources/js/components/drawers/PhotoEdit.vue Outdated Show resolved Hide resolved
resources/js/components/drawers/PhotoEdit.vue Outdated Show resolved Hide resolved
@sancsin
Copy link
Contributor

sancsin commented Jan 27, 2025

Looking good and user friendly! 🙂

'border-dashed': !is_taken_at_modified,
}"
>
<InputText class="border-none" v-model="takenAtTz" placeholder="+00:00" :disabled="!is_taken_at_modified" />
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead for an InputText. Shall we have a dropdown instead with the following? I can look into implementing this in the near future, if you don't want to make this change right now.

UTC Offset Abbreviation Full Name
-12:00 (No common abbreviation) Uninhabited areas (Baker Island)
-11:00 (No common abbreviation) Niue Time
-10:00 HST Hawaii Standard Time
-09:00 AKST Alaska Standard Time
-08:00 PST Pacific Standard Time (US)
-07:00 MST Mountain Standard Time (US)
-06:00 CST (US) Central Standard Time (US)
-05:00 EST / ACT Eastern Standard Time (US) / Acre Time
-04:00 AMT Amazon Time
-03:30 NST Newfoundland Standard Time
-03:00 ADT Atlantic Daylight Time
-02:00 (No common abbreviation) South Georgia and Sandwich Islands
-01:00 (No common abbreviation) Azores Time
+00:00 UTC / GMT Coordinated Universal Time / Greenwich Mean Time
+01:00 CET / BST Central European Time / British Summer Time
+02:00 EET / CEST Eastern European Time / Central European Summer Time
+03:00 MSK / AST / EEST Moscow Standard Time / Arabian Standard Time / Eastern European Summer Time
+03:30 IRST Iran Standard Time
+04:00 GST / AZT Gulf Standard Time / Azerbaijan Time
+04:30 AFT Afghanistan Time
+05:00 PKT Pakistan Standard Time
+05:30 IST Indian Standard Time
+06:00 (No common abbreviation) Bhutan Time
+07:00 ICT Indochina Time
+08:00 CST (China) / HKT China Standard Time / Hong Kong Time
+09:00 JST / KST Japan Standard Time / Korea Standard Time
+09:30 ACST Australian Central Standard Time
+10:00 AEST Australian Eastern Standard Time
+11:00 (No common abbreviation) Solomon Islands Time
+12:00 NZST New Zealand Standard Time

@ildyria ildyria force-pushed the allow-edit-camera-date branch from c5e696a to eee5b0d Compare January 28, 2025 21:04
@ildyria ildyria merged commit 5f4913c into master Jan 28, 2025
54 checks passed
@ildyria ildyria deleted the allow-edit-camera-date branch January 28, 2025 21:22
Copy link
Contributor

@sancsin sancsin left a comment

Choose a reason for hiding this comment

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

Looking really good now! :)

@@ -132,6 +141,7 @@ const uploadTz = ref<string | undefined>(undefined);
const takenAtTz = ref<string | undefined>(undefined);

// TODO: updating exif data later
// console.log(timeZoneOptions)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can be removed?

Copy link
Member Author

Choose a reason for hiding this comment

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

already did xD

Copy link
Member Author

Choose a reason for hiding this comment

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

Here: 72e4508

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Review: easy Easy review expected: probably just need a quick to go through.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants