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

Fix console error of change in expression value #3550

Merged
merged 5 commits into from
Aug 26, 2021

Conversation

gautamjajoo
Copy link
Member

Fix the error that occurs in dev mode when the change detection run twice.

Before
image

After
No error in console.

@Ram81 @Kajol-Kumari

@codecov-commenter
Copy link

codecov-commenter commented Jul 25, 2021

Codecov Report

Merging #3550 (c6ece7b) into master (96968d6) will decrease coverage by 1.45%.
The diff coverage is 32.43%.

@@            Coverage Diff             @@
##           master    #3550      +/-   ##
==========================================
- Coverage   72.93%   71.47%   -1.46%     
==========================================
  Files          83       20      -63     
  Lines        5368     3232    -2136     
==========================================
- Hits         3915     2310    -1605     
+ Misses       1453      922     -531     
Impacted Files Coverage Δ
frontend/src/js/controllers/authCtrl.js 53.91% <6.38%> (-12.95%) ⬇️
frontend/src/js/controllers/profileCtrl.js 79.76% <20.00%> (-13.10%) ⬇️
frontend/src/js/controllers/permissionCtrl.js 36.36% <22.22%> (-63.64%) ⬇️
frontend/src/js/controllers/challengeCtrl.js 63.41% <30.64%> (-10.29%) ⬇️
frontend/src/js/controllers/updateProfileCtrl.js 82.55% <44.44%> (-10.30%) ⬇️
frontend/src/js/controllers/challengeListCtrl.js 95.74% <50.00%> (+1.06%) ⬆️
...ntend/src/js/controllers/challengeHostTeamsCtrl.js 70.50% <66.66%> (-1.18%) ⬇️
frontend/src/js/controllers/teamsCtrl.js 71.17% <75.00%> (ø)
frontend/src/js/controllers/ChallengeInviteCtrl.js 100.00% <100.00%> (ø)
frontend/src/js/controllers/SubmissionFilesCtrl.js 95.45% <100.00%> (ø)
... and 30 more
Impacted Files Coverage Δ
frontend/src/js/controllers/authCtrl.js 53.91% <6.38%> (-12.95%) ⬇️
frontend/src/js/controllers/profileCtrl.js 79.76% <20.00%> (-13.10%) ⬇️
frontend/src/js/controllers/permissionCtrl.js 36.36% <22.22%> (-63.64%) ⬇️
frontend/src/js/controllers/challengeCtrl.js 63.41% <30.64%> (-10.29%) ⬇️
frontend/src/js/controllers/updateProfileCtrl.js 82.55% <44.44%> (-10.30%) ⬇️
frontend/src/js/controllers/challengeListCtrl.js 95.74% <50.00%> (+1.06%) ⬆️
...ntend/src/js/controllers/challengeHostTeamsCtrl.js 70.50% <66.66%> (-1.18%) ⬇️
frontend/src/js/controllers/teamsCtrl.js 71.17% <75.00%> (ø)
frontend/src/js/controllers/ChallengeInviteCtrl.js 100.00% <100.00%> (ø)
frontend/src/js/controllers/SubmissionFilesCtrl.js 95.45% <100.00%> (ø)
... and 30 more

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 c9b05b5...c6ece7b. Read the comment docs.

Copy link
Member

@Kajol-Kumari Kajol-Kumari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gautamjajoo as you have introduced the isAuth variable. Let's use this variable only at here

Rest LGTM 👍

@gautamjajoo
Copy link
Member Author

@Kajol-Kumari I have not replaced it because first the value is false that's why the page is distorted when it is loading and then the value becomes true.

@Kajol-Kumari
Copy link
Member

@Kajol-Kumari I have not replaced it because first the value is false that's why the page is distorted when it is loading and then the value becomes true.

yes @gautamjajoo but now as we are using detectChanges() so it's totally fine to use the isAuth variable in the html file

@gautamjajoo
Copy link
Member Author

Actually, before opening the PR I tried to replace with the variable but the page is like this
Screenshot from 2021-07-26 21-07-29

@Kajol-Kumari
Copy link
Member

Actually, before opening the PR I tried to replace with the variable but the page is like this
Screenshot from 2021-07-26 21-07-29

That's weird as It shouldn't happen ideally. Also, I tried doing the change on my local and it seems to work fine for me. Can you please try testing it again by replacing authService.isAuth with isAuth throughout the publiclist component html file? @gautamjajoo

@gautamjajoo
Copy link
Member Author

gautamjajoo commented Jul 26, 2021

@Kajol-Kumari I did change all the variables. I believe there is some issue with the changing values. Would it be better if we keep it same as authService.isAuth and consistent with other pages?

@Kajol-Kumari
Copy link
Member

@Kajol-Kumari I did change all the variables. I believe there is some issue with the changing values. Would it be better if we keep it same as authService.isAuth and consistent with other pages?

yeah, we can keep this as this doing the same work but we need to figure out the reason behind it.

@gautamjajoo
Copy link
Member Author

@Kajol-Kumari Replaced with isAuth variable, now assigning the value upon component initialization as well.

Copy link
Member

@Kajol-Kumari Kajol-Kumari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gautamjajoo please format the comment for ngAfterViewChecked [The one line gap should be before comment, not after]

Rest, LGTM 👍

@gautamjajoo
Copy link
Member Author

@Kajol-Kumari Done the changes!

Copy link
Member

@Ram81 Ram81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gautamjajoo can you resolve the merge conflicts

@gautamjajoo
Copy link
Member Author

gautamjajoo commented Aug 16, 2021

@Ram81 Resolved the merge conflicts!

@gautamjajoo gautamjajoo requested a review from Ram81 August 16, 2021 14:24
Copy link
Member

@Ram81 Ram81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@RishabhJain2018 RishabhJain2018 merged commit d70a544 into Cloud-CV:master Aug 26, 2021
vaheta pushed a commit to vahetag/EvalAI that referenced this pull request Dec 10, 2024
…opment setup(Cloud-CV#3550)

* fix change in expression value

* assign value on component initialization

* add line

Co-authored-by: Rishabh Jain <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants