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: Use text widget for code context instead of label widget #77944

Closed
csabella opened this issue Jun 4, 2018 · 7 comments
Closed

IDLE: Use text widget for code context instead of label widget #77944

csabella opened this issue Jun 4, 2018 · 7 comments
Assignees
Labels
3.7 (EOL) end of life 3.8 only security fixes topic-IDLE type-feature A feature request or enhancement

Comments

@csabella
Copy link
Contributor

csabella commented Jun 4, 2018

BPO 33763
Nosy @terryjreedy, @csabella, @miss-islington
PRs
  • bpo-33763: IDLE: Replace label widget with text widget in code context #7367
  • [3.7] bpo-33763: IDLE: Replace label widget with text widget in code context (GH-7367) #7399
  • [3.6] bpo-33763: IDLE: Replace label widget with text widget in code context (GH-7367) #7400
  • 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 2018-06-04.17:02:38.650>
    created_at = <Date 2018-06-04.00:11:28.819>
    labels = ['3.8', 'expert-IDLE', 'type-feature', '3.7']
    title = 'IDLE: Use text widget for code context instead of label widget'
    updated_at = <Date 2018-06-04.17:02:38.648>
    user = 'https://github.com/csabella'

    bugs.python.org fields:

    activity = <Date 2018-06-04.17:02:38.648>
    actor = 'terry.reedy'
    assignee = 'terry.reedy'
    closed = True
    closed_date = <Date 2018-06-04.17:02:38.650>
    closer = 'terry.reedy'
    components = ['IDLE']
    creation = <Date 2018-06-04.00:11:28.819>
    creator = 'cheryl.sabella'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 33763
    keywords = ['patch']
    message_count = 7.0
    messages = ['318588', '318637', '318646', '318663', '318669', '318670', '318676']
    nosy_count = 3.0
    nosy_names = ['terry.reedy', 'cheryl.sabella', 'miss-islington']
    pr_nums = ['7367', '7399', '7400']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue33763'
    versions = ['Python 3.6', 'Python 3.7', 'Python 3.8']

    @csabella
    Copy link
    Contributor Author

    csabella commented Jun 4, 2018

    Item 11 from bpo-33610.
    Use read-only Text instead of Label for context.

    • Change widget type from Label to Text and remove Label-only arguments.
    • Add height and state arguments.
    • Change widget name from self.label to self.context.
    • Tests: change widget name and method for getting text.

    @csabella csabella added 3.7 (EOL) end of life 3.8 only security fixes labels Jun 4, 2018
    @csabella csabella added topic-IDLE type-feature A feature request or enhancement labels Jun 4, 2018
    @terryjreedy
    Copy link
    Member

    This makes detecting the context line a user clicks on slightly easier. See new issue bpo-33768 for discussion. I am not sure now I would do this just for this reason, without trying with the label first.

    Using a text also allows us to experiment with tagging the context keyword somehow, to see if it seems like an improvement. Perhaps make it bold, or underlined, or the normal keyword color, or some variant thereof (grayed?).

    So I am inclined to go ahead. I did notice that most of the patch is straightforward substitution. To me, this suggests that the code is pretty good. Also, I think change 'label' (implentation) to 'context' (purpose) is a good change by itself. I would keep this even if we reverted to using Label.

    @csabella
    Copy link
    Contributor Author

    csabella commented Jun 4, 2018

    To your point, when I was adding the colors to configuration for context, I wondered if having context as a text widget could somehow use the colorizer. I didn't really look into it, but it did seem like it might make sense to keep all the foreground text colors the same as they are in the editor.

    @terryjreedy
    Copy link
    Member

    New changeset b609e68 by Terry Jan Reedy (Cheryl Sabella) in branch 'master':
    bpo-33763: IDLE: Replace label widget with text widget in code context (GH-7367)
    b609e68

    @miss-islington
    Copy link
    Contributor

    New changeset ffe29db by Miss Islington (bot) in branch '3.6':
    bpo-33763: IDLE: Replace label widget with text widget in code context (GH-7367)
    ffe29db

    @miss-islington
    Copy link
    Contributor

    New changeset b7eb102 by Miss Islington (bot) in branch '3.7':
    bpo-33763: IDLE: Replace label widget with text widget in code context (GH-7367)
    b7eb102

    @terryjreedy
    Copy link
    Member

    I believe the colorizer would need some new code, maybe in a subclass, but it should be possible. I would not know if I liked it until we tried it ;-).

    @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 (EOL) end of life 3.8 only security fixes topic-IDLE type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants