Cloud-CV / EvalAI-ngx

Revamped codebase of EvalAI Frontend
BSD 3-Clause "New" or "Revised" License
33 stars 61 forks source link

Addition to #234: Validate social fields #243

Closed drepram closed 4 years ago

drepram commented 4 years ago

I'm going to make this clear. I'm not going to claim that I did all of the parts in this PR, major changes were created by https://github.com/Suryansh5545. What I did was help out by cleaning out some logs, renamed some variables, and fixed the logic.

I visibly forked the repo from his account and not Cloud-CV's.

Changes proposed in this pull request:

There was a problem:

When you change the URL of a social field, the submit button wouldn't be triggered. You have to change a part of the identification field {first_name, last_name, affiliation}.

I fixed this by adding conditions that would allow the submit button to be triggered, and at the same time also validating them using a simple DOM method.

codecov-io commented 4 years ago

Codecov Report

Merging #243 into master will decrease coverage by 0.37%. The diff coverage is 10.81%.

@@            Coverage Diff             @@
##           master     #243      +/-   ##
==========================================
- Coverage   51.45%   51.07%   -0.38%     
==========================================
  Files          66       66              
  Lines        3681     3716      +35     
  Branches      422      431       +9     
==========================================
+ Hits         1894     1898       +4     
- Misses       1692     1723      +31     
  Partials       95       95
Impacted Files Coverage Δ
src/app/components/profile/profile.component.ts 48.23% <ø> (+0.56%) :arrow_up:
...rc/app/components/utility/modal/modal.component.ts 28.87% <10.81%> (-6.04%) :arrow_down:
Impacted Files Coverage Δ
src/app/components/profile/profile.component.ts 48.23% <ø> (+0.56%) :arrow_up:
...rc/app/components/utility/modal/modal.component.ts 28.87% <10.81%> (-6.04%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 78ea56d...6d1af5b. Read the comment docs.

Sanji515 commented 4 years ago

After entering the 2 valid url if I enter last url invalid then it shows URL invalid error message to all the three fields, this is happening as you are using inputErrorMessage to display message which is same for all the input. @drepram Please fix this.

drepram commented 4 years ago
Screen Shot 2019-12-18 at 22 42 15
Screen Shot 2019-12-18 at 22 42 31

I've created a local variable to store all of their errors together. I assume this is what you meant. Please take a look.

drepram commented 4 years ago
  1. image

    Fixed.

  2. Screen Shot 2019-12-20 at 00 40 56

    I already wrote it before you requested it.

drepram commented 4 years ago

image

I'm sorry, but I can't reproduce your issue. I'm sorry to pull this card but...

image

drepram commented 4 years ago

Done, please take a look.

pushkalkatara commented 4 years ago

Looks good to me!