Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign uplearn v2 #114
learn v2 #114
Conversation
2. changed time icon to calendar in events 3. fluid prop to button added
|
@saiabhijitht please let me know on the designs of the learn cards while i work on others |
|
Deploy preview ready! Built with commit a328223 |
| ...this.state.nodeStateTracker.slice(0, i), | ||
| !this.state.nodeStateTracker[i], | ||
| ...this.state.nodeStateTracker.slice(i + 1), | ||
| ], |
This comment has been minimized.
This comment has been minimized.
abiduzz420
Dec 3, 2017
Contributor
I am curious to know if the implementation I mentioned below is right according to React practices
handleClick = i => {
const { nodeStateTracker } = this.state;
nodeStateTracker[i] = false;
this.forceUpdate()
}
This comment has been minimized.
This comment has been minimized.
M-ZubairAhmed
Dec 3, 2017
Author
Collaborator
Using forceUpdate is often discouraged which can be done with setState instead.
Also state is suppose to be updated with setState . But i havent tried the above code, let me know if its work
This comment has been minimized.
This comment has been minimized.
abiduzz420
Dec 3, 2017
•
Contributor
Yeah I took the assumption that nodeStateTracker[i] is a child of the state array hence it may not re-render. Hence I did forceUpdate. I kept in my mind that we cannot mutate the state directly though assignment. See if this works and let me know.
| let arrowClassName = 'tree-view_arrow'; | ||
| let containerClassName = 'tree-view_children'; | ||
| if (collapsed) { | ||
| arrowClassName += ' tree-view_arrow-collapsed'; |
This comment has been minimized.
This comment has been minimized.
abiduzz420
Dec 3, 2017
Contributor
Following ES6 Syntax of concatenating strings
arrowClassName = `${arrowClassName} tree-view_arrow-collapsed`
| ); | ||
| return ( | ||
| <TreeView | ||
| key={i} |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
M-ZubairAhmed
Dec 3, 2017
Author
Collaborator
@abiduzz420 i am pushing the latest changes. I will go through your review in some time Thank you for reviewing.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@vinaypuppal can you help me with the rest of the css implementation of this pr? |
2. code base of tree view simplified 3. UI design of tree view complete 4. other minor fixes
|
@saiabhijitht can you review this and let me know the changes |
|
|
@M-ZubairAhmed
|
|
On /learn page :
|
|
@aravindballa @buoyantair Thanks for the suggestions. We are not going with the shadows as it does not go with the remaining design as you said. |
|
@M-ZubairAhmed
|
|
|
@M-ZubairAhmed
|
M-ZubairAhmed commentedNov 29, 2017
•
edited