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

Filmstrip bugfixes #48

Merged
merged 7 commits into from Dec 29, 2018
Merged

Filmstrip bugfixes #48

merged 7 commits into from Dec 29, 2018

Conversation

whyboris
Copy link
Owner

@whyboris whyboris commented Dec 28, 2018

This PR is for minor cleanup and two small features:

  • better thumbnail previews (preview component) - should have correct offset
  • now there's a settings option whether the thumbnail screenshot should remain when mouse leaves, or the thumbnail should return to the first screenshot 👍

There are some lingering issues since the last PR (#44) - but I'm tracking them with this issue: #50

Please feel free to leave comments about other bugs in the current master in #50 👍

This PR introduces breaking changes -- old .vha files will error out :trollface:

@whyboris whyboris added the ⛑️ WIP Work in progress label Dec 28, 2018
@cal2195
Copy link
Collaborator

cal2195 commented Dec 28, 2018

Just an odd thing I've noticed - not sure what's caused it, but lately there's a 1 px line all the way along the top!

screenshot 2018-12-28 at 19 46 22

@whyboris
Copy link
Owner Author

I've not looked into dark mode in a while. Thank you for catching that -- I'll fix 👍

@whyboris
Copy link
Owner Author

I fixed up the thumbnail view to use percent offset rather than pixel offset - resulting in a cleaner preview (should no longer result in showing parts of a subsequent/previous frame) 🎉

* @param fileName -- file name to hash
* @param fileSize -- file size to hash
*/
export function hashFile(fileName: string, fileSize: string): string {
Copy link
Owner Author

Choose a reason for hiding this comment

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

This method was simply moved (with no modification) from above - to be closer to the line which calls it 👌

Copy link
Collaborator

Choose a reason for hiding this comment

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

Just FYI - I'm thinking about slightly tweaking the hash function! 👍

* @param fileName -- file name to hash
* @param fileSize -- file size to hash
*/
export function hashFile(fileName: string, fileSize: number): string {
Copy link
Owner Author

Choose a reason for hiding this comment

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

Simply moved to another location within the same file 👌

@whyboris whyboris added ✏️ ready for review PR is ready for review and removed ⛑️ WIP Work in progress labels Dec 28, 2018
@whyboris
Copy link
Owner Author

I did not see a white stripe in my dark mode ... I'll check from time to time to see if it ever appears for me 🙆‍♂️

@whyboris whyboris mentioned this pull request Dec 29, 2018
@cal2195
Copy link
Collaborator

cal2195 commented Dec 29, 2018

Found how to reproduce the line - zoom out the app once in dark mode!

@whyboris
Copy link
Owner Author

whyboris commented Dec 29, 2018

✅ Confirmed - can replicate the white line bug: zooming out using the zoom level setting. Will look into fixing in another PR 👍

Copy link
Collaborator

@cal2195 cal2195 left a comment

Choose a reason for hiding this comment

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

Look great! 👍 Can't wait for more thumbnail generation settings! 🎉

@@ -590,17 +578,28 @@ function extractMetadataForThisONEFile(
const origWidth = metadata.streams[0].width;
const origHeight = metadata.streams[0].height;
const sizeLabel = labelVideo(origWidth, origHeight);
const fileSize = metadata.format.size;
const fileSize: string = metadata.format.size; // looks like a number, but actually a string!
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this intentional? ie. is there a reason we have it as a string?

Copy link
Owner Author

Choose a reason for hiding this comment

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

It turns out that ffprobe outputs format.size as a string (I checked with console.log(typeOf(metadata.format.size)) -- so I added the type definition to track what happens to it 👍

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ha! - Should we parse the integer here?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Makes sense -- will do 👍

* @param fileName -- file name to hash
* @param fileSize -- file size to hash
*/
export function hashFile(fileName: string, fileSize: string): string {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just FYI - I'm thinking about slightly tweaking the hash function! 👍

@whyboris
Copy link
Owner Author

Sounds good -- feel free to edit the hash as you see fit - no worries about breaking changes as we work before v2.0.0 is released 👍

@whyboris whyboris merged commit 2c7008b into master Dec 29, 2018
@whyboris whyboris deleted the filmstrip-fix branch December 29, 2018 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✏️ ready for review PR is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants