-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/update grouped images #106
Conversation
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.
It sounds reasonable :-) Sorry, I have nothing more insightful to say, other than congratulations on another fine PR description.
const current_image_SMARTSTK = current_image.header && current_image.header.SMARTSTK | ||
const new_image_SMARTSTK = new_image.header && new_image.header.SMARTSTK | ||
if (current_image_SMARTSTK && current_image_SMARTSTK !== 'no' && current_image_SMARTSTK === new_image_SMARTSTK) { | ||
current_image = new_image |
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.
Modifying state in vuex needs to happen by calling a mutation, so direct modifications like line 207 won't work like we want. However, replacing it with commit('setCurrentImage', new_image)
should do the trick!
(I was trying out these changes with the send_test_image script I mentioned that uploads simulated smart stacks to the tst site. As far as I can tell, everything should work after making this change).
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.
Update--decided to push this fix directly since it's such a minor change and might make observing easier for Wayne over this weekend. Verified it works with the send_test_image script as well as live observations at aro1, so likely no further action needed.
Works a treat!
Sent from WER iPhone.
…On Fri, Oct 6, 2023 at 7:22 PM Tim Beccue ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/store/modules/images.js
<#106 (comment)>:
> @@ -197,6 +197,15 @@ const actions = {
else {
recent_images[old_image_index] = new_image
}
+ // Reassigning value of current_image to new_image
+ // If a user takes smart stack photos and they select the image as it's updating,
+ // then the selected image (i.e. the thumbnail with the surrounding yellow border) keeps the yellow border
+ let current_image = state.current_image
+ const current_image_SMARTSTK = current_image.header && current_image.header.SMARTSTK
+ const new_image_SMARTSTK = new_image.header && new_image.header.SMARTSTK
+ if (current_image_SMARTSTK && current_image_SMARTSTK !== 'no' && current_image_SMARTSTK === new_image_SMARTSTK) {
+ current_image = new_image
Update--decided to push this fix directly since it's such a minor change
and might make observing easier for Wayne over this weekend. Verified it
works with the send_test_image script as well as live observations at aro1,
so likely no further action needed.
—
Reply to this email directly, view it on GitHub
<#106 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACTZ3MEMD2HIMLD44DFQJJLX6C4FZAVCNFSM6AAAAAA5U67R5SVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTMNRSHE3DSNBUG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
FEATURE FIX UPDATE: Added exposure fields under Projects tab with conditional adjustments
DESCRIPTION
Background:
After successfully having grouped images and only displaying the latest one from each smart stack (if it was a part of a smart stack), a new issue arose. @wrosing noticed that when he was taking smart stack photos, the first one would come in just fine. But if he selected the new image of the smart stack and it was (e.g.) 1 of 10 and then it updated to 2 of 10, the yellow border that surrounds the selected image thumbnail would disappear and some other erratic behavior would occur.
In the ThumbnailRow component, we assign the class of
selected_thumbnail
ifitem.image_id
is equal toselected_image
. This class creates the yellow border. However, because the new updated image'simage_id
from the smart stack was not the same value asselected_image
, the class was no longer assigned and therefore, the surrounding yellow border would disappear.Implementation:
In
images.js
under theupdate_new_image
action, we are now reassigning the value ofcurrent_image
tonew_image
. This happens only if certain conditions are met:current_image
has aSMARTSTK
that's not equal to 'no'. ANDnew_image
has aSMARTSTK
and is equal tocurrent_image
'sSMARTSTK
Features Fixes :
After having implemented changes to the ThumbnailRow component so that images could be grouped (details here), the new issue of the selected thumbnail not having a yellow border if it was a new image and a part of a smart stack arose. Reassigning the value of
new_image
tocurrent_image
should fix this feature and it should all behave as expected.Important Note:
This has not been 100% tested because I cannot take smart stack photos unless it's nighttime. I will wait for @wrosing's feedback, but I believe this should fix all issues related to updating images.
VISUALS
No visuals yet, but will add them tonight if I'm able to test with smart stack :-)