Popcorn Maker Bugs 256, 257, and 281

Three bugs that I now have up for review are:

  • bug 256 – Timecodes should round to three decimal places
  • bug 257 – Remove .DS_Store files from the repository
  • bug 281 – Fix the basic template’s manifest file

Bug 256 – Timecodes Should Round to Three Decimal Places

There were a couple of places that looked like could be the right area to modify the code, namely butter/external/trackLiner/trackLiner.js, and butter/src/core/trackevent.js. trackLiner.js is what responds first when a track event is added to the timeline. I tried looking for the right area in the code to change, but then realized in order to keep trackLiner.js more flexible for other components that want to use it (perhaps they want more precision), the rounding should be done in trackevent.js. The initial comment for this bug said that timecodes should be rounded to one decimal place, and that’s what my first patch had. But I got comments in the ticket saying it would make more sense to have it round to three decimal places in order for people to have frame-level precision. I also ended up using JavaScript’s toFixed function to do the rounding, but I had to change that since it was pointed out to me that the function returns a string. In my second implementation, I created a local function, round, which uses a little bit of math to do the rounding. The function is

round = function( number, numberOfDecimalPlaces ) {
  return Math.round( number * ( Math.pow( 10, numberOfDecimalPlaces ) ) ) / Math.pow( 10, numberOfDecimalPlaces );
};

Each place in the code that calls it passes 3 to the second argument of the function, so that the number returned is rounded and has only three decimal places. The patch for this bug is here.

Bug 257 – Remove .DS_Store Files from the Repository

This one didn’t involve any code, it was solved using the find command:

find . -name .DS_Store -exec git rm {} \;

That command executes git rm on each file in the repository named .DS_Store.

Bug 281 – Fix the Basic Template’s Manifest File

The manifest file for the basic template had two description fields, so I just removed one of them, and kept the one that says the description is “A simple template with two text areas”. The manifest also said that the thumbnail was named thumbnail.gif, but it needed to be thumbnail.png.

Still Working on Bug 254

I am still working on bug 254, which is to remove the apply button from Popcorn Maker (it’s confusing for users to have both an apply and okay button); I hope for that to be up in review soon!

Advertisements
This entry was posted in Open Source. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s