-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
#2391 - Multiple images in the viewer #2419
base: master
Are you sure you want to change the base?
Conversation
…ltiple-images-in-the-viewer
group-income Run #3384
Run Properties:
|
Project |
group-income
|
Branch Review |
sebin/task/#2391-multiple-images-in-the-viewer
|
Run status |
Passed #3384
|
Run duration | 09m 07s |
Commit |
f67d403a55 ℹ️: Merge d973d388f2d6f29a28563ed86cbe38c59fa46eca into 3b142e94445de8ab49b435e8d4bd...
|
Committer | Sebin Song |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
10
|
Skipped |
0
|
Passing |
111
|
View all changes introduced in this branch ↗︎ |
@@ -5,7 +5,7 @@ | |||
@mouseup='mouseUpHandler' | |||
) | |||
img.c-preview-image(ref='previewImg' | |||
:class='{ "is-movable": isImageMovable }' | |||
:class='{ "is-movable": isImageMovable, "is-hidden": !ephemeral.imgInitDone }' |
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.
Discovered a bug where the image kind of flickers when it finishes the load/initialization steps(happens because image dimensions changes from it's natural size to the initial zoom value). So made a fix here.
ownerID: this.ownerID, | ||
imgUrl: entry.url || this.objectURLList[index] || '', | ||
createdAt: this.createdAt || new Date(), | ||
id: randomHexString(12) |
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.
Instead of a random ID, wouldn't it be better to use a deterministic ID in this case? For example, I think the URLs would be both deterministic and unique (or it could be combined with the message ID).
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.
Valid suggestion. But I think it's safe to use the random string here because the id
here is merely used for differentiating multiple images rendered in the DOM.
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.
Yeah, I think it's safe also as used here, but I'm partial to deterministic IDs because they're always safe and can also be used, e.g., in testing.
closes #2391
[Desktop]
It also allows navigation via arrows in the keyboard too.
[Mobile]