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

feat(chore): Upgrade Angular v14 #191

Merged
merged 1 commit into from
Sep 27, 2023

Conversation

tse018
Copy link
Contributor

@tse018 tse018 commented Sep 22, 2023

No description provided.

@tse018
Copy link
Contributor Author

tse018 commented Sep 22, 2023

This PR is based on chore: Upgrade to Angular v14 #186 PR

Took his changes, modified it to pass the tests and build

Copy link
Contributor

@pablotransifex pablotransifex left a comment

Choose a reason for hiding this comment

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

@tse018 Than you for the contribution! I left some comments :)

const translationService = injector.get(TranslationService);

Object.defineProperty(target, key, {
configurable: false,
get: () => {
if (instanceConfig) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder why you removed the instanceConfig and the mechanism to add an instance. If I understand well, this way you need to create the instance (addInstance) beforehand, correct?

@@ -14,20 +14,6 @@ import { TranslationService } from './translation.service';
styles: [],
})

/**
* A translation component
Copy link
Contributor

Choose a reason for hiding this comment

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

Why remove the detailed comments?

@@ -81,34 +71,38 @@ describe('LanguagePickerComponent', () => {
spyOn(component, 'onChange').and.callThrough();

// act
await component.ngOnInit();
await component.getLanguages();
Copy link
Contributor

Choose a reason for hiding this comment

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

Here I would like to test the ngOnInit event, in order to test if the languages are loaded correctly at that stage. Is there any reason for replacing it?

@@ -63,7 +53,7 @@ describe('LanguagePickerComponent', () => {
spyOn(service, 'getLanguages').and.resolveTo(languages);

// act
await component.ngOnInit();
await component.getLanguages();
Copy link
Contributor

Choose a reason for hiding this comment

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

Here I would like to test the ngOnInit event, in order to test if the languages are loaded correctly at that stage. Is there any reason for replacing it?

it('is defined', () => {
expect(TranslatePipe).toBeDefined();
expect(translatePipe).toBeDefined();
expect(translatePipe instanceof TranslatePipe).toBeTruthy();
expect(true).toBeTruthy();
Copy link
Contributor

Choose a reason for hiding this comment

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

What about this? Maybe we need to revert this change?

@pablotransifex
Copy link
Contributor

This PR is based on chore: Upgrade to Angular v14 #186 PR

Took his changes, modified it to pass the tests and build

Oh, ok, I should understand it :) sorry. Maybe in the previous review I missed that with the instances. I need to test the refactored part and back again maybe we need to change that part to the previous version, will see.

@n1k0sv
Copy link

n1k0sv commented Sep 25, 2023

@tse018 Thank you very much for your contribution. Before accepting this PR, you will need to sign our Contributor's License Aagreement (CLA) by following the instructions here.

This is a one off process, so it should happen only once.

@n1k0sv
Copy link

n1k0sv commented Sep 26, 2023

@tse018 Thank you very much for your contribution. Before accepting this PR, you will need to sign our Contributor's License Aagreement (CLA) by following the instructions here.

This is a one off process, so it should happen only once.

CLA received, thank you!

@pablotransifex
Copy link
Contributor

@tse018 Can you please make a squash of commits and I'll approve for merging. Thanks!

@pablotransifex pablotransifex merged commit 96e540c into transifex:master Sep 27, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants