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/06/18 19:30:24 UTC

[GitHub] couchdb-fauxton pull request: Fix for relative link handling issue...

GitHub user benkeen opened a pull request:

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

    Fix for relative link handling issue in test environment

    Hey @garren, @robertkowalski, can I get extra eyes on this ticket? It's a tiny change but potentially big impact. It's complicated, so pardon the long explanation.
    
    ________________
    
    There's an issue with our current beta where clicking on a View
    name in the new React sidebar doesn't redirect the user to that
    view, but just shrinks the view section.
    
    Michelle got a fix in place in this PR:
    https://github.com/apache/couchdb-fauxton/pull/463. It works
    fine, but I didn't want to have to cancel events any time this
    occurs.
    
    After some digging, we found that this issue only occurs on
    dashboard.xxx/dashboard.html environments. It works fine
    locally, and wouldn't occur on prod. But it's a Fauxton issue.
    
    The issue is that the modified line of code in this PR was
    determining whether a link should be handled via the backbone
    router by comparing the base of the URL, including the
    dashboard.xxx/dashboard.assets folder. That would always fail
    to be true on beta environments because no link linked to the
    dashboard.assets folder.
    
    So remarkably, the navigate() line wasn’t running at all for
    any link on the dashboard.xxx environments, but links still
    worked because the router independently listened to the hash
    changes and handled the routing. The only difference was that
    the event wasn’t canceled, which caused the issue described above.
    
    I think the change made in this PR is safe. The purpose of the
    line is to determine "relative" links (or rather links within
    Fauxton), so I just made it a little more generic by comparing
    the http://whatever:port/ part, and not
    http://whatever:port/subfolder/ part.
    
    Michelle mentioned there have been other instances where we
    seem to need to cancel events like this. This should solve that.
    
    Hope this is clear.

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

    $ git pull https://github.com/benkeen/couchdb-fauxton subtle-link-handle-fix

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

    https://github.com/apache/couchdb-fauxton/pull/465.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 #465
    
----
commit cf6f6147ae8792b2dfb16bfb7ec905ea235ebc52
Author: Ben Keen <be...@gmail.com>
Date:   2015-06-18T17:24:07Z

    Fix for relative link handling issue in test environment
    
    There's an issue with our current beta where clicking on a View
    name in the new React sidebar doesn't redirect the user to that
    view, but just shrinks the view section.
    
    Michelle got a fix in place in this PR:
    https://github.com/apache/couchdb-fauxton/pull/463. It works
    fine, but I didn't want to have to cancel events any time this
    occurs.
    
    After some digging, we found that this issue only occurs on
    dashboard.xxx/dashboard.html environments. It works fine
    locally, and wouldn't occur on prod. But it's a Fauxton issue.
    
    The issue is that the modified line of code in this PR was
    determining whether a link should be handled via the backbone
    router by comparing the base of the URL, including the
    dashboard.xxx/dashboard.assets folder. That would always fail
    to be true on beta environments because no link linked to the
    dashboard.assets folder.
    
    So remarkably, the navigate() line wasn’t running at all for
    any link on the dashboard.xxx environments, but links still
    worked because the router independently listened to the hash
    changes and handled the routing. The only difference was that
    the event wasn’t canceled, which caused the issue described above.
    
    I think the change made in this PR is safe. The purpose of the
    line is to determine "relative" links (or rather links within
    Fauxton), so I just made it a little more generic by comparing
    the http://whatever:port/ part, and not
    http://whatever:port/subfolder/ part.
    
    Michelle mentioned there have been other instances where we
    seem to need to cancel events like this. This should solve that.
    
    Hope this is clear.

----


---
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 relative link handling issue...

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

    https://github.com/apache/couchdb-fauxton/pull/465#issuecomment-114202294
  
    Thanks Garren! Merged as 9255805


---
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 relative link handling issue...

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

    https://github.com/apache/couchdb-fauxton/pull/465#issuecomment-114155759
  
    +1 nice find


---
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 relative link handling issue...

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

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


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