Skip to content

Commit

Permalink
feat: Send editor feedback
Browse files Browse the repository at this point in the history
Collecting feedback from users while in editor may uncover valuable
insights.
dcalhoun committed Jan 15, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent e72074a commit eccae06
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1412,6 +1412,8 @@ class EditPostActivity : AppCompatActivity(), EditorFragmentActivity, EditorImag
val historyMenuItem = menu.findItem(R.id.menu_history)
val settingsMenuItem = menu.findItem(R.id.menu_post_settings)
val helpMenuItem = menu.findItem(R.id.menu_editor_help)
val sendFeedbackItem = menu.findItem(R.id.menu_editor_send_feedback)

if (undoItem != null) {
undoItem.setEnabled(menuHasUndo)
undoItem.setVisible(!htmlModeMenuStateOn)
@@ -1496,6 +1498,11 @@ class EditPostActivity : AppCompatActivity(), EditorFragmentActivity, EditorImag
helpMenuItem.setVisible(false)
}
}

if (sendFeedbackItem != null) {
sendFeedbackItem.isVisible = editorFragment is GutenbergKitEditorFragment
}

return super.onPrepareOptionsMenu(menu)
}

@@ -1645,6 +1652,8 @@ class EditPostActivity : AppCompatActivity(), EditorFragmentActivity, EditorImag
analyticsTrackerWrapper.track(Stat.EDITOR_HELP_SHOWN, siteModel)
(editorFragment as GutenbergEditorFragment).showEditorHelp()
}
} else if (itemId == R.id.menu_editor_send_feedback) {
ActivityLauncher.viewFeedbackForm(this@EditPostActivity)
} else if (itemId == R.id.menu_undo_action) {
if (editorFragment is GutenbergEditorFragment) {
(editorFragment as GutenbergEditorFragment).onUndoPressed()
5 changes: 5 additions & 0 deletions WordPress/src/main/res/menu/edit_post.xml
Original file line number Diff line number Diff line change
@@ -71,5 +71,10 @@
android:title="@string/help_and_support" >
</item>

<item
android:id="@+id/menu_editor_send_feedback"
android:title="@string/send_feedback" >
</item>

</group>
</menu>

0 comments on commit eccae06

Please sign in to comment.