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

Frontend: submit data entry using correct polling station information #108

Closed
Tracked by #96
praseodym opened this issue Jun 26, 2024 · 14 comments · Fixed by #199
Closed
Tracked by #96

Frontend: submit data entry using correct polling station information #108

praseodym opened this issue Jun 26, 2024 · 14 comments · Fixed by #199
Labels
frontend Issues or pull requests that relate to the frontend

Comments

@praseodym
Copy link
Contributor

praseodym commented Jun 26, 2024

Make sure that the data entry page uses the correct polling station information (id, number, name) from the polling station that was selected and also submit to the data entry API endpoint using the that id.

Cases to consider:

  • existing polling station number
  • non-existing polling station number
  • not a number, e.g. "asd", to be handled the same as non-existing polling station number, see comment in earlier PR
  • no polling station number (user immediately clicks "Beginnen" without inputting a polling station number)

Submitting through the keyboard should not happen on "Enter", only on "Shift + Enter".

@praseodym praseodym changed the title Frontend: submit data entry using correct polling station id Frontend: submit data entry using correct polling station information Jun 26, 2024
@praseodym praseodym added the frontend Issues or pull requests that relate to the frontend label Jun 26, 2024
@praseodym praseodym moved this from Options to Current in Abacus Development Jul 4, 2024
@cikzh
Copy link
Contributor

cikzh commented Jul 24, 2024

@jorisleker As far as I can tell the design doesn't specify what happens to the "Beginnen" button when an invalid station number is entered. Should we disable the button until a valid and existing polling station is entered? Or should clicking the button just "do nothing"?

@jorisleker
Copy link
Contributor

For now it's okay to 'just to nothing'. Has not been designed, we will decide how to handle this based on user research

@praseodym
Copy link
Contributor Author

praseodym commented Jul 26, 2024

Cases to consider:

  • existing polling station number
  • non-existing polling station number
  • not a number, e.g. "asd", to be handled the same as non-existing polling station number, see comment in earlier PR
  • no polling station number (user immediately clicks "Beginnen" without inputting a polling station number)

Submitting through the keyboard should not happen on "Enter", only on "Shift + Enter".

@jschuurk-kr you added these items to the issue description but they are not about the data entry form which this issue is about, but the polling station select page that was done in #107. Can you confirm that these points are resolved now?

@jschuurk-kr
Copy link
Contributor

jschuurk-kr commented Jul 26, 2024

<snipped>

@jschuurk-kr you added these items to the issue description but they are not about the data entry form which this issue is about, but the polling station select page that was done in #107. Can you confirm that these points are resolved now?

@praseodym It was not entirely clear to me if clicking "Beginnen" was part of #107 or not, hence that I added those cases here.

As to their status, the first three are ok. If you enter something in the input field, it's either a valid polling station number or not. If it's valid, clicking "Beginnen" gets you to the next page. If it's not valid, nothing happens, but the user is shown the error "Geen stembureau gevonden met nummer <input>" next to the input field.

The fourth one is not resolved. If you click "Beginnen" without inputting a polling station number, nothing happens. We should provide some feedback to the user.

@cikzh
Copy link
Contributor

cikzh commented Jul 26, 2024

I considered the fourth case to be the same as @jorisleker's comment (#108 (comment)) on case 2.
If it needs fixing I create a separate issue/PR from this one.

@jorisleker
Copy link
Contributor

Yes, we can handle case 2 and 4 the same way. That is: no action needed now, but will consider adding specific feedback for those cases

@jschuurk-kr
Copy link
Contributor

Yes, we can handle case 2 and 4 the same way. That is: no action needed now, but will consider adding specific feedback for those cases

@jorisleker @cikzh Let's discuss case 4 during standup?
A page that provides no feedback when a user clicks the submit button without filling the input field, is partially broken, in my opinion. Not saying we need the best possible solution immediately, but we need some fix for this within this epic.

@jorisleker
Copy link
Contributor

Yes, agreed. We need a solution, just not in this issue

@jschuurk-kr
Copy link
Contributor

Yes, agreed. We need a solution, just not in this issue

#195

@cikzh
Copy link
Contributor

cikzh commented Jul 29, 2024

@praseodym Am I correct that for this issue, we don't yet know about entryNumber, so it will remain hard-coded to 1?

@praseodym
Copy link
Contributor Author

@praseodym Am I correct that for this issue, we don't yet know about entryNumber, so it will remain hard-coded to 1?

Yes, right now only 1 is valid. The entryNumber will be 1 or 2 for first or second data entry (eerste of tweede invoer) once we implement the second data entry in #129.

@cikzh
Copy link
Contributor

cikzh commented Jul 29, 2024

@jorisleker Since we now load data from the backend, we need to show something before the polling station is loaded. Right now I've implemented a badly aligned spinner, but is there a design available for when a whole page is loading?

@cikzh cikzh linked a pull request Jul 29, 2024 that will close this issue
@jorisleker
Copy link
Contributor

@cikzh Lets go for the easiest fix: no design at all. When normal webpages load, default browser behavior is to show a blank page. No spinner, no text, no nothing. Can we do that? I think most pageloads will be that fast (<1s) that we don't really need any loading indicator.

@cikzh
Copy link
Contributor

cikzh commented Jul 30, 2024

That makes sense, I will do that 👍

Edit: will be done in #193

@cikzh cikzh closed this as completed in #199 Aug 5, 2024
@github-project-automation github-project-automation bot moved this from Current to Done in Abacus Development Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Issues or pull requests that relate to the frontend
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants