Project 2: Go-To-Line Feature Upgrade

Final Submission Due Date: Tuesday, April 15 @ 11:59PM


Note: Please do your work for Project 2 in a new branch that you create (do not use the feedback branch or other existing branches).

Motivation

Our marketing team has just conducted extensive user testing of developers that use IDLE. One of the main issues identified by our team involved the Go To Line feature found under Edit when the Python Editor Window is open.

IDLE_feature

Users reported being confused about what big meant (whether it meant they should type in the word big or type in a big number). We would like you to update the Go To Line popup to fix this issue.

Our competitors, such as VS Code, have an effective implementation of such a feature. When the user sees the popup for Go To Line, the maximum allowed input (i.e., the number of lines within a file) is shown to the users.

VS_feature

Task

Specifically, edit the Go To Line popup to fulfill these requirements:

Required Features

You must implement the following features to receive full credit for this assignment.

  • Show the user their current line number when the Go To Line popup is displayed. See the image of the VSCode feature to see an example.
  • If the user enters a value that is too large (bigger than the total number of lines), a red error message should be shown to users that says Enter a number between 1 and N, inclusive where N is the number of lines in the file.
  • Implement the logic for handling a negative number using reverse indexing. For example, -1 should go to the last line, -2 should be the second to last line, etc. If a user enters a number that is too negative such that it extends past the first line, the error message shown to users should say Negative entries must be between -N and -1, inclusive where N is the number of lines in the file.
  • Change the Go To Line popup such that the popup should show the user the range of values allowed (i.e., show the total number of lines). You can choose the exact wording, but it should mention that a user can enter a number between 1 and N or -N and -1.
  • (OPTIONAL) Allow entries for the Go To Line popup to be formatted like X:Y where X is the line number and Y is the column (character) number within that line.
  • (OPTIONAL) Create some other custom enhancement to the feature that you think can help us stand out from our competitors! It can be a visual enhancement, an additional input that is accepted, etc.

Submission

Please create a folder called Project2 inside the idlelib codebase. Within this folder, you will add two documents: a Design Document and a Process Journal. The instructions for each of these can be found under the “Projects” heading on the left. For the final pull request, please follow the template provided in the “Pull Request Page” under “Projects.”