enthought / enthought/traitsui

Documentation on the HelpButton's default action is limited and difficult to find

Open
#1,633 3 comments 0 reactions 0 assignees View on GitHub
component: documentation
Dominant language
Python
Stars
306
Forks
99
PR merge metrics
No merged PRs in 30d

Description

It's easy, from the User Manual, to understand how to add a default button (https://github.com/enthought/traitsui/blob/master/docs/source/traitsui_user_manual/custom_view.rst#command-buttons-the-buttons-attribute) such as `HelpButton`, but there is no easy way, from there, to understand what defines their default action.

The HelpButton’s default action is the Handler’s `show_help()`, but its API doc doesn't specify that it can/should be overridden:

https://github.com/enthought/traitsui/blob/199d6f2a78153df0ad66b8caae5c9fb9d73dfff1/traitsui/handler.py#L161-L168

It actually refers to the [API Doc](https://docs.enthought.com/traitsui/api/traitsui.help.html) for [help.py](https://github.com/enthought/traitsui/blob/master/traitsui/help.py), which also doesn't help solving the issue ("how do I attach an action to a HelpButton?"), so this reference seems misleading.

The only place where this answer can be found is in the Handler user manual: https://github.com/enthought/traitsui/blob/master/docs/source/traitsui_user_manual/handler.rst#overriding-standard-methods but it's not necessarily the first place where one would look.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.