You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by millayr <gi...@git.apache.org> on 2016/10/27 17:42:18 UTC

[GitHub] couchdb-fauxton pull request #794: 76046 - The Documentation Link in the Que...

GitHub user millayr opened a pull request:

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

    76046 - The Documentation Link in the Query Options Panel Points to Futon Documentation

    This is from Cloudant ticket https://cloudant.fogbugz.com/f/cases/76046/.
    
    The documentation link still pointed to Fauxton docs instead of Cloudant docs.  The getDefaultProps() call was happening before FauxtonAPI.constants.DOC_URLS.GENERAL was tweaked for Cloudant specific values.
    
    The getDefaultProps() function is now removed and the docURL is passed as a prop to MainFieldsView.  The docURL is now a required property for the React class per advice from Robert Kowalski.

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

    $ git pull https://github.com/millayr/couchdb-fauxton 76046-query-options-documentation-link

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

    https://github.com/apache/couchdb-fauxton/pull/794.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 #794
    
----
commit ab88d189959118ae9dd90547aa0d4a4ffd8a8445
Author: Ryan Millay <ry...@gmail.com>
Date:   2016-10-25T14:12:12Z

    Passing docURL as prop to allow for custom Cloudant value

----


---
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 #794: 76046 - The Documentation Link in the Que...

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

    https://github.com/apache/couchdb-fauxton/pull/794#discussion_r85893583
  
    --- Diff: app/addons/documents/queryoptions/queryoptions.react.jsx ---
    @@ -411,7 +405,8 @@ var QueryTray = React.createClass({
                 reduce={this.props.reduce}
                 toggleReduce={Actions.toggleReduce}
                 groupLevel={this.props.groupLevel}
    -            updateGroupLevel={Actions.updateGroupLevel} />
    +            updateGroupLevel={Actions.updateGroupLevel}
    +            docURL={FauxtonAPI.constants.DOC_URLS.GENERAL} />
    --- End diff --
    
    This should be changed to `docUrl={this.props.docURL}` then you can override this via `FauxtonAPI.constants.DOC_URLS.GENERAL` or via the `props` for this component.


---
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 #794: 76046 - The Documentation Link in the Que...

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

    https://github.com/apache/couchdb-fauxton/pull/794#discussion_r86861215
  
    --- Diff: app/addons/documents/queryoptions/queryoptions.react.jsx ---
    @@ -411,7 +405,8 @@ var QueryTray = React.createClass({
                 reduce={this.props.reduce}
                 toggleReduce={Actions.toggleReduce}
                 groupLevel={this.props.groupLevel}
    -            updateGroupLevel={Actions.updateGroupLevel} />
    +            updateGroupLevel={Actions.updateGroupLevel}
    +            docURL={FauxtonAPI.constants.DOC_URLS.GENERAL} />
    --- End diff --
    
    The `QueryTray` class doesn't expect docURL as a prop at the moment.  I can update it so that it does, but then it seems as though we're just pushing this same behavior further up the chain of nested React classes.
    
    Cloudant doesn't render `QueryTray` outside of fauxton code, so setting docURL differently (i.e. props versus default value) for each type seems like a lot of effort for minimal return.


---
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 #794: 76046 - The Documentation Link in the Que...

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

    https://github.com/apache/couchdb-fauxton/pull/794#discussion_r86859654
  
    --- Diff: app/addons/documents/queryoptions/queryoptions.react.jsx ---
    @@ -30,13 +30,7 @@ var MainFieldsView = React.createClass({
         reduce: React.PropTypes.bool.isRequired,
         toggleReduce: React.PropTypes.func,
         updateGroupLevel: React.PropTypes.func,
    -    docURL: React.PropTypes.string
    -  },
    -
    -  getDefaultProps: function () {
    --- End diff --
    
    If the docURL is always passed in as a prop, I'd argue keeping `getDefaultProps` results in redundant updates.  No?


---
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 issue #794: 76046 - The Documentation Link in the Query Opti...

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

    https://github.com/apache/couchdb-fauxton/pull/794
  
    You can 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 issue #794: 76046 - The Documentation Link in the Query Opti...

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

    https://github.com/apache/couchdb-fauxton/pull/794
  
    +1 I've merged 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 #794: 76046 - The Documentation Link in the Que...

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

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


---
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 #794: 76046 - The Documentation Link in the Que...

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

    https://github.com/apache/couchdb-fauxton/pull/794#discussion_r85893495
  
    --- Diff: app/addons/documents/queryoptions/queryoptions.react.jsx ---
    @@ -30,13 +30,7 @@ var MainFieldsView = React.createClass({
         reduce: React.PropTypes.bool.isRequired,
         toggleReduce: React.PropTypes.func,
         updateGroupLevel: React.PropTypes.func,
    -    docURL: React.PropTypes.string
    -  },
    -
    -  getDefaultProps: function () {
    --- End diff --
    
    This `getDefaultProps` should stay in.


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