Skip to content
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

Loading indicator in tree #27

Merged
merged 2 commits into from
Jan 20, 2016

Conversation

skurfuerst
Copy link
Member

No description provided.

const nodeWhichIsNotLoadingAnymore = $set(updatedRootInStore, 'isLoading', false);
this.updateNode(nodeWhichIsNotLoadingAnymore);
this.store.dispatch(actions.UI.PageTree.setSubTree(storePath, json));
});
Copy link
Member Author

Choose a reason for hiding this comment

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

for this part, I'd be curious about a code review, specifically:

  • is this code idiomatic?
  • is the name "nodeWhichIsNotLoadingAnymore" good? (I think not). Better suggestions?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hey Sebastian,

thanks for this PR :). To your questions:

is this code idiomatic?

Looks good to me. But I have to admit, that I'm about to refactor the entire server-communication with redux-thunk to get rid of those lengthy Promise chains and have loading state handled more implicitly. I will also refactor the service layer into a purely functional form, since the current architecture invites to introduce side effects.

is the name "nodeWhichIsNotLoadingAnymore" good? (I think not). Better suggestions?

I agree there, it seems a bit off^^. Since you have two isomorphic operations going on before and after the remote call, I would suggest to describe that with preLoadingRootState and postLoadingRootState or something in that fashion. In this particular case, I think it's even okay to drop the constants alltogether and just pass the $set call to the update method. The resulting statement seems pretty descriptive anyway and since the updated node state objects are not reused anywhere else, it might be okay to omit the assignments.

Copy link
Contributor

Choose a reason for hiding this comment

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

@grebaldi has written what I was about to write, and what I had already suggested to Tyll. Great we're on the same page here!

@Inkdpixels
Copy link
Contributor

Looks good, as @grebaldi said, we will refactor the promise based actions later on with redux-thunk :) 👍

grebaldi added a commit that referenced this pull request Jan 20, 2016
@grebaldi grebaldi merged commit 0b04bc8 into neos:master Jan 20, 2016
@grebaldi
Copy link
Contributor

I merged this for now, since it works with the current implementation and thus will be carried over for the refactoring.

@skurfuerst skurfuerst deleted the loading-indicator-in-tree branch July 11, 2016 10:51
dimaip pushed a commit to dimaip/neos-ui that referenced this pull request Oct 7, 2016
…s-0.6.0

Update postcss-css-variables to version 0.6.0 🚀
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.

4 participants