Open terryjreedy opened 8 years ago
The 'General' tab of the IDLE configuration menu allows a user to add entries to the Help menu that display a text when clicked. A user might want more than one text available for a given 'topic', such as a doc and how-to for a package. However, there is no need to have duplicate entries, as up to 30 chars are allowed. "Package - doc" and "Package - how" would be clearer than "Package" and "Package". bpo-27380 makes checking for unique entries easy as that is already done for user configuration file section names and the same base class is now used for help source names.
Currently, names are displayed in the order added. I believe sorting would be better, especially when one adds more than 2 entries. That should also be easy.
Existing duplicates would not be a problem for IDLE as the check would only apply when adding or editing an item. Python's stable list.sort would keep existing duplicates in the same relative order. I will *not* use the doc path to break ties.
The IDLE doc currently says "Additional help sources may be added here with the Configure IDLE dialog under the General tab." Revise to something like
Additional help sources Menu items for display here are added on the General tap of Options => Configure IDLE. Menu entries should be unique (new in 3.6) and will be sorted. Documents can be located either on the current machine or on the internet. The allowed file types may depend on the system. Local file paths are checked when submitted; internet addresses are not.
Currently, names are displayed in the order added. I believe sorting would be better, especially when one adds more than 2 entries. That should also be easy.
I'm wondering if it would be worthwhile to add Drag and Drop functionality to the Help listbox to allow users to move the items into any order they want?
I have created a pull request for this issue. Please consider taking a look.
I'm wondering if it would be worthwhile to add Drag and Drop functionality to the Help listbox to allow users to move the items into any order they want?
I agree that allowing a user to set the order is preferable.
Rather than drag&drop, we could just add up/down buttons to allow re-ordering.
I suggest making ordering a separate issue, and accepting a simplified version of the PR which just ensures the names are unique.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields: ```python assignee = 'https://github.com/terryjreedy' closed_at = None created_at =
labels = ['3.8', 'expert-IDLE', 'type-bug', '3.7', '3.9']
title = 'IDLE:Make help source menu entries unique and sorted.'
updated_at =
user = 'https://github.com/terryjreedy'
```
bugs.python.org fields:
```python
activity =
actor = 'taleinat'
assignee = 'terry.reedy'
closed = False
closed_date = None
closer = None
components = ['IDLE']
creation =
creator = 'terry.reedy'
dependencies = ['27380']
files = []
hgrepos = []
issue_num = 27465
keywords = ['patch']
message_count = 5.0
messages = ['269965', '269966', '316296', '356274', '356606']
nosy_count = 4.0
nosy_names = ['terry.reedy', 'taleinat', 'cheryl.sabella', 'ZackerySpytz']
pr_nums = ['17093']
priority = 'normal'
resolution = None
stage = 'patch review'
status = 'open'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue27465'
versions = ['Python 3.7', 'Python 3.8', 'Python 3.9']
```