-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
ng-jhipster migration to generator-jhipster #13022
Conversation
Added service revamp and tests
use const spread declarations make ng2-translate a dependency
Add types to AlertService
Prevent error when broadcasting and there's no subscriber
Display right translation key when missing
I wrote a unit test that shows that an alert is not removed from alerts array on timeout. I guess there is an ambiguity about extAlerts, I don't understand its goal because when adding a new alert added to extAlerts and so it cannot be removed on close.
migration notes: * split code to .ts and .html as Angular style guide suggests * declared also model, so fixed one no-explicit-any as referenced also in jhipster#10873 (comment) * used ChangeDetectionStrategy.OnPush where functions was used in html - performance improved a bit * improved threads modal window filter section - instead of showing filter in text input, badges are now directly reflecting current filtering state
Vivek More seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
really good job @kaidohallik ! |
I have tested yesterday, and everything looks fine, I forgot to test sorting. Bundle at our ngx-default changed from:
to
IMO let's merge, and finish testing it in main branch. |
I tested this and this was working for me. You probably changed language before logging in? Logic in application is: if user has changed language then in this session don't change language on login any more. |
Thanks @mshima for merging! |
Bounty claimed https://opencollective.com/generator-jhipster/expenses/28314 |
@kaidohallik : approved |
This PR removes
ng-jhipster
dependency fromgenerator-jhipster
.Closes #12909
This PR contains commits from https://github.com/jhipster/ng-jhipster extracted by method described in #12909 (comment)
Probably not all
ng-jhipster
committers from period 2016-2020 are signed CLA, so probably needs to be merged without passing CLA check.As we have strict TypeScript option and TypeScript ESLint "
plugin:@typescript-eslint/recommended-requiring-type-checking
" then I was forced to do quite a lot changes to get migrated functionality to work ingenerator-jhipster
.Some comments about changes by commits.
sort
In the process of migration fixed #12868
metrics
.ts
and.html
as Angular style guide suggests@typescript-eslint/no-explicit-any
" as referenced also in Strict Typescript option in metrics module in Angular #10873 (comment)ChangeDetectionStrategy.OnPush
where functions was used in html - performance improved a bit-new
to component selectors to avoid conflicts withng-jhipster
, those are removed by theng-jhipster
removal commitevent-manager
In jhipster/ng-jhipster#115 I made preparation to simplify output to event manager consumers - return only
event.content
because event name is redundant, subscription is by name. But now we have #12778 - multiple subscriptions, it's a good idea and in this case returning full info, including event name, is must have. So I deleted this simplification preparation and we should go #12778 way.jhi-boolean
As this is used only in one place, user management detail view (and if skipping user management, for example oauth2, then there is 0 usages), and if this component is not widely used and it's API learned then code without this component is better understandable, so I didn't migrate this component but instead using simple html in user management detail view (lines used in
.ejs
template reduced from 10 to 2).jhi-item-count
Temporarily added
-new
to component selector to avoid conflicts withng-jhipster
, this is removed by theng-jhipster
removal commit.As in current implementation:
jhi-item-count
(for example every click resulted with 6 time recalculation)Then rewrote component, now:
enableTranslation
variable available in generator)item-count
component is recalculated only if input changes (different page is selected)data-util
openFile
function has 2 forks, comment was that the first one is for IE and Edge, but for Edge that was not true, so changed comment from "To support IE and Edge
" to "To support IE
"parse-links
Polished and made shorter
alert.service
Now when we have full control over this component (we can use powerful
if (enableTranslation) { ... }
) we should refactor this service to offer better API to avoid hacky workarounds as described in closing #12796. But this enhancement is out of scope of this PR.translate
ng-jhipster
dependency@ngx-translate
dependency for i18n disabled any moreng-jhipster
dependency,core.module
is quite small and after merging this PR I want to move code fromcore.module
toapp.module
and deletecore.module
to reduce code hierarchy levelPlease make sure the below checklist is followed for Pull Requests.
When you are still working on the PR, consider converting it to Draft (bellow reviewers) and adding
skip-ci
label, you can still see CI build result at your branch.