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

Adding styling to comment functionality #33

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

sracca
Copy link
Contributor

@sracca sracca commented Aug 1, 2019

package.json Outdated Show resolved Hide resolved
... on Story {
comments {
createdAt
id
personId
personName
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 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 = '';
Copy link
Collaborator

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?

Copy link
Collaborator

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?)

server/app/models/user.rb Outdated Show resolved Hide resolved
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)
Copy link
Collaborator

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.

@sracca sracca added the do not merge Reviewable, but some condition must be met before merging label Aug 2, 2019
@sracca
Copy link
Contributor Author

sracca commented Aug 2, 2019

Something's broken, and I'm not sure, please do not touch this branch until I'm finished

@sracca sracca force-pushed the sr/load_comments branch from f940289 to 7a6b093 Compare August 5, 2019 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge Reviewable, but some condition must be met before merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants