Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDLE: Improve config dialog font change user interface #68964

Open
rhettinger opened this issue Aug 1, 2015 · 10 comments
Open

IDLE: Improve config dialog font change user interface #68964

rhettinger opened this issue Aug 1, 2015 · 10 comments
Assignees
Labels
topic-IDLE type-feature A feature request or enhancement

Comments

@rhettinger
Copy link
Contributor

BPO 24776
Nosy @rhettinger, @terryjreedy, @roseman
Dependencies
  • bpo-27755: Retire DynOptionMenu with a ttk Combobox
  • bpo-30870: IDLE: configdialog/fonts: change font when select by key up/down
  • bpo-30981: IDLE: Test config dialog font bold button and sample change
  • Files
  • cfg_font_layout.png: Alternative layout for font/tabs page
  • 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:

    assignee = 'https://github.com/terryjreedy'
    closed_at = None
    created_at = <Date 2015-08-01.21:12:47.540>
    labels = ['3.8', 'expert-IDLE', 'type-feature', '3.7']
    title = 'IDLE: Improve config dialog font change user interface'
    updated_at = <Date 2019-01-24.05:53:06.539>
    user = 'https://github.com/rhettinger'

    bugs.python.org fields:

    activity = <Date 2019-01-24.05:53:06.539>
    actor = 'terry.reedy'
    assignee = 'terry.reedy'
    closed = False
    closed_date = None
    closer = None
    components = ['IDLE']
    creation = <Date 2015-08-01.21:12:47.540>
    creator = 'rhettinger'
    dependencies = ['27755', '30870', '30981']
    files = ['40105']
    hgrepos = []
    issue_num = 24776
    keywords = []
    message_count = 10.0
    messages = ['247829', '247846', '247887', '248709', '248719', '248739', '248740', '298092', '298763', '334281']
    nosy_count = 3.0
    nosy_names = ['rhettinger', 'terry.reedy', 'markroseman']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = 'needs patch'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue24776'
    versions = ['Python 3.7', 'Python 3.8']

    @rhettinger
    Copy link
    Contributor Author

    A recurring issue with students using IDLE is the user interface for the fonts and tabs preference settings.

    • The default setting of 4 space tabs is a good default, but the giant slider cries out to be moved (usually when people are intending to increase their font size). A slider was not a good choice. It should use something like what is currently used for font size.

    • On the other hand, the font size would benefit from have a slider.

    • I don't know if anything can be done to improve the selection of the font face. The scrolling menu of choices worked great back when we only had a handful of choices but it had grown problematic with a large number of choices. It is a bit of a struggle to select Menlo on a Mac if you already know what you want.

    @rhettinger rhettinger added topic-IDLE type-feature A feature request or enhancement labels Aug 1, 2015
    @terryjreedy
    Copy link
    Member

    I agree that this tab needs an overhall.
    Existing issues would be part of this:
    17642 Font resizing hot keys (not sure about this)
    14440 Use multiple alphabets in example (definitely)

    Other ideas that I remember:

    • Enlarge dialog box as needed (it already expands horizontally with big fonts).
    • Put indent box across top with unobtrusive spinbox or pulldown box to right.
    • For font names, use the same sort of listbox as used with completions, where one can type initial chars of name in entry box and selection bar moves down to first entry that matches.
    • Put example box to right of selection box.

    @roseman
    Copy link
    Mannequin

    roseman mannequin commented Aug 2, 2015

    What do you think of the layout in cfg_font_layout.png? (before/after)

    @terryjreedy
    Copy link
    Member

    The side-by-side part I obviously like, but I think we need to keep 'Base Editor Font' since this and only this is affected by the selection. I think there should be an option to increase the 'other' font used for everything else.

    @rhettinger
    Copy link
    Contributor Author

    FWIW, I would also like a pair of hotkeys, Cmd + and Cmd - to increase and decrease the font (this would greatly improve usability for font size changes). There is good precedent for this in other editors and terminal programs.

    @roseman
    Copy link
    Mannequin

    roseman mannequin commented Aug 17, 2015

    Agree about the font resizing menu items/shortcuts... your original bpo-17642 remains open for this

    @terryjreedy
    Copy link
    Member

    I agree. Cntl/Cmd +/- font sizing works in turtledemo within sensible limits. The code could be copied.

    @terryjreedy
    Copy link
    Member

    Make this the master issue for improving the font tab user interface by improving components and rearranging them. With basic tests done, I am moving this up in priority.

    Related issues currently open.
    bpo-30870 (dependency) made Up/Down change font selection; unit test needed.
    bpo-27755 replaces IDLE's custom DynOptionMenu with ttk.Combobox. Comboboxes allow key entry of a value and the arrow toggles. See msg298091 for comparison and evaluation for font page.
    bpo-13802 (dependency) is about the improving the sample display.
    bpo-17642 is about font resizing by hot key and wheel in editor.
    bpo-20917 is about the font change notification system.

    Additional changes for this issue or new related issues.

    • Selecting a font by name (as well as a font size by number) can be done with an entry box with a validator linked to the listbox. If a ttk Combobox can be locked open, I would try that. See bpo-27755. For a demo of another alternative, run the tk fontchooser.
    import tkinter
    root = tkinter.Tk()
    root.tk.call('tk', 'fontchooser', 'show')

    For IDLE, I like some parts, not others. I view it as an alternate mockup for ideas to build on.

    • Mark's mockup removes "Base Editor Font". If an editor window can have its font individually resized, then the settings on the font page define just that. 'Font Size' would then have to be 'Starting [or Default] Font Size'.

    • Font size a slider? I am not convinced. It would have to be vertical to go up to 40. (I added larger sizes by request for classroom projector use.) On the other hand, it would allow any size in the given range. A spinbox that could be spun by mousewheel would also and stay compact. Or use a ttk Combobox.

    • See bpo-13802 for discussion of sample display.

    • Indent. I don't understand "cries out to be moved (usually when people are intending to increase their font size)." But I think it take too much space and should be shrunk to a spin box or drop box. Reduced to a single line, I am thinking of moving it to the General tab, or perhaps a new Editor tab. It does not particularly belong with font selection.

    • Factor the Font page, with associated Variables and their tracers, other attributes, and methods, into a FontPage class.

    @terryjreedy terryjreedy added the 3.7 (EOL) end of life label Jul 10, 2017
    @terryjreedy terryjreedy changed the title Improve Fonts/Tabs UX for IDLE IDLE: Improve config dialog font change user interface Jul 10, 2017
    @terryjreedy
    Copy link
    Member

    I decided to rearrange page bpo-24776 before changing sample bpo-13802.

    @terryjreedy
    Copy link
    Member

    I now think that the proper widget for font resizing might be a ttk.Spinbox (but see below). bpo-33962 discusses issues around using this widget.

    bpo-33397 is about adding local font resizing with hot key or mousewheel to text and help viewers via a new FontSizer class. Font Sizer should be usable with the sample Text instance. Size changes in the sample should propagate to the size widget. When done, it might suffice to use a simple entry box for font size. We already use them for counts on the General tab.

    Since we do not want to encourage indent changes, I think the indent widget should be an entry box with bounds check.

    @terryjreedy terryjreedy added the 3.8 only security fixes label Jan 24, 2019
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    @erlend-aasland erlend-aasland removed 3.8 only security fixes 3.7 (EOL) end of life labels Mar 3, 2024
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    topic-IDLE type-feature A feature request or enhancement
    Projects
    Status: No status
    Development

    No branches or pull requests

    3 participants