Remove Request Docs button in the script editor due to various issues

The Request Docs button is partly responsible for layout overflow
issues on narrow displays, such as #31133.

It also tended to attract spam and low-effort issues that were
difficult to act upon. A "Send Docs Feedback" menu option has been added
to replace it.
This commit is contained in:
Hugo Locurcio 2020-01-29 23:10:09 +01:00
parent 5f11e15571
commit 2f6f029a75
5 changed files with 11 additions and 20 deletions

View File

@ -39,8 +39,6 @@
#include "editor_settings.h" #include "editor_settings.h"
#define CONTRIBUTE_URL "https://docs.godotengine.org/en/latest/community/contributing/updating_the_class_reference.html" #define CONTRIBUTE_URL "https://docs.godotengine.org/en/latest/community/contributing/updating_the_class_reference.html"
#define CONTRIBUTE2_URL "https://github.com/godotengine/godot-docs"
#define REQUEST_URL "https://github.com/godotengine/godot-docs/issues/new"
DocData *EditorHelp::doc = NULL; DocData *EditorHelp::doc = NULL;

View File

@ -514,7 +514,9 @@ void EditorNode::_notification(int p_what) {
p->set_item_icon(p->get_item_index(HELP_SEARCH), gui_base->get_theme_icon("HelpSearch", "EditorIcons")); p->set_item_icon(p->get_item_index(HELP_SEARCH), gui_base->get_theme_icon("HelpSearch", "EditorIcons"));
p->set_item_icon(p->get_item_index(HELP_DOCS), gui_base->get_theme_icon("Instance", "EditorIcons")); p->set_item_icon(p->get_item_index(HELP_DOCS), gui_base->get_theme_icon("Instance", "EditorIcons"));
p->set_item_icon(p->get_item_index(HELP_QA), gui_base->get_theme_icon("Instance", "EditorIcons")); p->set_item_icon(p->get_item_index(HELP_QA), gui_base->get_theme_icon("Instance", "EditorIcons"));
p->set_item_icon(p->get_item_index(HELP_ISSUES), gui_base->get_theme_icon("Instance", "EditorIcons")); p->set_item_icon(p->get_item_index(HELP_ABOUT), gui_base->get_theme_icon("Godot", "EditorIcons"));
p->set_item_icon(p->get_item_index(HELP_REPORT_A_BUG), gui_base->get_theme_icon("Instance", "EditorIcons"));
p->set_item_icon(p->get_item_index(HELP_SEND_DOCS_FEEDBACK), gui_base->get_theme_icon("Instance", "EditorIcons"));
p->set_item_icon(p->get_item_index(HELP_COMMUNITY), gui_base->get_theme_icon("Instance", "EditorIcons")); p->set_item_icon(p->get_item_index(HELP_COMMUNITY), gui_base->get_theme_icon("Instance", "EditorIcons"));
p->set_item_icon(p->get_item_index(HELP_ABOUT), gui_base->get_theme_icon("Godot", "EditorIcons")); p->set_item_icon(p->get_item_index(HELP_ABOUT), gui_base->get_theme_icon("Godot", "EditorIcons"));
@ -2632,9 +2634,12 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
case HELP_QA: { case HELP_QA: {
OS::get_singleton()->shell_open("https://godotengine.org/qa/"); OS::get_singleton()->shell_open("https://godotengine.org/qa/");
} break; } break;
case HELP_ISSUES: { case HELP_REPORT_A_BUG: {
OS::get_singleton()->shell_open("https://github.com/godotengine/godot/issues"); OS::get_singleton()->shell_open("https://github.com/godotengine/godot/issues");
} break; } break;
case HELP_SEND_DOCS_FEEDBACK: {
OS::get_singleton()->shell_open("https://github.com/godotengine/godot-docs/issues");
} break;
case HELP_COMMUNITY: { case HELP_COMMUNITY: {
OS::get_singleton()->shell_open("https://godotengine.org/community"); OS::get_singleton()->shell_open("https://godotengine.org/community");
} break; } break;
@ -6250,7 +6255,8 @@ EditorNode::EditorNode() {
p->add_separator(); p->add_separator();
p->add_icon_shortcut(gui_base->get_theme_icon("Instance", "EditorIcons"), ED_SHORTCUT("editor/online_docs", TTR("Online Docs")), HELP_DOCS); p->add_icon_shortcut(gui_base->get_theme_icon("Instance", "EditorIcons"), ED_SHORTCUT("editor/online_docs", TTR("Online Docs")), HELP_DOCS);
p->add_icon_shortcut(gui_base->get_theme_icon("Instance", "EditorIcons"), ED_SHORTCUT("editor/q&a", TTR("Q&A")), HELP_QA); p->add_icon_shortcut(gui_base->get_theme_icon("Instance", "EditorIcons"), ED_SHORTCUT("editor/q&a", TTR("Q&A")), HELP_QA);
p->add_icon_shortcut(gui_base->get_theme_icon("Instance", "EditorIcons"), ED_SHORTCUT("editor/issue_tracker", TTR("Issue Tracker")), HELP_ISSUES); p->add_icon_shortcut(gui_base->get_theme_icon("Instance", "EditorIcons"), ED_SHORTCUT("editor/report_a_bug", TTR("Report a Bug")), HELP_REPORT_A_BUG);
p->add_icon_shortcut(gui_base->get_theme_icon("Instance", "EditorIcons"), ED_SHORTCUT("editor/send_docs_feedback", TTR("Send Docs Feedback")), HELP_SEND_DOCS_FEEDBACK);
p->add_icon_shortcut(gui_base->get_theme_icon("Instance", "EditorIcons"), ED_SHORTCUT("editor/community", TTR("Community")), HELP_COMMUNITY); p->add_icon_shortcut(gui_base->get_theme_icon("Instance", "EditorIcons"), ED_SHORTCUT("editor/community", TTR("Community")), HELP_COMMUNITY);
p->add_separator(); p->add_separator();
p->add_icon_shortcut(gui_base->get_theme_icon("Godot", "EditorIcons"), ED_SHORTCUT("editor/about", TTR("About")), HELP_ABOUT); p->add_icon_shortcut(gui_base->get_theme_icon("Godot", "EditorIcons"), ED_SHORTCUT("editor/about", TTR("About")), HELP_ABOUT);

View File

@ -194,7 +194,8 @@ private:
HELP_SEARCH, HELP_SEARCH,
HELP_DOCS, HELP_DOCS,
HELP_QA, HELP_QA,
HELP_ISSUES, HELP_REPORT_A_BUG,
HELP_SEND_DOCS_FEEDBACK,
HELP_COMMUNITY, HELP_COMMUNITY,
HELP_ABOUT, HELP_ABOUT,

View File

@ -1093,11 +1093,6 @@ void ScriptEditor::_menu_option(int p_option) {
OS::get_singleton()->shell_open("https://docs.godotengine.org/"); OS::get_singleton()->shell_open("https://docs.godotengine.org/");
} break; } break;
case REQUEST_DOCS: {
OS::get_singleton()->shell_open("https://github.com/godotengine/godot-docs/issues/new");
} break;
case WINDOW_NEXT: { case WINDOW_NEXT: {
_history_forward(); _history_forward();
@ -1398,7 +1393,6 @@ void ScriptEditor::_notification(int p_what) {
help_search->set_icon(get_theme_icon("HelpSearch", "EditorIcons")); help_search->set_icon(get_theme_icon("HelpSearch", "EditorIcons"));
site_search->set_icon(get_theme_icon("Instance", "EditorIcons")); site_search->set_icon(get_theme_icon("Instance", "EditorIcons"));
request_docs->set_icon(get_theme_icon("Issue", "EditorIcons"));
script_forward->set_icon(get_theme_icon("Forward", "EditorIcons")); script_forward->set_icon(get_theme_icon("Forward", "EditorIcons"));
script_back->set_icon(get_theme_icon("Back", "EditorIcons")); script_back->set_icon(get_theme_icon("Back", "EditorIcons"));
@ -3260,12 +3254,6 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
menu_hb->add_child(site_search); menu_hb->add_child(site_search);
site_search->set_tooltip(TTR("Open Godot online documentation.")); site_search->set_tooltip(TTR("Open Godot online documentation."));
request_docs = memnew(ToolButton);
request_docs->set_text(TTR("Request Docs"));
request_docs->connect("pressed", callable_mp(this, &ScriptEditor::_menu_option), varray(REQUEST_DOCS));
menu_hb->add_child(request_docs);
request_docs->set_tooltip(TTR("Help improve the Godot documentation by giving feedback."));
help_search = memnew(ToolButton); help_search = memnew(ToolButton);
help_search->set_text(TTR("Search Help")); help_search->set_text(TTR("Search Help"));
help_search->connect("pressed", callable_mp(this, &ScriptEditor::_menu_option), varray(SEARCH_HELP)); help_search->connect("pressed", callable_mp(this, &ScriptEditor::_menu_option), varray(SEARCH_HELP));

View File

@ -159,7 +159,6 @@ class ScriptEditor : public PanelContainer {
REPLACE_IN_FILES, REPLACE_IN_FILES,
SEARCH_HELP, SEARCH_HELP,
SEARCH_WEBSITE, SEARCH_WEBSITE,
REQUEST_DOCS,
HELP_SEARCH_FIND, HELP_SEARCH_FIND,
HELP_SEARCH_FIND_NEXT, HELP_SEARCH_FIND_NEXT,
HELP_SEARCH_FIND_PREVIOUS, HELP_SEARCH_FIND_PREVIOUS,
@ -204,7 +203,6 @@ class ScriptEditor : public PanelContainer {
Button *help_search; Button *help_search;
Button *site_search; Button *site_search;
Button *request_docs;
EditorHelpSearch *help_search_dialog; EditorHelpSearch *help_search_dialog;
ItemList *script_list; ItemList *script_list;