Skip to content

Commit

Permalink
Update design for the edit patrol
Browse files Browse the repository at this point in the history
  • Loading branch information
cooltey committed Aug 29, 2024
1 parent cbcef7a commit 0d402e8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/src/main/java/org/wikipedia/views/SurveyDialog.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import android.app.Activity
import android.view.View
import android.widget.TextView
import androidx.appcompat.app.AlertDialog
import androidx.core.view.isVisible
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.textfield.TextInputEditText
import org.wikipedia.Constants
Expand All @@ -23,7 +24,6 @@ object SurveyDialog {
val feedbackView = activity.layoutInflater.inflate(R.layout.dialog_feedback_options, null)
feedbackView.findViewById<TextView>(R.id.messageText).text = activity.getString(messageId)

// TODO: talk to Jaz to see if the logic needs to be aligned with RC
if (source == Constants.InvokeSource.SUGGESTED_EDITS_RECENT_EDITS) {
val clickListener = View.OnClickListener {
val feedbackOption = (it as TextView).text.toString()
Expand All @@ -40,7 +40,10 @@ object SurveyDialog {
feedbackView.findViewById<TextView>(R.id.optionSatisfied).setOnClickListener(clickListener)
feedbackView.findViewById<TextView>(R.id.optionNeutral).setOnClickListener(clickListener)
feedbackView.findViewById<TextView>(R.id.optionUnsatisfied).setOnClickListener(clickListener)
} else if (source == Constants.InvokeSource.RECOMMENDED_CONTENT) {
feedbackView.findViewById<View>(R.id.feedbackInputContainer).isVisible = true
}

sendAnalyticsEvent("impression", "feedback_form", source)
val dialogBuilder = MaterialAlertDialogBuilder(activity)
.setTitle(titleId)
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/dialog_feedback_options.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
android:id="@+id/feedbackInputContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
android:hint="@string/recommended_content_survey_dialog_input_hint"
app:hintTextColor="?attr/secondary_color">

Expand Down

0 comments on commit 0d402e8

Please sign in to comment.