You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by benkeen <gi...@git.apache.org> on 2015/10/07 05:48:02 UTC

[GitHub] couchdb-fauxton pull request: Fix for logout link showing up twice...

GitHub user benkeen opened a pull request:

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

    Fix for logout link showing up twice in footer

    An old bug is the Logout link in the footer showing up twice. It's
    a little difficult to reproduce consistently, but I've found this
    works the best (Mac, chrome):
    1. open dev tools (it slows down browser performance),
    2. Login to Fauxton, notice the single "logout" link in footer.
    3. click on the browser URL bar and click <enter>
    4. Repeat the above until you see two "logout" links in the footer.
    
    What's happening is that when you see two logout links, 
    the change event on Auth.session is firing twice, each of which 
    adds a new footer link.
    
    This fix just ensures the link is removed prior to adding it.

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

    $ git pull https://github.com/benkeen/couchdb-fauxton duplicate-logout-link

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

    https://github.com/apache/couchdb-fauxton/pull/551.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 #551
    
----
commit 5f5eed38bcb8a5c042fba1e092898a8055e09977
Author: Ben Keen <be...@gmail.com>
Date:   2015-10-07T03:36:44Z

    Fix for logout link showing up twice in footer
    
    An old bug is the Logout link in the footer showing up twice. It's
    a little difficult to reproduce consistently, but I've found this
    works the best (Mac, chrome):
    1. open dev tools
    2. Login to Fauxton, notice the single "logout" link in footer.
    3. click on the browser URL bar and click <enter>
    4. Repeat the above until you see two "logout" links in the footer.
    
    What's happening is the change event on Auth.session is firing
    twice, each of which adds a new footer link. Seems like with
    some page loads it only fires once, sometimes twice.
    
    This ensures the link is removed prior to adding it.

----


---
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: Fix for logout link showing up twice...

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

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


---
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: Fix for logout link showing up twice...

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

    https://github.com/apache/couchdb-fauxton/pull/551#discussion_r41390783
  
    --- Diff: app/addons/fauxton/navigation/stores.js ---
    @@ -173,6 +173,7 @@ function (app, FauxtonAPI, ActionTypes) {
           switch (action.type) {
     
             case ActionTypes.ADD_NAVBAR_LINK:
    +          console.log(action.link);
    --- End diff --
    
    debug logging?


---
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: Fix for logout link showing up twice...

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

    https://github.com/apache/couchdb-fauxton/pull/551#discussion_r41397927
  
    --- Diff: app/addons/fauxton/navigation/stores.js ---
    @@ -173,6 +173,7 @@ function (app, FauxtonAPI, ActionTypes) {
           switch (action.type) {
     
             case ActionTypes.ADD_NAVBAR_LINK:
    +          console.log(action.link);
    --- End diff --
    
    Oops. Will remove. 


---
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: Fix for logout link showing up twice...

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

    https://github.com/apache/couchdb-fauxton/pull/551#issuecomment-160165808
  
    +1 after changing to single quotes :)


---
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: Fix for logout link showing up twice...

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

    https://github.com/apache/couchdb-fauxton/pull/551#issuecomment-149152878
  
    how about taking the navbar and adding a link multiple times. assumption: the element should just be there one time then


---
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: Fix for logout link showing up twice...

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

    https://github.com/apache/couchdb-fauxton/pull/551#issuecomment-146217661
  
    I thought about that, but `addHeaderLink` and `removeHeaderLink` already have tests. Testing a remove-then-add would just confirm that it's been removed before adding which is already tested. I guess I could test that `removeHeaderLink` fails nicely when it tries removing something that doesn't exist? But that may also already be tested I'll need to check.
    



---
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: Fix for logout link showing up twice...

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

    https://github.com/apache/couchdb-fauxton/pull/551#issuecomment-146199368
  
    this needs tests ben


---
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: Fix for logout link showing up twice...

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

    https://github.com/apache/couchdb-fauxton/pull/551#issuecomment-160184960
  
    All fixed. I patched up all whitespace + quote issues in that file. 


---
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: Fix for logout link showing up twice...

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

    https://github.com/apache/couchdb-fauxton/pull/551#issuecomment-149153031
  
    this could be tested by emitting the change evvent multiple times on `Auth.session.on('change'`


---
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: Fix for logout link showing up twice...

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

    https://github.com/apache/couchdb-fauxton/pull/551#issuecomment-151181885
  
    Updated.


---
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.
---