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

Adding Request Guards in buttons that do requests #83

Open
frinzekt opened this issue Jan 28, 2021 · 5 comments
Open

Adding Request Guards in buttons that do requests #83

frinzekt opened this issue Jan 28, 2021 · 5 comments
Assignees
Labels
client client related issue enhancement New feature or request

Comments

@frinzekt
Copy link
Member

Further to #82, it would be recommended that there are request guards that prevents a user to click the same button twice. The effect of pressing the button twice means that it will send 2 requests in the server, when there are only supposed to be 1.

Tip:
Use the existing state "isLoading" of the service methods. With that property, disable the button or whatever is requesting

@frinzekt frinzekt added enhancement New feature or request client client related issue labels Jan 28, 2021
@MouseAndKeyboard
Copy link
Collaborator

MouseAndKeyboard commented Feb 3, 2021

Admin page:

  • Add new user
  • Save user edit

Coordinator page:

  • Create course evaluation
  • Manage Reviewers
  • Archive
  • Force completion [doesn't exist yet]
  • Edit evaluation page "save"
  • EOC edit "save"
  • Add new document "save"
  • Edit document "save"
  • Delete document "Yes"

Reviewer:

  • Open review for first time (not a button but needs to be protected)
  • "Next" button when doing review
  • "Back" button when doing review
  • Clicking the stages manually at the top for the first time
  • Read documents edit comment "save"
  • Read documents mark as unread/read
  • EOC review "save"
  • General comment "save"
  • Submit are you sure "yes"

Feel free to extend this list if you find something that should have a request guard of some kind

@MouseAndKeyboard
Copy link
Collaborator

I'm curious what you mean by the preexisting state "isLoading" of the service methods.
Could you link me the docs about this so I can use it.
Thanks ;)

@MouseAndKeyboard MouseAndKeyboard self-assigned this Feb 3, 2021
@frinzekt
Copy link
Member Author

frinzekt commented Feb 3, 2021

Nice list! See this https://github.com/feathersjs-ecosystem/feathers-redux#shape-of-the-store
look at this very carefully for the isLoading.

@MouseAndKeyboard
Copy link
Collaborator

Nice list! See this https://github.com/feathersjs-ecosystem/feathers-redux#shape-of-the-store
look at this very carefully for the isLoading.

How exactly would I access this field

@frinzekt
Copy link
Member Author

frinzekt commented Feb 3, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client client related issue enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants