Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Ext API docs improvements

  1. #1
    Sencha User edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Vote Rating
    11
      0  

    Post Ext API docs improvements

    This originally started off over at http://extjs.com/forum/showthread.ph...038#post275038 but needed its own thread.

    I'm dumb enough that I frequently tab between browser windows and accidentally refresh my ExtJS API app window. This causes me to lose all of my open tabs, which is annoying. Today I had a play around with the docs application to see if I could improve matters - here is the result.

    The API docs now remember which tabs you had open, so if you do accidentally refresh (or close the window, or restart your browser or computer) you'll get your tabs back. It's also using Ext.History, so back and forward take you between tabs rather than back to the previous page.

    To me this feels a lot more natural, and the current API docs app already feels slightly weird. I was going to develop this for my internal apps anyway, but if others find it useful I will keep it updated in public. Anyone is free to use it however they wish - the full source code is available up on Github (the relevant files are inside docs/resources/javascripts). Just chuck it into a folder Apache can serve and it should just work.

    I've got a few more ideas on how to improve this resource, but would love to hear what others think too. If it proves popular it would be nice to have something like this on the main API site too.
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

  2. #2
    Sencha Premium User dawesi's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia (aka GMT+10)
    Posts
    1,198
    Vote Rating
    28
      0  

    Default

    Quote Originally Posted by edspencer View Post
    This originally started off over at http://extjs.com/forum/showthread.ph...038#post275038 but needed its own thread.

    I'm dumb enough that I frequently tab between browser windows and accidentally refresh my ExtJS API app window. This causes me to lose all of my open tabs, which is annoying. Today I had a play around with the docs application to see if I could improve matters - here is the result.
    me too! maybe you could add an event that catches the refresh and bypasses it too!

    Quote Originally Posted by edspencer View Post
    The API docs now remember which tabs you had open, so if you do accidentally refresh (or close the window, or restart your browser or computer) you'll get your tabs back. It's also using Ext.History, so back and forward take you between tabs rather than back to the previous page.

    To me this feels a lot more natural, and the current API docs app already feels slightly weird. I was going to develop this for my internal apps anyway, but if others find it useful I will keep it updated in public. Anyone is free to use it however they wish - the full source code is available up on Github (the relevant files are inside docs/resources/javascripts). Just chuck it into a folder Apache can serve and it should just work.

    I've got a few more ideas on how to improve this resource, but would love to hear what others think too. If it proves popular it would be nice to have something like this on the main API site too.
    be nice to add it to the docs and air docs!
    Cloud Application Architect

    Sencha Specialist / Sencha MVP
    ExtJs Developer + Contributor since 0.2.2 - Champion of the per developer license.

  3. #3
    Sencha User rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,159
    Vote Rating
    10
      0  

    Default

    Awesome stuff.

    Would be cool if you went go to say, 'applyStyles' method in Ext.Element from the search on the main page, it currently gets highlighted but it would be cool if it it also added it to the URL.

    http://www.grabup.com/uploads/072b01...e98fc56a0a.png

  4. #4
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,893
    Vote Rating
    89
      0  

    Default

    Fantastic. Are you willing to let Jack use this code in the Ext doc page?

  5. #5
    Sencha User edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Vote Rating
    11
      0  

    Default

    Quote Originally Posted by Animal View Post
    Fantastic. Are you willing to let Jack use this code in the Ext doc page?
    Absolutely

    Quote Originally Posted by rdougan View Post
    Awesome stuff.

    Would be cool if you went go to say, 'applyStyles' method in Ext.Element from the search on the main page, it currently gets highlighted but it would be cool if it it also added it to the URL.

    http://www.grabup.com/uploads/072b01...e98fc56a0a.png
    Excellent idea, I'll do it unless you beat me to it. Might be nice to have it look like #Ext.Element/applyStyles - the only reason I kept the #class=Ext.Element version was to make it look like the old direct links, but I guess the class= is redundant.

    Quote Originally Posted by dawesi View Post
    me too! maybe you could add an event that catches the refresh and bypasses it too!
    I think this makes sense too - again it's up on Github so if you fancy getting your hands dirty by all means give it a go, if not I'll do that when I get a free moment.
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

  6. #6
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,222
    Vote Rating
    1010
      0  

    Default

    Very cool, I'll keep my eye on this.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  7. #7
    Ext JS Premium Member watrboy00's Avatar
    Join Date
    Aug 2007
    Location
    Minneapolis, MN
    Posts
    473
    Vote Rating
    0
      0  

    Default

    Neat stuff but I think I found a bug. Open up the docs and refresh the page.

    You get http://extjs.edspencer.net/extjs/docs/#class=undefined and it opens a tab with no content or title of course.
    Eric Berens
    Intranet Systems Manager @ Best Buy
    You should follow me on twitter here.

  8. #8
    Sencha User rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,159
    Vote Rating
    10
      0  

    Default

    http://github.com/rdougan/extjs-docs/tree/master

    I have added the member name onto the end of the url when used by the user, however it doesn't load when you refresh, it only goes to the class. In the scrollToMember method on line 268 it doesn't seem to be getting the el. Maybe a timing problem?

    I have also fixed the refresh bug above.

    It would be cool to add state to the tree at the side using cookies. I have no idea how to do that though..

  9. #9
    Sencha User walldorff's Avatar
    Join Date
    Mar 2008
    Location
    Antwerp, Belgium
    Posts
    165
    Vote Rating
    2
      0  

    Thumbs up Great!

    Quote Originally Posted by edspencer View Post
    I'm dumb enough that I frequently tab between browser windows and accidentally refresh my ExtJS API app window.
    Same here <bg>
    This is great. Far better than the original. Ik hope Jack wil implement this soon. I'll be using it forever
    Thanks Ed!
    ExtJS 3.4, WAMP Apache 2.2.17, PHP 5.3.5, MySQL 5.5.8

  10. #10
    Ext User
    Join Date
    Jan 2009
    Posts
    57
    Vote Rating
    0
      0  

    Default doesnt work when refreshing the page

    http://extjs.edspencer.net/extjs/doc...rm.NumberField

    i went there and refreshed page

    and the tool is spinning right around and around. yo flo rida.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •