-
Notifications
You must be signed in to change notification settings - Fork 61
Load Base Components only once #233
base: master
Are you sure you want to change the base?
Conversation
…/EvalAI-ngx into Base-Component-Features
Codecov Report
@@ Coverage Diff @@
## master #233 +/- ##
==========================================
- Coverage 51.73% 51.68% -0.06%
==========================================
Files 66 66
Lines 3659 3659
Branches 413 413
==========================================
- Hits 1893 1891 -2
- Misses 1671 1672 +1
- Partials 95 96 +1
Continue to review full report at Codecov.
|
</div> | ||
<app-footer></app-footer> | ||
</div> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should only be 1-2 line changes. Other changes are due to spaces, indentation etc. Please remove unnecessary changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason for the line changes is I had to format the code after removing the footer.
I have removed the extra footer |
I also noticed there was an extra header in the dashboard so I removed that too |
Hi @nsjcorps Please remove all the extra lines which are left after removing the header and footer from individual components and format the files. |
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<app-footer></app-footer> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please format the file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
</div> | ||
</div> | ||
<div class="clearfix"></div> | ||
|
||
<app-footer *ngIf="!authService.isAuth"></app-footer> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove the extra line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have done that now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also made some more changes @lunayach which I have explained below. Please let me know your opinion
</div> | ||
</div> | ||
|
||
<app-footer *ngIf="!authService.isAuth"></app-footer> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So now we do not need to check these conditions?
Ok thanks, but how will I do it in this case since all components inherit from the base component |
How would I test the condition now that it is in the main module? |
Should I use the URL as a test? |
Here is what I have concluded with. I will give the sidebar a fixed color identical to the background. Then as for the header, I will set a condition to check if the URL contains "auth". How does it look to you? Please let me know your opinion. Thank you, it's really fun contributing to EvalAI. |
For the header, I used "auth" because auth is the base URL for the components that don't use the header. |
Let me give a break down of my changes. For the issue with the header: For the issue of the footer: All of this was accomplished while still loading the components just once instead of on every page. I hope this is a good fix. Please let me know if you have any comments. It took some thinking ut I believe this is an optimal solution. |
I made 'authService' public so as to make it accessible it in app.component.html |
@nsjcorps Thanks a lot for making changes. And, great job thinking through the solution. Checking for URL is nice but feels hardcoded, and we should avoid that. Making sidebar's colour identical to the background also feels hacky. |
@nsjcorps I guess this is more complex than we initially thought. It might end up making the code-base more complicated than simplifying it. If you don't mind, maybe you could try solving other tasks, and meanwhile, we'll try to make this task more concrete with more specific objectives. Happy Hacking!! 😄 |
@lunayach , Alright not a problem. Thanks |
Changes proposed in this pull request: