-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Fixes part of #8472: EdiatbleSkillBackendApiService migration to Angular 8 #8863
Fixes part of #8472: EdiatbleSkillBackendApiService migration to Angular 8 #8863
Conversation
…arJS to Angular8. Migrate AngularJS files to Angular 8 #8472
…arJS to Angular8. Migrate AngularJS files to Angular 8 #8472
…arJS to Angular8. Migrate AngularJS files to Angular 8 #8472
…arJS to Angular8. Migrate AngularJS files to Angular 8 #8472
…ution-opportunities
This reverts commit b974e78.
Revert yarn lock changes
…ution-opportunities-spec-file
Remove extra space after the last function argument.
…ortunities-spec-file
….com/srijanreddy98/oppia into contribution-opportunities-spec-file
Hi, @srijanreddy98. This pull request does not have a "CHANGELOG: ..." label as mentioned in the PR checkbox list. Please add this label. PRs without this label will not be merged. If you are unsure of which label to add, please ask the reviewers for guidance. Thanks! |
It doesn't pass the karma tests or e2e tests. I pushed it using --no-verify. The reason for the failing tests is that the Request Interceptor is not intercepting the request. |
@sagangwee @DubeySandeep could you ptal |
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.
@srijanreddy98, I've left a few comments, PTAL!
Also, can you please share the screenshot of a skill created and edited through this branch? (It would be helpful for reviewers)
@@ -330,6 +330,7 @@ | |||
|
|||
|
|||
# New structures team. | |||
/core/templates/domain/skill/skill-domain.types.ts @bansalnitish |
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.
Move this inside skill project section (After line 360)
@@ -15,62 +15,53 @@ | |||
/** | |||
* @fileoverview Unit tests for SkillBackendApiService. | |||
*/ | |||
import { HttpClientTestingModule, HttpTestingController } from |
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.
Add a newline above
// ^^^ This block is to be removed. | ||
|
||
import { CsrfTokenService } from | ||
'services/csrf-token.service'; |
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.
Can we adjust this to the line above (line 22)? (Considering at max 80 chars in a line)
import { CsrfTokenService } from | ||
'services/csrf-token.service'; | ||
import { SkillBackendApiService } from | ||
'domain/skill/skill-backend-api.service'; |
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.
Ditto
var deferred = $q.defer(); | ||
deferred.resolve('sample-csrf-token'); | ||
return deferred.promise; | ||
let skillBackendApiService = null; |
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.
This is written as the angular8 service, right? If yes can we add the type of these variables?
SkillDomainConstants.EDITABLE_SKILL_DATA_URL_TEMPLATE, { | ||
skill_id: skillId | ||
}); | ||
// eslint-disable-next-line dot-notation |
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.
Why is this needed? If it's for any specific reason, can we avoid using pragma?
import { RequestInterceptor } from 'services/request-interceptor.service'; | ||
|
||
|
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.
is this expected change?
@@ -22,10 +22,10 @@ import 'zone.js'; | |||
import { Component, NgModule, StaticProvider } from '@angular/core'; | |||
import { BrowserModule } from '@angular/platform-browser'; | |||
import { downgradeComponent } from '@angular/upgrade/static'; | |||
import { HttpClientModule } from '@angular/common/http'; | |||
import { HTTP_INTERCEPTORS } from '@angular/common/http'; | |||
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http'; |
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.
Thanks for fixing this! :)
// TODO(#7165): Replace any with exact type. | ||
export interface EditableSkillResponseConfig { | ||
skill?: any; | ||
skills?: any; |
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.
why both skill and skills, if required yo can create two interface skillResponse and skillsResponse
grouped_skill_summaries?: any; | ||
} | ||
|
||
export interface ChangeList { |
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.
ChangeList sounds like an array but it's a dict. don't use the List suffix
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.
@srijanreddy98 LGTM once Sandeep's comments are addressed. Thanks!
} | ||
); | ||
this.http.get(skillDataUrl).toPromise().then( | ||
(data: EditableSkillResponseConfig) => successCallback(data.skills), |
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 want to say this is a remnant of the renaming of the EditableSkillBackend service (the 'editable' was dropped).
Hi @srijanreddy98, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 4 days, it will be automatically closed so that others can take up the issue. |
Ping @srijanreddy98 |
Hi @srijanreddy98, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 4 days, it will be automatically closed so that others can take up the issue. |
Hey @srijanreddy98, could we get this in? (Let me know if you're busy I can take over this) |
@bansalnitish sorry for letting this fall this far... I'll finish it. Actually I have deleted the fork which had this branch, so I will shift this to a different pr. |
@srijanreddy98 should this PR be closed? If so, please close it. |
Hi @srijanreddy98 could you please merge with develop as there were some new checks introduced, and a change to the development workflow which will help make sure develop will not break after merging this PR. |
@nithusha21 I am closing this pr, it needs some work with the typings and I had to delete this version of my fork because it kept on adding some files changes (made in my very first pr) to every pr I made. Please continue as if this didn't exist |
Overview
Essential Checklist
PR Pointers