You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by benkeen <gi...@git.apache.org> on 2014/09/18 19:53:14 UTC

[GitHub] couchdb-fauxton pull request: Added missing API link to header of ...

GitHub user benkeen opened a pull request:

    https://github.com/apache/couchdb-fauxton/pull/60

    Added missing API link to header of edit doc page

    As described in ticket.
    https://issues.apache.org/jira/browse/COUCHDB-2332


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/benkeen/couchdb-fauxton 2332-missing-api-bar

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/couchdb-fauxton/pull/60.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #60
    
----
commit 1c3e705d222e4016337666aacd48457f728c0856
Author: Benjamin Keen <be...@gmail.com>
Date:   2014-09-18T17:51:17Z

    Added missing API link to header of edit doc page

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Added missing API link to header of ...

Posted by robertkowalski <gi...@git.apache.org>.
Github user robertkowalski commented on the pull request:

    https://github.com/apache/couchdb-fauxton/pull/60#issuecomment-56220948
  
    Cool that you like the idea :) 
    
    You are right, we already have a central api-bar which we have to get into one whith the others after the secondary indexes got merged. 
    
    And I try to avoid to nest the tree of objects too deep (views that create views and collections), it makes it usually very hard to write tests for the code.
    
    The central implementation of the Api-Bar is at https://github.com/apache/couchdb-fauxton/blob/8de3ed3ceec6134a36c6d82f286edadce5ecb750/app/addons/fauxton/base.js#L53-L94


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Added missing API link to header of ...

Posted by benkeen <gi...@git.apache.org>.
Github user benkeen commented on the pull request:

    https://github.com/apache/couchdb-fauxton/pull/60#issuecomment-56218020
  
    Ooh nice, you're right about the `hide` class. Looks like it occurs elsewhere too (e.g. the Config page, Active Tasks page). I'll check it out, thanks!
    
    I'm new to Fauxton, so I don't know the business logic at all well yet. But I see all the templates include the api-bar - is that likely to continue for new pages added to the UI? If so, abstracting the Api-Bar to a parent makes total sense to me. I'll look at the code a bit more and see.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Added missing API link to header of ...

Posted by robertkowalski <gi...@git.apache.org>.
Github user robertkowalski commented on the pull request:

    https://github.com/apache/couchdb-fauxton/pull/60#issuecomment-56210449
  
    Hi @benkeen, I found a small issue when I tested by manually. The Api-Bar gets a class `hide` which gets removed after some page refreshes. 
    
    Btw.: What do you think of moving the addition of the Api-Bar to one of the parent objects?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Added missing API link to header of ...

Posted by garrensmith <gi...@git.apache.org>.
Github user garrensmith commented on the pull request:

    https://github.com/apache/couchdb-fauxton/pull/60#issuecomment-56339457
  
    @benkeen thanks for trying to fix this. That fix is not quite right. The way to fix this is actually just to add a `masterLayout.apiBar.show();` after this line https://github.com/apache/couchdb-fauxton/blob/master/app/addons/fauxton/base.js#L88
    
    How this section works is that in each RouteObject we have a `apiUrl` function which has a documentation link and a raw api link. In the fauxton module we listen for the routeObject `renderComplete` event. We look at the routeObject and see if it has a `apiUrl` function and then render the api url for the page.
    
    @robertkowalski only on the database page do we have two api bars. Its definitely not ideal and in the long term we must fix it. But we can only do that once we have moved all the components from #31 into master. Then we can refactor some of those new components to use the single master api bar like it use to be. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Added missing API link to header of ...

Posted by garrensmith <gi...@git.apache.org>.
Github user garrensmith commented on the pull request:

    https://github.com/apache/couchdb-fauxton/pull/60#issuecomment-57140298
  
    Thanks @robertkowalski for merging. @benkeen could you close this PR.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Added missing API link to header of ...

Posted by benkeen <gi...@git.apache.org>.
Github user benkeen commented on the pull request:

    https://github.com/apache/couchdb-fauxton/pull/60#issuecomment-56274521
  
    Hi @robertkowalski, on looking at this in more detail, my solution was incorrect. Please reject the pull request. I'm just going down the rabbit hole right now trying to figure out a good solution - it's very interesting code! I must admit, my temptation is to change the whole way it works: instead of having the code update the API endpoint each time the page changes, have it just request that info "on-demand" when the user actually clicks the API Url link. That strikes me as a bit cleaner and can rid us of a lot of unneeded code (I think).
    
    But it's early days - I still need to understand a lot of the code. :)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Added missing API link to header of ...

Posted by benkeen <gi...@git.apache.org>.
Github user benkeen closed the pull request at:

    https://github.com/apache/couchdb-fauxton/pull/60


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Added missing API link to header of ...

Posted by benkeen <gi...@git.apache.org>.
Github user benkeen commented on the pull request:

    https://github.com/apache/couchdb-fauxton/pull/60#issuecomment-56536664
  
    Hi @garrensmith - thanks for that! I've updated the fix. It works well. @robertkowalski, mind trying now? 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Added missing API link to header of ...

Posted by robertkowalski <gi...@git.apache.org>.
Github user robertkowalski commented on the pull request:

    https://github.com/apache/couchdb-fauxton/pull/60#issuecomment-56727086
  
    @benkeen Thank you! Merged as abc9024b9c8dd4b314252831c9cc7254eb300b1e
    
    @garrensmith Yes, I know. Wanted to explain the api-bar to @benkeen 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---