Plots2: Validation messages for the login modal

Created on 10 Dec 2018  ยท  50Comments  ยท  Source: publiclab/plots2

  • [x] Login form validations are working fine for incorrect input fields(testing)
    Unable to test, redirected to PL stable
gci-candidate gsoc medium rgsoc

All 50 comments

Refer #4210

Oorjit's comment

Login modal validations are working fine for incorrect input fields(testing)
You're redirected to PL login page
Login form validations are working fine for incorrect input fields(testing)
You're redirected to unstable PL login page with an error "There is nobody in our system by that name, are you sure you have the right username?"

I can help out here should you need any help... @sidharthbansal

We need the error messages to be displayed on the modal. No redirect to the /login page.

Ohk.. I'll try to look into this then.. seems important

@SidharthBansal this one will require changes at app/views/user_sessions/_new.html.erb?

I hope yes.

@JonathanXu1 and other GCI students if any task is left for reward then please submit it on the GCI platform. If I can approve it, I will approve it immediately.

@okonek @kevinzluo @dinaelhanan @oorjitchowdhary and others

Hi.. 2 are left but one is incorrect.. Can I submit that one

I mean the correct ones.

submit the correct ones now.

Please do it 5 minutes remaining. I am not receiving any emails from you guys.

@oorjitchowdhary you can focus on this before taking new issues.. You claimed this.

This is the line to display the error messages on the login page. You need to bring in some clever insight so that the page will not redirect to /login, instead this line is rendered on the modal itself.

Does this makes sense?

Yes.. I get it.. I'm looking into it..

I saw through the code and found that the modal automatically renders the password error but as we're redirected to the login page we are unable to see the error on the modal..
screenshot 100
screenshot 101

I think we need to change the backend ruby code..

But, I also found out that this linking is only limited to password is not valid error.. if we've a username error.. we are redirected to login page with an error.. but that error doesn't show up on the modal..

I'm a little unsure how can I link a modal on a ruby code..

@SidharthBansal

Wait on this one. We have some other PR depending on these validations.
Stuff is interlinked in this OAuth Milestone. Sorry for the trouble.

On Wed, Dec 12, 2018 at 1:31 AM Oorjit Chowdhary notifications@github.com
wrote:

@SidharthBansal https://github.com/SidharthBansal

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/4250#issuecomment-446341903,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AUACQ9IbgkPm2Qg1ltayzrNNd0IJ4A8Dks5u4A8pgaJpZM4ZLG-W
.

@kevinzluo may be you will be willing to work on this?
As it is related to your pr #3984
@oorjitchowdhary is unavailable for this month as he is having his exams. So you may take this up.

I have my exams next week but I would love to work on it as soon as possible!

Best of luck for your exams.
You can do it whenever you get time.
No hurry. Take your time.

On Mon, Dec 17, 2018, 4:45 AM kevinzluo <[email protected] wrote:

I have my exams next week but I would love to work on it as soon as
possible!

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/4250#issuecomment-447685774,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AUACQ8nkTcaoz2i-poce5AIt47bzp4e-ks5u5tQkgaJpZM4ZLG-W
.

Is anyone working on this? @kevinzluo @oorjitchowdhary ?
I think @kevinzluo might be working on this as it is continuation of his PR.
Thanks

I will try to finish what I started in #3984 first. Then I will try to work on this ๐Ÿ‘ .

Yeah sure!!!

On Thu, Dec 27, 2018, 12:54 AM kevinzluo <[email protected] wrote:

I will try to finish what I started in #3984
https://github.com/publiclab/plots2/pull/3984 first. Then I will try to
work on this ๐Ÿ‘ .

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/4250#issuecomment-450012777,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AUACQ0jiueQ7LBUs6LLPRXK21t2Bd1Pcks5u88zRgaJpZM4ZLG-W
.

@kunalvaswani123 you can work on this one as @kevinzluo and @oorjitchowdhary are busy with some other PRs.
@kunalvaswani123 if you want I can assign more issues to you. Thanks for help.

sure I'll do it after I complete tests for https://github.com/publiclab/plots2/pull/4386 ...
Yeah I am ok with more issues .. Thanks

You can claim 3 issues at a time. So, feel free to take this one also. It is related to the work you are doing at Public Labs. You can check out the current Kevin's PR for help. He has done a lot of work for the sign up.

Sorry @SidharthBansal I didn't know about it .. I'll start working on this issue..

@SidharthBansal just a clarification I need to redirect all the error messages back to login modal .. instead of login page it is directing to ?

If user is filling wrong details at the login modal then modal should show
errors. If page then page should show errors.

On Tue, Jan 8, 2019, 12:46 PM Kunal Vaswani <[email protected] wrote:

@SidharthBansal https://github.com/SidharthBansal just a clarification
I need to redirect all the error messages back to login modal .. instead of
login page it is directing to ?

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/4250#issuecomment-452198431,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AUACQzqYebQYNcp2GglIJuMTBr2yOFrhks5vBEXWgaJpZM4ZLG-W
.

Hi everyone. I'm really sorry I can't work on these issues right now
because of school. Over the break I actually took a stab at this one and
the one for the signup modal but didn't submit any PRs for them.
I had a working prototype for the signup modal, but it wasn't working at
/signup so I didn't submit a PR.

The way it was working was I wrote a script to use submit the form using
ajax when the submit button was clicked, then modified the controller to
render the partial responsible for the modal. This way the ajax request
actually returns the html for the partial. Then just replace the content
inside the modal with the html returned by the ajax request, and it is
updated! Then when the user finally logs in use render js: to change
window.location.href.

Good luck everyone!
Kevin Luo

On Tue, Jan 8, 2019 at 1:21 AM Sidharth Bansal notifications@github.com
wrote:

If user is filling wrong details at the login modal then modal should show
errors. If page then page should show errors.

On Tue, Jan 8, 2019, 12:46 PM Kunal Vaswani <[email protected]
wrote:

@SidharthBansal https://github.com/SidharthBansal just a clarification
I need to redirect all the error messages back to login modal .. instead
of
login page it is directing to ?

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/publiclab/plots2/issues/4250#issuecomment-452198431
,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AUACQzqYebQYNcp2GglIJuMTBr2yOFrhks5vBEXWgaJpZM4ZLG-W

.

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/4250#issuecomment-452199334,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AqQaI_--Fwd4uYl8bpXhEImwVjezpdIvks5vBEbkgaJpZM4ZLG-W
.

Kunal you can check the Kevin's PRS.
That may help you further.
One way is ajax as suggested by Kevin. Other way (easier) to show rails
validation error at top of signup and login modal as we have on respective
pages.

On Tue, Jan 8, 2019, 12:58 PM kevinzluo <[email protected] wrote:

Hi everyone. I'm really sorry I can't work on these issues right now
because of school. Over the break I actually took a stab at this one and
the one for the signup modal but didn't submit any PRs for them.
I had a working prototype for the signup modal, but it wasn't working at
/signup so I didn't submit a PR.

The way it was working was I wrote a script to use submit the form using
ajax when the submit button was clicked, then modified the controller to
render the partial responsible for the modal. This way the ajax request
actually returns the html for the partial. Then just replace the content
inside the modal with the html returned by the ajax request, and it is
updated! Then when the user finally logs in use render js: to change
window.location.href.

Good luck everyone!
Kevin Luo

On Tue, Jan 8, 2019 at 1:21 AM Sidharth Bansal notifications@github.com
wrote:

If user is filling wrong details at the login modal then modal should
show
errors. If page then page should show errors.

On Tue, Jan 8, 2019, 12:46 PM Kunal Vaswani <[email protected]
wrote:

@SidharthBansal https://github.com/SidharthBansal just a
clarification
I need to redirect all the error messages back to login modal ..
instead
of
login page it is directing to ?

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<
https://github.com/publiclab/plots2/issues/4250#issuecomment-452198431
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AUACQzqYebQYNcp2GglIJuMTBr2yOFrhks5vBEXWgaJpZM4ZLG-W
>

.

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/publiclab/plots2/issues/4250#issuecomment-452199334
,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AqQaI_--Fwd4uYl8bpXhEImwVjezpdIvks5vBEbkgaJpZM4ZLG-W

.

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/4250#issuecomment-452200696,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AUACQx_QeqKjarWbH17S8hFHqbXfXpYNks5vBEiNgaJpZM4ZLG-W
.

@SidharthBansal I'll look into it.. Thanks..
Thanks @kevinzluo for your idea..

Now we are adding JS validations instead of Rails as Rails configuration says to redirect to the main page.

@kunalvaswani123 is working on this issue.

@SidharthBansal I have left a comment in https://github.com/publiclab/plots2/pull/4568 regarding this issue.. if you could please see to it .. Thanks

@VladimirMikulic I think you can take this issue also for JS validations. You can check the correct format of username or email AND password.
This can be a medium task for GCI. Would you like to solve this?

@SidharthBansal it would be my pleasure.

Oh great. Is there any issue uploaded for similar task?

On Wed, Jan 8, 2020 at 7:07 AM Vladimir Mikulic notifications@github.com
wrote:

@SidharthBansal https://github.com/SidharthBansal it would be my
pleasure.

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/4250?email_source=notifications&email_token=AFAAEQZGPYYLBTHICGILBALQ4UU6FA5CNFSM4GJMN6LKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIK4QOY#issuecomment-571852859,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFAAEQ2TLELUEJ2RQTRCSW3Q4UU6FANCNFSM4GJMN6LA
.

Currently no.

Once it is complete and merged then ping me. I will upload the task and
share the link with you

On Wed, Jan 8, 2020 at 7:16 AM Vladimir Mikulic notifications@github.com
wrote:

Currently no.

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/4250?email_source=notifications&email_token=AFAAEQ7JENC3NY6CZTAUHDLQ4UV6RA5CNFSM4GJMN6LKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIK46GA#issuecomment-571854616,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFAAEQ4H4YB6V7V5ZJH5FTTQ4UV6RANCNFSM4GJMN6LA
.

No problem :)

Published on GCI dashboard

@VladimirMikulic did you move from one pr to another pr?
I am confused. Sorry

@SidharthBansal yes, I did. The one that I closed was messy, so I've decided to open a new one.
I apologise for the confusion.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

milaaraujo picture milaaraujo  ยท  3Comments

first-timers[bot] picture first-timers[bot]  ยท  3Comments

shapironick picture shapironick  ยท  3Comments

keshavsethi picture keshavsethi  ยท  3Comments

jywarren picture jywarren  ยท  3Comments