Skip to content

feat: Add submit feedbacks #1639

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

Merged
merged 1 commit into from
Apr 25, 2019

Conversation

aggarwalpulkit596
Copy link
Contributor

@aggarwalpulkit596 aggarwalpulkit596 commented Apr 21, 2019

Fixes #1633

Changes: Added option to submit feedback

Screenshots for the change:

videotogif_2019 04 25_11 56 01

@auto-label auto-label bot added the feature label Apr 21, 2019
@aggarwalpulkit596
Copy link
Contributor Author

@nikit19 @liveHarshit please review

@aggarwalpulkit596
Copy link
Contributor Author

Also the feedback recyclerview isn't updating after feedback submission any ideas why ?

@aggarwalpulkit596
Copy link
Contributor Author

@liveHarshit review

@angmas1
Copy link
Contributor

angmas1 commented Apr 22, 2019

Also the feedback recyclerview isn't updating after feedback submission any ideas why ?

Current logic used to prevent reloading of fragments on rotation is causing these bugs. #1520 is a similar bug.

}

private fun writefeedback() {
val layout = layoutInflater.inflate(R.layout.dialog_feedback, null)
Copy link
Contributor

Choose a reason for hiding this comment

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

Not needed directly put layout in setView of AlertDialog. I had to do this in changePassword dialog because I wanted to run code without button press.

Copy link

Choose a reason for hiding this comment

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

I think layout is being referred for getting text and add textChangedListeners. So I suppose its fine to inflate layout here

@aggarwalpulkit596
Copy link
Contributor Author

@iamareebjamal
{
"data": {
"type": "feedback",
"attributes": {
"rating": "2.5",
"comment": "Awesome"
},
"relationships": {
"event": {
"data": {
"type": "event",
"id": "770"
}
},
"user": {
"data": {
"type": "user",
"id": "7625"
}
}
}
},
"included": [
{
"type": "user",
"id": "7625",
"attributes": {}
},
{
"type": "event",
"id": "770",
"attributes": {}
}
]
}
post request is adding included section as well any suggestions why it is happening

@aggarwalpulkit596 aggarwalpulkit596 changed the title feat: Add submit feedbacks [WIP]feat: Add submit feedbacks Apr 23, 2019
@auto-label auto-label bot removed the feature label Apr 23, 2019
@aggarwalpulkit596
Copy link
Contributor Author

@iamareebjamal nm it was because of onlineApiResourceConverter.enableSerializationOption(SerializationFeature.INCLUDE_RELATIONSHIP_ATTRIBUTES)

@aggarwalpulkit596 aggarwalpulkit596 changed the title [WIP]feat: Add submit feedbacks feat: Add submit feedbacks Apr 23, 2019
@auto-label auto-label bot added the feature label Apr 23, 2019
@aggarwalpulkit596
Copy link
Contributor Author

@nikit19 please review

@aggarwalpulkit596
Copy link
Contributor Author

@iamareebjamal @nikit19 updated

iamareebjamal
iamareebjamal previously approved these changes Apr 25, 2019
@iamareebjamal
Copy link
Member

Build is failing

@aggarwalpulkit596
Copy link
Contributor Author

@iamareebjamal updated

@aggarwalpulkit596
Copy link
Contributor Author

Resolved Conflicts. Should I squash them first ?

@@ -239,8 +238,6 @@ val networkModule = module {
EventSubTopic::class.java, Feedback::class.java, Speaker::class.java,
EventFAQ::class.java)

onlineApiResourceConverter.enableSerializationOption(SerializationFeature.INCLUDE_RELATIONSHIP_ATTRIBUTES)
Copy link
Member

Choose a reason for hiding this comment

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

Why removed?

Copy link
Contributor Author

@aggarwalpulkit596 aggarwalpulkit596 Apr 25, 2019

Choose a reason for hiding this comment

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

{
"data": {
"type": "feedback",
"attributes": {
"rating": "2.5",
"comment": "Awesome"
},
"relationships": {
"event": {
"data": {
"type": "event",
"id": "770"
}
},
"user": {
"data": {
"type": "user",
"id": "7625"
}
}
}
},
"included": [
{
"type": "user",
"id": "7625",
"attributes": {}
},
{
"type": "event",
"id": "770",
"attributes": {}
}
]
}
becuase in this post request Included was added

Copy link
Member

Choose a reason for hiding this comment

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

Explain please

Copy link
Member

Choose a reason for hiding this comment

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

OK. Got it. But won't it effect past modules

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nope I have checked it isn't affecting any modules it may have broken some code before but everything is working fine

@aggarwalpulkit596
Copy link
Contributor Author

@iamareebjamal updated

@iamareebjamal iamareebjamal merged commit b2a1661 into fossasia:development Apr 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Submit Feedbacks for events
4 participants