-
Notifications
You must be signed in to change notification settings - Fork 1
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
Adding styling to comment functionality #33
base: master
Are you sure you want to change the base?
Conversation
sracca
commented
Aug 1, 2019
- Waiting on icons from chapman
- Load comments with styles and add new comments #30 was closed accidentally when original branch was merged with master
... on Story { | ||
comments { | ||
createdAt | ||
id | ||
personId | ||
personName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should leave personId
in the schema with the way these commits are split out. If I checked out to the previous commit, this mutation would fail with a schema error.
projectId: projectId, | ||
text: commentRef.current.value, | ||
}); | ||
commentRef.current.value = ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@geraldalewis is this direct access / mutation of form fields still frowned upon with the new hooks approach?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cbarber I'm leaning towards this being the correct thing to do -- one way to look at refs is "a way to update state without triggering a re-render." Which implies the new refs were designed with mutation in mind. (Am I missing something though?)
users = curr_proj.memberships.map{ |membership| membership.person} | ||
build_comment(com: client.story(story_id).create_comment(text: text), project_users: users) | ||
curr_story = Story.find(story_id) | ||
curr_story.build_story(pt_story: client.story(story_id), project_users: users) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 The fetching and syncing is getting squirrelly. Might benefit from a discussion on how we should approach this.
Something's broken, and I'm not sure, please do not touch this branch until I'm finished |
f940289
to
7a6b093
Compare