Skip to content

Add/relation viewer #452

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 6 commits into from
Jul 15, 2016
Merged

Add/relation viewer #452

merged 6 commits into from
Jul 15, 2016

Conversation

ellemedit
Copy link
Contributor

@ellemedit ellemedit commented Jul 8, 2016

Sorry, I made some foolish mistakes previous pull request #446 .
So I resubmit this PR again.

Browser component

  • shows go back button if relation viewer or filters applied(actually just hitting browser history back)

Browser component's relation viewer

  • has route statement
  • can attach new/existing(by id) row to the relation
  • can refresh
  • can filter

ellemedit added 5 commits July 8, 2016 14:57
* update: DataBrowser relation viewer has url
* update: DataBrowser relation viewer can add row
* update: DataBrowser relation viewer can go back
* update: DeleteRowsDialog messsage is more clear
* update: AttachRowsDialog can add existing row by objectId
* update: after attaching, it will not refetch the relation and add state.data.
* lint: remove direct mutating state, make const var to let
* update: merge data fetching logic of `componentWillMount` and `componentWillReceiveProps`.
* shows back button if filter applied
* lint many things. (you can blame it)
@ghost
Copy link

ghost commented Jul 8, 2016

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

@ghost
Copy link

ghost commented Jul 8, 2016

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at [email protected]. Thanks!

@ellemedit
Copy link
Contributor Author

ellemedit commented Jul 12, 2016

Why am I not registered in CLA of Facebook? Previous one didn't... Believe me, I agreed in CLA and feed this pull request.

@ghost
Copy link

ghost commented Jul 12, 2016

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@ghost ghost added the CLA Signed label Jul 12, 2016
);
}
return (
<Modal
Copy link
Contributor

Choose a reason for hiding this comment

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

We have a component called FormModal that will handle in progress requests and errors nicely, please use that one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

FormModal looks incompatible. Because onSubmit doesn't handle general 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 may have to modify the error so it give the right message, like this:

onSubmit={() => {
  return saveTheThing()
  .catch(error => {
    throw { message: createErrorMessage() };
  })
}}

Copy link
Contributor Author

@ellemedit ellemedit Jul 13, 2016

Choose a reason for hiding this comment

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

No need to wrap promise? I guess onSubmit prop should be promise function that has then and fail.

@drew-gross
Copy link
Contributor

Awesome! This looks sweet. I have just a few comments for things to fix. Also, for non-relations there is a little blue + in the lower left corner of the browser, can you enable that for relations and have it open the AttachRowsDialog?

@ellemedit
Copy link
Contributor Author

ellemedit commented Jul 13, 2016

@drew-gross If I understand your words correctly, now the + blue button call showAttachRowsDialog instead of addRow in relation viewer?

In relation, now Add a row and + blue buttons add new row and attach to relation. (I changed addRow logic)
And your words seems creating row is non-neccessary in relation. But I need both functions creating row and attaching it, attaching existing row. Can we discuss about it? If not... I have to remove and repair code as past logic that doesn't include relation addRow.

Typo is fixed. If you provide more English sentence to me, I'll apply that.

@drew-gross
Copy link
Contributor

Ahhh I see. Thats actually a really good idea. Can you make it more clear in the text on the buttons though? Maybe "Create ${targetClassName} and attach"

The + button should probably do showAttachRowsDialog since there is nowhere to put explanatory text.

@ellemedit
Copy link
Contributor Author

I was considering about searching objects from AttachRowsDialog but I realized it's a too huge task. Now, this needs opening two browser. one is searching rows, another one is attaching rows. Can we improve it?

@drew-gross
Copy link
Contributor

Yeah, that would also be really cool. I agree that it's a huge task though.

@drew-gross
Copy link
Contributor

One way to simplify searching and adding rows would be to have a new option when you have checked some items in the data browser, like "Attach these rows to relation" which opens a Modal to choose the class, column, and objectId to attach to.

@ellemedit
Copy link
Contributor Author

ellemedit commented Jul 13, 2016

@drew-gross awesome idea! but it will be next PR...

@drew-gross
Copy link
Contributor

Of course :) Thanks for all the help!

@ghost
Copy link

ghost commented Jul 13, 2016

@beingbook updated the pull request.

* fixed: typos
* added: create and attach buttons for relation viewer
@ghost
Copy link

ghost commented Jul 13, 2016

@beingbook updated the pull request.

1 similar comment
@ghost
Copy link

ghost commented Jul 13, 2016

@beingbook updated the pull request.

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

I updated Modal to FormModal and fixed typo errors.

@drew-gross
Copy link
Contributor

Looks amazing man, thanks for the awesome work!

@drew-gross drew-gross merged commit 63d356b into parse-community:master Jul 15, 2016
@ghost ghost added the CLA Signed label Jul 15, 2016
@ellemedit
Copy link
Contributor Author

ellemedit commented Jul 15, 2016

@drew-gross Wow! I'm honor to finish first contributing successfully. But I have some questions about ParsePlatform.

  1. Will ParsePlatform keep continuing to update and improve features after shutting down Parse service? Because I think the main repository's pulse seems decreasing commit activity. I don't know how it is going...
  2. If ParsePlatform keeps continuing to be updated, I think we should discuss about ParsePaltform's project's maintainability. But I don't know where to start... What's good way to discuss about it?

@drew-gross
Copy link
Contributor

The decrease in activity is mostly because we fixed all the bugs and have reached a mostly stable state. New activity is generally larger, more complex features like caching, which tend to results in fewer commits, but each commit is more substantial. You can discuss Parse on https://gitter.im/ParsePlatform/Chat, I can also invite you to our Slack using the email in your profile (if you would prefer a different email just ignore that invite and send me the email you would like to use).

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