Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

registry dapp #2077

Merged
merged 40 commits into from
Sep 19, 2016
Merged

registry dapp #2077

merged 40 commits into from
Sep 19, 2016

Conversation

derhuerst
Copy link
Contributor

This PR adds a basic Registry dApp that allows users to query Registry.sol.

Even though the app is not done yet (in fact, a lot is missing), it serves as an example to discuss code style with the JS team.

@parity-cla-bot
Copy link

It looks like @derhuerst hasn'signed our Contributor License Agreement, yet.

The purpose of a CLA is to ensure that the guardian of a project's outputs has the necessary ownership or grants of rights over all contributions to allow them to distribute under the chosen licence.
Wikipedia

You can read and sign our full Contributor License Agreement at the following URL: https://cla.ethcore.io

Once you've signed, plesae reply to this thread with [clabot:check] to prove it.

Many thanks,

Ethcore CLA Bot

@rphmeier rphmeier added the M-UI label Sep 13, 2016
@derhuerst
Copy link
Contributor Author

[clabot:check]

@parity-cla-bot
Copy link

It looks like @derhuerst signed our Contributor License Agreement. 👍

Many thanks,

Ethcore CLA Bot

@derhuerst
Copy link
Contributor Author

@jacogr eslint still complains about missing curly braces after ifs. I thought I put this up for discussion.

@derhuerst derhuerst added the A0-pleasereview 🤓 Pull request needs code review. label Sep 13, 2016
};

const { name, key } = this.state;
const props = this.props.lookup;
Copy link
Contributor

Choose a reason for hiding this comment

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

Would have preferred if it was const lookup = this.props.lookup since it just clarifies exactly what you are working with.

Copy link
Contributor Author

@derhuerst derhuerst Sep 13, 2016

Choose a reason for hiding this comment

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

Yeah. I'm definitly not happy with <Lookup lookup={ lookup } actions={ actions.lookup } />. Would like to pass the props in directly without mentioning every single one. Is there a way?

Copy link
Contributor

Choose a reason for hiding this comment

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

Look at Tomasz' comment above, you can do <Component {...this.props} /> to pass everything available.

Now, a reducer can process an action that is not strictly related to the reducers area of responsibility, which is actually how Redux proposes to couple components. See http://redux.js.org/docs/basics/Reducers.html
In lookup/reducers, I changed `key` to `entry` because `key` is a special React prop.
This has a caveat: React will complain in the beginning because the initialState oftern contains `null` as default value, with means "missing" for React.
@derhuerst
Copy link
Contributor Author

I updated a few things. Left to review are the discussions on redux-actions and on Flux Standard Actions.


const renderDropped = (e) => (
<p key={ e.key } className={ styles.dropped }>
{ renderOwner(e.parameters.owner) }
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think I would prefer JSX instead of function calls here:
<Owner owner={e.parameters.owner} />
const RenderOwner = ({owner}) => ( ...unchanged... );

For me it would be easier to scan throught structure more quickly: It would be just another component displayed along with abbr and code tags.

A matter of taste, though.

@tomusdrw tomusdrw added A6-mustntgrumble 💦 Pull request has areas for improvement. The author need not address them before merging. and removed A0-pleasereview 🤓 Pull request needs code review. labels Sep 15, 2016
@tomusdrw
Copy link
Collaborator

👍 lgtm modulo minor style grumbles

@derhuerst
Copy link
Contributor Author

I'm sorry for making this PR so huge 😢

I'm considering the Registry dapp working well enough to deploy it. Therefore, I'd like to make all further changes (except minor grumbles) in follow-up PRs. Please review the last parts (account selector, events list).

@derhuerst derhuerst added A0-pleasereview 🤓 Pull request needs code review. and removed A6-mustntgrumble 💦 Pull request has areas for improvement. The author need not address them before merging. labels Sep 19, 2016
@jacogr jacogr added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Sep 19, 2016
@jacogr
Copy link
Contributor

jacogr commented Sep 19, 2016

Maintanable, good as a first stab to start getting it tested and fed back on.

@jacogr jacogr merged commit 0363af4 into js Sep 19, 2016
@jacogr jacogr deleted the parity-js-registry branch September 23, 2016 16:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants