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

Manually input number of days #24

Open
lineaba opened this Issue Apr 21, 2018 · 6 comments

Comments

Projects
None yet
5 participants
@lineaba
Collaborator

lineaba commented Apr 21, 2018

We could maybe implement a button, that opens up a text-input-box, that lets user input the numbers of days they have already progressed.

This would be useful if:

  • The user starts using the prog-o-meter, but have been doing their challenge for a while (i.e. user is on day 12 of their #100DaysofCode challenge, and wanna starts using the prog-o-meter. Instead of having to click the "1 more day!" button 12 times, they can manually input the number of days they have already completed)
  • The user forgets to update the prog-o-meter for a couple of days, and don't wanna have to input all the days, by clicking the "1 more day!" multiple times.
  • It might also be useful if the user have accidentally clicked the "1 more day!" button too many times, but we should figure out if it would be better to rather add an "WOOPS!" button, to let the user undo a click on the "1 more day!" button. (We should therefor consider whether it should only be allowed to use the manual input days button to add numbers of days that are larger than current number of days - I would like to hear what other people think)

Suggestion:

  • Create a button that is added to the Tkinter canvas (You can look at the code for the submit buttons in the prog-o-meter.py file, to get inspiration on how to make a button - however, you will have to add information about the placement of the new button)
  • When the user click the button, a new window should open up, with a text field where user can type their current number of days, and click submit (You can take inspiration from the UsernameGUI in the prog-o-meter.py file, for inspiration on how to create a simple window that takes user input in text format) Remember to convert the input to an integer, if it isn't automatically taken as an integer - you should also check if the number the user provided is between 0 and self.GOAL (which is the number of days the user is trying to reach.) If the input is not a number or it is smaller than 0 or greater than self.GOAL, we should show probably print an error message "input not understood", or something similar, and then the user will have to click the button and try again - you don't need to worry about this to begin with, we can start by assuming the user will behave well, and then add a check later.
  • When the user have clicked submit, we should update the variable self.days to hold the new number of days, and we need to store the new number of days in the user's file. We can use the update_days_file function to do this.
  • When we have stored the new number of days, we need to update the prog-o-meter, this can be done by calling the function progress()

As always the above is just a suggestion, and there are probably many other problems to solve the problem. Feel free to do it your way.
Let me know if you have any questions, or want some help getting started, by posting a comment below.

@sn0rkle

This comment has been minimized.

Collaborator

sn0rkle commented Apr 27, 2018

I'd happily love to give this a shot.

@B-Souty

This comment has been minimized.

Collaborator

B-Souty commented Apr 27, 2018

I believe @chiranjev is already working on it, correct?

@lineaba

This comment has been minimized.

Collaborator

lineaba commented Apr 27, 2018

@0xJosh, yes @chiranjev is currently working on this :)

@lineaba

This comment has been minimized.

Collaborator

lineaba commented Apr 27, 2018

@0xJosh Here are some issues you could work on: #49 or #33. Let me know if you would be interested in one of those. For #33 we can brainstorm a bit more about how it should look/work, if you want.

chiranjev added a commit to chiranjev/prog-o-meter that referenced this issue Apr 29, 2018

chiranjev added a commit to chiranjev/prog-o-meter that referenced this issue Apr 29, 2018

@chiranjev chiranjev referenced this issue Apr 29, 2018

Closed

solved issue Manually input number of days #24 #65

1 of 1 task complete
@omkar2810

This comment has been minimized.

Contributor

omkar2810 commented Jun 4, 2018

Is someone working on this currently , otherwise I'd like to take this.
PS - please refer to my comment on #91

@lineaba

This comment has been minimized.

Collaborator

lineaba commented Jun 4, 2018

Hey @omkar2810, this issue have already been solved, it has just not been merged yet, because some details need to be worked out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment