Friday, 21 April 2017

Issue 1928

My 0.3 release is with issue-1928, which is posted on thimble repository, but it's actually under bracket. The issue is that URL hints does not do the right thing when spaces are in the path name.

This image shows what "hints" I am talking about. It displays the file names to make coding easier for web developers! According to the issue, if the path has a space in it, such as in file name, the Bracket URL encodes the path name, and adds "%20" wherever the spaces are found. According to David Humphrey, it was due to a javascript code encodeURI() function in bramble code. 

To fix the bug, I had an idea. It was to add hyphen(-) or underscore ( _ ), or just allow spacing in the path name. I suggested my idea and David was able to reply quickly. He asked me to just try removing the encodeURI() function from the code to see what happens. 

Once I removed the function, the hints came out perfectly. The path name did not have %20, when there were spaces in the path name. Surprisingly, it was quick bug to fix. I tested the hints with different characters as well and performed accordingly. I was suggested with other test by David, where I should see if I can publish the project. 

This is where everything went down hill for me! It looked perfect on preview even when I tested for different type of images (jpg, png, and gif). But when I try to publish them under localhost, nothing was working. All the images showed up as broken links. I was surprised this was happening and at the same time frustrated. Checked whether my repository was up-to-date as well, and it was. 

In the end, David suggested that he wants this issue closed. Mainly because he is rethinking the issue he filed originally and said that it may be correct to encode the path names that has spaces in it. 

No comments:

Post a comment