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: document new TabPage(Frame) design for configdialog #75266

Closed
terryjreedy opened this issue Jul 30, 2017 · 4 comments
Closed

IDLE: document new TabPage(Frame) design for configdialog #75266

terryjreedy opened this issue Jul 30, 2017 · 4 comments
Assignees
Labels
3.7 only security fixes topic-IDLE type-feature A feature request or enhancement

Comments

@terryjreedy
Copy link
Member

BPO 31083
Nosy @terryjreedy, @csabella
PRs
  • bpo-31083: IDLE: Document TabPage(Frame) for configdialog #2965
  • bpo-31083: IDLE: Document TabPage(Frame) for configdialog #2965
  • [3.6] bpo-31083: IDLE: Describe the Page classes in configdialog (GH-… #2973
  • 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 = <Date 2017-08-01.05:28:04.562>
    created_at = <Date 2017-07-30.21:50:03.679>
    labels = ['expert-IDLE', 'type-feature', '3.7']
    title = 'IDLE: document new TabPage(Frame) design for configdialog'
    updated_at = <Date 2017-08-01.05:28:04.561>
    user = 'https://github.com/terryjreedy'

    bugs.python.org fields:

    activity = <Date 2017-08-01.05:28:04.561>
    actor = 'terry.reedy'
    assignee = 'terry.reedy'
    closed = True
    closed_date = <Date 2017-08-01.05:28:04.562>
    closer = 'terry.reedy'
    components = ['IDLE']
    creation = <Date 2017-07-30.21:50:03.679>
    creator = 'terry.reedy'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 31083
    keywords = []
    message_count = 4.0
    messages = ['299524', '299595', '299597', '299599']
    nosy_count = 2.0
    nosy_names = ['terry.reedy', 'cheryl.sabella']
    pr_nums = ['2965', '2965', '2973']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue31083'
    versions = ['Python 3.6', 'Python 3.7']

    @terryjreedy
    Copy link
    Member Author

    We are in the process of moving blocks of ConfigDialog methods pertaining to one tab page to a separate class. FontPage is more or less done. GenPage is in process. This issue is about documenting the generic structure of the classes in a comment block. The following is extracted from msg299519 of bpo-31050.

    # class TabPage(Frame):
    # def __init__(self, master):
    # super().__init__(master)
    # self.create_page_tab()
    # self.load_tab_cfg()
    # def create_page_tab():
    # ...

    The rest will be an adaptation of the description of the old design in the same message plus what we have actually done so far.

    This issue includes editing FontPage to conform to the documented design.

    @terryjreedy terryjreedy added the 3.7 only security fixes label Jul 30, 2017
    @terryjreedy terryjreedy self-assigned this Jul 30, 2017
    @terryjreedy terryjreedy added topic-IDLE type-feature A feature request or enhancement labels Jul 30, 2017
    @terryjreedy
    Copy link
    Member Author

    New changeset 6f446be by Terry Jan Reedy (csabella) in branch 'master':
    bpo-31083: IDLE: Describe the Page classes in configdialog (bpo-2965)
    6f446be

    @terryjreedy
    Copy link
    Member Author

    New changeset 48fcc72 by Terry Jan Reedy in branch '3.6':
    [3.6] bpo-31083: IDLE: Describe the Page classes in configdialog (GH-2965) (bpo-2973)
    48fcc72

    @terryjreedy
    Copy link
    Member Author

    The next blockers are the tests for the other 3 tabs: bpo-31001, bpo-31002, bpo-31093.

    Steps for converting block of ConfigDialog methods for tab X into a class. Steps are updated from bpo-31050.

    • In create_widgets, change 'self.create_page_/highlight/keys/extensions/' to '/High/Keys/Ext/Page(note)'.
    • In load_configs, comment-out load_X_cfgs. If there is no problem moving all these calls into the class inits, method will be deleted.
    • Copy the block for X into its appropriate position after class FontPage.
    • Comment out old code.
    • Before the copy, add 'class XPage(Frame):' and def __init__ as given in the outline.
    • In the 'create_page_x' method, at the top, Pass 'self' instead of 'parent' as tk Var masters;
    • delete 'frame = dialog.tabpages...';
    • replace 'frame' with 'self' as master for widgets that used 'frame';
    • delete 'return frame' at end.

    After tests pass with revision above, delete original block of methods.

    I have considered doing this before writing tests, but I don't quite feel comfortable doing so. To convert tests written first:

    • change 'XTest' to 'XPageTest' where 2nd X is abbreviated form.
    • change setUpClass similarly as in FontPageTest;
    • change test functions similarly as in FontPageTest; change 'dialog' to 'self.page' and 'd = dialog' to 'd = self.page'.
    • make other changes needed to keep tests passing, but there may not be any more changes needed.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 only security fixes topic-IDLE type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant