Hi Utkrash,<div><br></div><div>This is a very interesting project.  Just a few comments:</div><div><br></div><div>* One core idea in sugar is that there are no load/save buttons.  Activities just have contents and let you edit the contents, the journal deals with all the saving and loading.  When you are adding a toolbar that literally has a save and load button, maybe you should make a new activity.</div><div>   -> maybe a solution is to:</div><div>        1.  Make a new activity that is like JSFiddle.  I made up a prototype a while ago and sent to you on the list.</div><div>        2.  Add a "open this web page in JSFiddle activity" button in browse.  This would precreate a JSFiddle activity file that has the current web page in it.</div><div>   - that then solves the issue, and allows you to add collaboration to the JSFiddle (since you can add collaboration very simpily to any python activity.  Infact, TextBuffer syncing is a built in feature of collabwrapper!!!)</div><div><br></div><div>* Browse integration is an interesting idea.  I would not make the toolbutton as prominent.  Think about this:</div><div>    1.  Browse is built for browsing the internet</div><div><span style="white-space: pre-wrap;">    2.  The main education reason for the internet is research</span></div><div>    3.  When I am researching the internet, I don't need to play with javascript programming</div><div>    4.  Therefore, it is a waste of the screen to put an unused button on the main toolbar</div><div>    -> Maybe just put it under the activity toolbar, where the web inspector button is already</div><div><br></div><div>Thanks.</div><div>Sam<br><br>On Thu, May 12, 2016 at 2:25 AM, Ütkarsh Tiwari <iamutkarshtiwari@gmail.com> wrote:<br>
<blockquote type="cite"><div class="plaintext" style="white-space: pre-wrap;">---------- Forwarded message ----------
From: Ütkarsh Tiwari <<a href="mailto:iamutkarshtiwari@gmail.com">iamutkarshtiwari@gmail.com</a>>
Date: Mon, 9 May 2016 15:39:04 +0530
Subject: Re: GSOC
To: Tony Anderson <<a href="mailto:tony_anderson@usa.net">tony_anderson@usa.net</a>>

Hi,
    There were some issues with the .xo file I attached in the
previous message. Here is the updated xo file.

Apologies,
Utkarsh Tiwari

On 5/8/16, Ütkarsh Tiwari <<a href="mailto:iamutkarshtiwari@gmail.com">iamutkarshtiwari@gmail.com</a>> wrote:
<blockquote> Hi,
     I have re-setup the toolbar as you requested. Now the run button
 also enables the js-fiddle and I have also added an icon for the
 'view-page-source' feature in the toolbar.

 Please test the attached .xo and let me know.

 Thanks,
 Utkarsh Tiwari

 On 5/8/16, Tony Anderson <<a href="mailto:tony_anderson@usa.net">tony_anderson@usa.net</a>> wrote:
<blockquote> Hi, Utkarsh

 I believe the icon for show source belongs in the palette (I am not sure
 this is correct usage but it will help in our discussion. The palette is
 the sub-menu that opens when you click on the button in the toolbar). I
 like the four parallel lines icon in the toolbar, but I think the
 community will want it changed to the gear icon. So in the palette, I
 can see buttons for 'view source', 'run', 'open', 'save', and 'add
 image' with, perhaps, others to be added. The important thing is to have
 the 'run' button enable js-fiddle as well as performing the run function.

 On 05/07/2016 04:05 PM, Ütkarsh Tiwari wrote:
<blockquote> Hi,
       A little double I have. Are we talking about placing the icon for
 viewing the source-code of the currently active webpage in browse in a
 new tab or are we talking about viewing the source-code of the
 currently open activity which is done through <alt><shift><v>?

 Thanks,
 Utkarsh Tiwari

 On 5/6/16, Tony Anderson <<a href="mailto:tony_anderson@usa.net">tony_anderson@usa.net</a>> wrote:
<blockquote> Hi, Utkarsh

 This version has the toolbar setup needed. Now comes the question of
 icons. Since Sugar uses a keyboard shortcut for view source, there
 doesn't appear to be a view source icon.

 Two suggestions:

 1. Use the gear icon as the icon for the main button (replacing the
 four
 parallel bars) and then use something like:
       <a href="https://commons.wikimedia.org/wiki/File:Code_Logo.svg">https://commons.wikimedia.org/wiki/File:Code_Logo.svg</a>
 for the view source button.

 2. Use the 'wrench' icon as the main icon on the toolbar and keep the
 gear icon for view source.

 On the fiddler button - Richa used the main (three red dots) button to
 enable the js-fiddle. The simplest solution would be to automatically
 enable js-fiddle when the user clicks on the 'run' button in addition
 to
 its function to refresh (the 'try me' capability). It would probably be
 better to make that the first button followed by 'open', 'save as', and
 'add image'. Probably a better alternative is to eliminate the second
 submenu and have five buttons on the menu:

 'run', 'open', 'save as', 'add image', and 'view source'.

 Yours,

 Tony

 On 05/05/2016 05:25 PM, Utkarsh Tiwari wrote:
<blockquote> Hi,
       In one the previous messages in this thready I had forwarded you
 an .xo files that contains the toolbar setup as you mentioned above
 <a href="http://imgur.com/gIKfapm">http://imgur.com/gIKfapm</a>.

 The icon for the toolbar can be changed easily. Currently I am
 focusing on adding the 'view source code of the current page' feature
 to Browse so that the user can view the html of the current open
 webpage for any references. After having done this, I'll fix the
 toolbar icons as you told. Until then, please test this .xo attached
 below (I have wired the toolbar buttons with their respective
 functionalities).

 Thanks,
 Utkarsh Tiwari


 On 5/5/16, Tony Anderson <<a href="mailto:tony_anderson@usa.net">tony_anderson@usa.net</a>> wrote:
<blockquote> Hi, Utkarsh

 Yes, I did test it.

 You need to convert the three-red-dots button to a standard menu
 palette
 like the first three on the tool bar.

 Note: Look at webactivity.py at lines 180-182. This makes instances
 of
 three classes, one for each of the first three items in the
 menu. However, 'go-webconsole' is implemented as a simple button.

 The first of these is the standard activity 'palette'. The next two
 have
 python modules: webtoolbar and viewtoolbar. Look at the code in these
 modules. You will see they set up a sub-menu. You can see what is
 going
 on by cross-referencing the code to the actual toolbar.

 Note in viewtoolbar.py at lines 67f that self.traybutton is a toggle.
 You can see this by clicking on each of the first three toolbar icons
 (they also open by hovering, but that is built-in).

 What you will need to do is write a similar module to implement the
 secondary menu buttons.

 The three-red-dot button was done for testing. We need a proper icon
 for
 the main toolbar. I would suggest the 'gear' icon used for developer
 tools in Firefox. This is becoming  a standard.

 The actual three-red-dot button does not work. It tries to open a
 file.
 Once you have implemented the palette, that button will only open a
 menu
 including
 enable fiddle, run, open, save, and so on.

 Tony

 On 05/03/2016 04:05 AM, Utkarsh Tiwari wrote:
<blockquote> Hi,
        Did you test the latest bundle I mailed you?

 In case if you couldn't, you may suggest me something more..so that
 I
 can implement some more feature by May5.

 Thanks,
 Utkarsh

 On May 3, 2016 6:01 AM, "Tony Anderson" <<a href="mailto:tony_anderson@usa.net">tony_anderson@usa.net</a>
 <<a href="mailto:tony_anderson@usa.net">mailto:tony_anderson@usa.net</a>>> wrote:

       I am flying to London today with an overnight stay in Manila.
 I
       may not be available until May 5.

       Tony

       On 05/03/2016 04:20 AM, Utkarsh Tiwari wrote:

           Hi,
                This one is the latest .xo with fully functional
 'save',
           'run',
           'add-image' and 'open' options.

           Please test it, and let me know what else is needed.

           P.S.- I'll integrate the modified toolbar in the end.

           Thanks,
           Utkarsh Tiwari

           On 5/2/16, Utkarsh Tiwari <<a href="mailto:iamutkarshtiwari@gmail.com">iamutkarshtiwari@gmail.com</a>
           <<a href="mailto:iamutkarshtiwari@gmail.com">mailto:iamutkarshtiwari@gmail.com</a>>> wrote:

               Hi,
                      As suggested , I have modified the code to -

               1- Allow user provide the name while saving the
 project
 in
               case if the
               'title' tags are not found in the code.
               2- If the name already exists, an alert pops up
 prompting
               the user to
               re-enter a new name.

               Am I going by a right speed or shall I speed up?

               P.S.- I have attached the .xo

               Thanks,
               Utkarsh

               On 5/1/16, Utkarsh Tiwari <<a href="mailto:iamutkarshtiwari@gmail.com">iamutkarshtiwari@gmail.com</a>
               <<a href="mailto:iamutkarshtiwari@gmail.com">mailto:iamutkarshtiwari@gmail.com</a>>> wrote:

                   Hi,
                         The previous copy/paste functionality was
 with
                   respect to the
                   copying text in the pdfs ( which would be used
 while
                   learning from
                   'Eloquent JS').

                   Thanks,
                   Utkarsh

                   On 5/1/16, Utkarsh Tiwari
 <<a href="mailto:iamutkarshtiwari@gmail.com">iamutkarshtiwari@gmail.com</a>
                   <<a href="mailto:iamutkarshtiwari@gmail.com">mailto:iamutkarshtiwari@gmail.com</a>>> wrote:

                       Hi,
                             Also I see that there is no text
 copy/paste
                       option in Browse. If
                       the
                       user wants to copy a lengthy html code from
 one
                       tab to webconsole, he
                       needs
                       to type it complete which is pretty hectic. I
                       suggest adding the text
                       copy/paste option to right click menu in the
                       Browse-tabs.

                       What do you think?

                       Thanks,
                       Utkarsh Tiwari
                       On May 1, 2016 6:50 AM, "Tony Anderson"
                       <<a href="mailto:tony_anderson@usa.net">tony_anderson@usa.net</a>
                       <<a href="mailto:tony_anderson@usa.net">mailto:tony_anderson@usa.net</a>>> wrote:

                           Hi Utkarsh,

                           Good work. I think we need to give the
 user
 a
                           clear way to name the
                           file.
                           Perhaps the save logic could check to see
 if
                           there is a <title>
                           element.
                           If
                           not, use an html prompt to ask for the
 title
                           and then use it as the
                           file
                           name (or a gtk entry).

                           Tony

                           On 05/01/2016 08:20 AM, Utkarsh Tiwari
 wrote:

                               Hi,
                                     I have modified the code to
 perform
                               the following funcitons ->

                               1- If the html code contains a text
 inside
                               <title> tag, then on saving
                               the file it gets saved by the
                               ('text'.html) name inside the <title>
                               tag. In case, if the title tags are
                               missing, it saves the file by a
                               random name.

                               2- now the folders and zip created
 inside
                               the 'webconsole' folder are
                               also named by title mentioned under
 the
                               <title> tags. In case if the
                               <title> tags are missing in the html
 code,
                               the folders are named by a
                               random string (same to what used to
 happen
                               previously)

                               P.S- I  am attaching the modified xo
                               below. (I haven't yet integrated
                               the modified toolbar into this code.
 Will
                               do it later in the end)

                               Thanks,
                               Utkarsh Tiwari

                               On 4/30/16, Tony Anderson
                               <<a href="mailto:tony_anderson@usa.net">tony_anderson@usa.net</a>
                               <<a href="mailto:tony_anderson@usa.net">mailto:tony_anderson@usa.net</a>>> wrote:

                                   Hi Utkarsh,

                                   Testing. In the simplest case, the
                                   user opens Browse and possibly a
                                   new
                                   tab. The user clicks on the
 'fiddle'
                                   button which in the 'browser'
                                   version, enables fiddle for that
 tab.
                                   The panels are empty. The user
                                   can
                                   enter html: <p>Hello World!</p>.
 The
                                   user clicks on 'run' and sees
                                   Hello
                                   World! in the output panel. The
 user
                                   enters console.log(2+2) in the
                                   javascript panel. The user clicks
 run.
                                   The console.log panel shows 4.

                                   Suppose all the user has done is
 enter
                                   <p>Hello World!</p> in the
                                   html
                                   panel and clicks on save. What
 does
                                   the saved file look like?
                                   It should be:

                                   <!DOCTYPE html5>
                                   <html>
                                   <head>
                                   <title>hello world</title>
                                   </head>
                                   <body>
                                   <p>Hello World!</p>
                                   </body>
                                   </html>

                                   (The title is a little iffy - the
 user
                                   should have a way to specify a
                                   file - the title could be the same
 as
                                   the file name, e.g. hello.html
                                   =
                                   <title>hello</title>

                                   So in the Journal there is a file
                                   hello.html.

                                   Now suppose the user adds to the
                                          <p>Hello World!</p>
                                          <img src='selfie.png'>My
                                   Greatest Selfie</img>

                                   Now the save must create a
 directory,
                                   e.g. hello/ and in the
                                   directory
                                   save two files: hello.html (or
                                   index.html) and selfie.png. Where
 does
                                   selfie.png come from? It comes
 from
                                   the 'add-image' button. Finally,
                                   save must compress the directory
 into
                                   hello.zip to save in the
                                   Journal.

                                   Also, the open when a zip file is
                                   selected such as hello.zip must
                                   unzip
                                   the file to a workarea (probably
 the
                                   Browse bundle

 (/home/olpc/.sugar/default/org.laptop.Browse/instance).
                                   It then must
                                   display index.html in the Browse
 tab.

                                   All of this should be already
                                   implemented but testing will
 certainly
                                   reveal some problems.

                                   Yours,

                                   Tony


                                   So the 'save' action needs to
 generate
                                   a complete html file.

                                   On 04/30/2016 01:43 PM, Utkarsh
 Tiwari
                                   wrote:

                                       Hi,
                                              How would you suggest
 me
 to
                                       tackle this 'directory' issue?

                                       Thanks,
                                       Utkarsh

                                       On Apr 30, 2016 6:17 AM, "Tony
                                       Anderson"
 <<a href="mailto:tony_anderson@usa.net">tony_anderson@usa.net</a>
                                       <<a href="mailto:tony_anderson@usa.net">mailto:tony_anderson@usa.net</a>>
                                       <<a href="mailto:tony_anderson@usa.net">mailto:tony_anderson@usa.net</a>

 <<a href="mailto:tony_anderson@usa.net">mailto:tony_anderson@usa.net</a>>>>
                                       wrote:

                                             Hi, Utkarsh

                                             Good work. Your
 initiative
                                       to find later code is good
 example
                                       of
                                             how to move forward in
 spite
                                       of challenges.

                                             This is part of the
                                       'directory' issue. The image
 needs
                                       to be
                                             copied from its location
 to
                                       the main directory for the web
                                       content
                                             and the img element
 needs
 to
                                       use relative addressing. I
 suspect
                                             the learner is to add
 the
                                       img element. This enables a
 zipped
                                       copy
                                             to be ported to another
                                       location (e.g. the school
 server)
                                       to be
                                             unzipped and accessed by
 the
                                       index.html file.

                                             Tony

                                             On 04/30/2016 08:37 AM,
                                       Utkarsh Tiwari wrote:

                                                 Hi,
                                                      I am sorry for
 my
                                       mistake in my previous
 message.
 The
                                                 problem with
                                                 the 'image-import'
 was
                                       because the browser.xo file
 which
                                       Mr.
                                                 Anderson
                                                 shared was few
 commits
                                       behind the latest commit of
 Ms.Richa
                                                 Sehgal's
                                                 fork. I looked into
 her
                                       fork to find out the latest
 commit
                                       and
                                                 found
                                                 the
 complete(working)
                                       code for the 'image-import'
 option.

                                                 Thanks,
                                                 Utkarsh Tiwari

                                                 On 4/29/16, Utkarsh
                                       Tiwari
 <<a href="mailto:iamutkarshtiwari@gmail.com">iamutkarshtiwari@gmail.com</a>

 <<a href="mailto:iamutkarshtiwari@gmail.com">mailto:iamutkarshtiwari@gmail.com</a>>


 <<a href="mailto:iamutkarshtiwari@gmail.com">mailto:iamutkarshtiwari@gmail.com</a>

 <<a href="mailto:iamutkarshtiwari@gmail.com">mailto:iamutkarshtiwari@gmail.com</a>>>>
                                       wrote:

                                                     Hi,
                                                          I have
 created
                                       a feature for the JS-fiddler
 on
                                       wiki
                                                     :

 <a href="https://wiki.sugarlabs.org/go/0.110/Feature_List/JS_Fiddler">https://wiki.sugarlabs.org/go/0.110/Feature_List/JS_Fiddler</a>

                                                     1- While
 recently
                                       testing the JS-fidder feature,
 I
                                       found
                                                     out that the
                                                     'add image'
 option
                                       in the sub-menu opens the

 Jounal(Documnets)
 for
                                                     image selection
 but
                                       on selecting the image, it
 doesn't
                                                     import that
                                                     image into the
                                       js/html/css code. Isn't this
 an
                                       unexpected
                                                     behaviour?
                                                     I also looked
 into
                                       the code and found out that
 the
                                                     'add_image()'
                                                     function in the
                                       webconsole.py does nothing but
                                       open the
                                                     Journal
                                                     chooser.

                                                     2- As suggested
 by
                                       Mr. Anderson, I am also trying
 to
                                       add
                                                     an extra
                                                     option in the
                                       submenu ('view page source')
 to
                                       display
                                       the
                                                     html code of
                                                     the current
 opened
 page.

                                                     Thanks,
                                                     Utkarsh Tiwari

                                                     On 4/29/16, Tony
                                       Anderson
 <<a href="mailto:tony_anderson@usa.net">tony_anderson@usa.net</a>
                                       <<a href="mailto:tony_anderson@usa.net">mailto:tony_anderson@usa.net</a>>

                                       <<a href="mailto:tony_anderson@usa.net">mailto:tony_anderson@usa.net</a>

 <<a href="mailto:tony_anderson@usa.net">mailto:tony_anderson@usa.net</a>>>>
                                       wrote:

                                                         Hi,
 Sebastian

                                                         Your request
 to
                                       create wiki pages echoes mine.
 I
                                       think
                                                         that is an
                                                         important
 way
 to
                                       go forward
                                                         and to
 fulfill
                                       the goals of the 'bonding
 period'
 in
                                       GSOC.

                                                         So far,
 there
                                       has been no resistance. This
 was
 a
                                       part
                                                         of
 last-years
 GSOC
                                                         project. It
 was
                                       not fulfilled
                                                         because
 Gonzalo
                                       was unavailable at the time.
 AFIK,
                                       the
                                                         suggestions
 to
                                                         create a
                                       separate activity have come
 from
                                                         members of
 the
                                       community, not directly from
 the
                                                         maintainers
 of
                                       Browse.

                                                         I have
 provided
                                       Utkarsh with a copy of
 broswer-1.xo
                                                         which was
 put
                                                         together
 during
                                       last year's GSOC to facilitate
                                                         the
 integration
                                       with then browse 157.2. The
 'to
 do'
                                                         was to fix
 the
                                                         'fiddle'
 button
                                       as a standard toolbar button
 and
 to
                                                         clean up the
                                                         sub-menu.
 This
                                       is a 'fork'. However, I
 suspect
 we
                                       will
                                                         get
 suggestions
                                                         that we
 should
                                       not have two versions of
 browse
 in
                                                         ASLO, but
 only
 one.

                                                         In any case,
 I
                                       expect to distribute one
 version
 of
                                                         Browse to
 the
                                                         deployments
 I
 am
                                       working with. I want to
 encourage
                                                         learners to
 see
 what
                                                         is behind
 web
                                       pages and to modify them
 without
                                                         launching a
                                       different
                                                         activity.

                                                         Tony




                                                         On
 04/29/2016
                                       04:30 AM, Sebastian Silva
 wrote:


                                       <iamutkarshtiwari> I have a
                                       question. what does
                                                             this
                                       'reflection"
                                                             feature
                                       refers to?


 Simplicity,
                                       Collaboration and Reflection
 are
                                                             design
                                       guidelines for
                                                             Sugar.

                                                             Tony,
 today
                                       I chatted with Utkarsh. He'll
 try
                                       to
                                                             satisfy
 your
                                       jsfiddle
                                                             request.
 I
                                       suggested to make a wiki page
 for
                                       each
                                                             of his
                                       features and
                                                             start a
                                       corresponding [DESIGN] thread
 on
                                       sugar-devel@.

                                                             I
 confirm
 I
                                       will help mentor him. One
 challenge
                                       is
                                                             going to
 be
                                       to get
                                                             things
                                       merged with Sugar maintainers.
                                       Currently
                                       it
                                                             doesn't
 seem
                                       like
                                                             Browse
                                       maintainers want much to do
 with
                                       jsfiddle
                                                             but a
 forked
                                       version
                                                             should
 be
                                       good enough for your
 requirement?

                                                             Please
 count
                                       on me to help Utkarsh's work
 be
                                       useful.

                                                             Regards,

 Sebastian

                                                             El
 28/04/16
                                       a las 12:10, Utkarsh Tiwari
                                       escribió:

                                                                 Hi
 Tony,

                                             Can we have a discussion
 over
                                       a

 video
                                       call ? We can

 arrange
                                       it as per your convenience.


 Thank
 you,

 Utkarsh

                                                             .


                                                 .




</blockquote></blockquote></blockquote>
</blockquote> .

</blockquote>

</blockquote>
</blockquote></div><div class="plaintext" style="white-space: pre-wrap;">_______________________________________________
Sugar-devel mailing list
<a href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a>
<a href="http://lists.sugarlabs.org/listinfo/sugar-devel">http://lists.sugarlabs.org/listinfo/sugar-devel</a>
</div></blockquote></div>