[Sugar-devel] Help Utkarsh test a Browse activity patch

Tony Anderson tony_anderson at usa.net
Thu May 19 05:21:54 EDT 2016


Hi, Utkarsh

1. I used 'run' on a tab where there was alreay a web page. The tab was 
replaced with a blank fiddler screen.
It would be useful if the fiddler displayed the already loaded page. 
Alternatively, it could open a new tab.  If the web
page in the tab is opened, it should be assumed that it is an html in 
the root directory of the project.

2. The title shows as 'untitled'. Good! An existing page should have a 
title - if not, 'untitled' is good.

3. The console log output is contained within the html output. So, for 
example, a css of
body {
          background: orange;
          }

turns the entire output area orange including the console: panel. (see 
attached screenshot)

This raises a little more complicated problem:

if the output screen is a full screen, there is not enough room in 
Output: I think this means the output panel should be
scrollable in x and y.

As students work there way through Eloquent Javascript, they may produce 
large output from the Console: panel. So moving the
Console panel outside the Output panel may not be sufficient. One option 
may be to make the two panels overlap with one hidden and the
other displayed. This could be controlled by a toggle button in the 
'gears' menu. (Note: this was a problem I discussed with Richa but it was
not resolved).

A related question is what happens for the html, css, and JavaScript 
panels if the text is too large. These may also need to be scrollable.

4. When I 'show source' on the page in the fiddler, the 'fiddler' page 
is shown not the page based on the text in the panels. This gets a little
tricky. When the 'show source' is called, it needs to check to see if 
'fiddler' is enabled. If so, an html page needs to be generated from the 
fiddle
text and that source displayed. This would be the same source that is 
saved.

5. Saving the source of the example in the screen shot worked. The name 
in the Journal is the project name. Great!
Opening the example from the Journal worked. Great! However, the title 
in the tab again shows the text of the file not the
title. Check that save sets the title to the project name. If so, then 
the run after the open should display the html and, therefore, the
title would be in the tab. See attached screenshot fiddler2.

6. I added the first screenshot as an image. This should copy the image 
to the containing folder for the web page. So
<img src='fiddle_example' width='100px' height='100px' alt='not found'/> 
on run should show the image not the alt message.

7. The save to the Journal saves a file fiddler2.html.zip. This is 
incorrect. The saved file should be fiddler2.zip (fiddler2 is the 
project name).
When unzipped there should be: fiddler/fiddler.html or 
fiddler/index.html along with the images and subpages). This requires 
the zip to be done
in the parent of the fiddle folder (zip -r fiddler2.zip fiddler2/).

8. The saved html is still a single line of text. In BeautifulSoup 4 
(bs4) - prettify has an option (prettify(formatter=None)) which should 
eliminatee
the problem with the & conversion. However my image has BeautifulSoup 3 
(from BeautifulSoup import BeautifulSoup for version 3, from bs4 import 
BeautifulSoup for version 4).

The best news is that I found fiddler very useful in preparing examples. 
If I got the syntax wrong, per html convention the element did not 
appear. I could correct it and run again.

Tony



On 05/18/2016 05:17 PM, Ütkarsh Tiwari wrote:
> Hi,
>      Here is the xo bundle.
>
> Thanks,
> Utkarsh
>
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20160519/bbca1b64/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fiddler example.png
Type: image/png
Size: 53165 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20160519/bbca1b64/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fiddler2.png
Type: image/png
Size: 53063 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20160519/bbca1b64/attachment-0003.png>


More information about the Sugar-devel mailing list