Skip to content

Add AttachSelectedRowsDialog #465

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 21, 2016
Merged

Add AttachSelectedRowsDialog #465

merged 3 commits into from
Jul 21, 2016

Conversation

ellemedit
Copy link
Contributor

  • fixed: href reference bug by relative path
  • added: Attach this/these rows to relation button to Edit BrowserToolbar

This works like:
2016-07-16 12 28 57

  1. selecting some rows
  2. clicking Attach this/these row(s) to relation
  3. setting target Class, Relation, ObjectId
  4. done

* fixed: <Icon /> href reference bug by relative path
* added: `Attach this/these rows to relation` button to `Edit` BrowserToolbar
@ghost
Copy link

ghost commented Jul 15, 2016

By analyzing the blame information on this pull request, we identified @drew-gross, @TylerBrock and @gavrix to be potential reviewers.

@@ -28,13 +28,10 @@ export default class AttachRowsDialog extends React.Component {
return [...resourceIds, objectId];
}, []);
const promise = new Parse.Promise();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can shorten this whole thing to just return this.props.onConfirm(objectIds); I think,

@drew-gross
Copy link
Contributor

Looks pretty good, just a couple comments

@ellemedit
Copy link
Contributor Author

ellemedit commented Jul 16, 2016

@drew-gross The reason wrapping onSubmit prop as Parse.Promise is that FormModal doesn't handle ES6 standard(?) promise.

<Modal
      {...modalProps}
      confirmText={this.state.inProgress ? inProgressText : submitText}
      onConfirm={() => {
        this.setState({
          errorMessage: '',
          inProgress: true,
        });
        onSubmit().then(result => {
          onClose();
          clearFields();
          onSuccess(result);
          this.setState({inProgress: false});
        }).fail(({ message, error, notice, errors = [] }) => {
          this.setState({
            errorMessage: errors.join(' ') || message || error || notice || 'An error occurred',
            inProgress: false,
          });
        });
      }}
... />

This is how FormModal executes onSubmit prop. So If I pass ES6 async function, it spits:
2016-07-16 12 06 09

your meaning was to make async function Parse.Promise function?

@ghost ghost added the CLA Signed label Jul 16, 2016
@ghost
Copy link

ghost commented Jul 16, 2016

@beingbook updated the pull request.

@ghost
Copy link

ghost commented Jul 16, 2016

@beingbook updated the pull request.

@ghost ghost added the CLA Signed label Jul 16, 2016
@drew-gross
Copy link
Contributor

This isn't allowing me to add users to a role. Maybe because it's not touchable? I don't even see the bottom two fields of the FormModal

image

Also, you can fix FormModal to use then with 2 parameters if you want to simplify the things I mentioned before..

@ellemedit
Copy link
Contributor Author

ellemedit commented Jul 19, 2016

@drew-gross change your class Installation to Role, you can see other options. or your browser can't select menu?

@ghost ghost added the CLA Signed label Jul 19, 2016
@drew-gross
Copy link
Contributor

No even with Role I don't see it

image

Also I'm getting a new warning that is cause by the base href change:

image

* fixed: base URL with update dependencies
* updated: `FormModal` uses ES6 Promise instead of Parse.Promise
@ghost
Copy link

ghost commented Jul 19, 2016

@beingbook updated the pull request.

@ghost
Copy link

ghost commented Jul 19, 2016

@beingbook updated the pull request.

@ghost ghost added the CLA Signed label Jul 19, 2016
@ellemedit
Copy link
Contributor Author

I just fixed the issues.

@drew-gross drew-gross merged commit 5b301f3 into parse-community:master Jul 21, 2016
@tanmays tanmays mentioned this pull request Aug 22, 2016
georgeloh added a commit to georgeloh/parse-dashboard that referenced this pull request Sep 7, 2016
…oard into heroku_master

* 'master' of https://github.com/ParsePlatform/parse-dashboard: (77 commits)
  Updating ISSUE_TEMPLATE to match the latest versions (parse-community#525)
  Added support for node 4.3 and some documentation to Authentication.js (parse-community#513)
  Added add row button to data browser toolbar. (parse-community#512)
  Made the encrypted passwords an option (parse-community#510)
  Allow sorting by `createdAt` ascending (parse-community#508)
  Version 1.0.18 (parse-community#507)
  E2e test (parse-community#505)
  Version 1.0.17 (parse-community#502)
  Revert "using mount path when mounted as express module" (parse-community#501)
  Version 1.0.16 (parse-community#498)
  Added the ability to accept encrypted passwords (parse-community#487)
  using mount path when mounted as express module (parse-community#486)
  fix misspelling (parse-community#497)
  Add AttachSelectedRowsDialog (parse-community#465)
  Version 1.0.15
  Add/relation viewer (parse-community#452)
  Changed Sidebar Footer links to open in a new tab (parse-community#460)
  Updated paths Procfile (parse-community#461)
  Add allowInsecureHTTP option with Express (parse-community#457)
  Note that env vars only work with parse-dashboard (parse-community#458)
  ...
georgeloh added a commit to georgeloh/parse-dashboard that referenced this pull request Sep 7, 2016
* heroku_master: (91 commits)
  added latest configfile
  Updating ISSUE_TEMPLATE to match the latest versions (parse-community#525)
  Added support for node 4.3 and some documentation to Authentication.js (parse-community#513)
  Added add row button to data browser toolbar. (parse-community#512)
  Made the encrypted passwords an option (parse-community#510)
  Allow sorting by `createdAt` ascending (parse-community#508)
  Version 1.0.18 (parse-community#507)
  E2e test (parse-community#505)
  Version 1.0.17 (parse-community#502)
  Revert "using mount path when mounted as express module" (parse-community#501)
  Version 1.0.16 (parse-community#498)
  Added the ability to accept encrypted passwords (parse-community#487)
  using mount path when mounted as express module (parse-community#486)
  fix misspelling (parse-community#497)
  Add AttachSelectedRowsDialog (parse-community#465)
  Version 1.0.15
  Add/relation viewer (parse-community#452)
  Changed Sidebar Footer links to open in a new tab (parse-community#460)
  Updated paths Procfile (parse-community#461)
  Add allowInsecureHTTP option with Express (parse-community#457)
  ...

# Conflicts:
#	Parse-Dashboard/index.js
#	Parse-Dashboard/parse-dashboard-config.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants