-
Notifications
You must be signed in to change notification settings - Fork 192
Refactors Labels Component to Shared TKG Labels #2515
Conversation
Hi @mpanchajanya! And thank you for opening your first Pull Request. Someone will review it soon. Thank you for committing to making Tanzu Framework better. |
pkg/v1/tkg/web/src/app/app.module.ts
Outdated
import { BrowserModule } from '@angular/platform-browser'; | ||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; | ||
|
||
import {NgModule} from '@angular/core'; |
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 update your IDE settings to revert removal of the spaces between {} and []
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.
updated
/packages/**/.imgpkg |
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 think we don't generally add IDE-specific files to the repo (you can add them locally).
IFF we do decide to do so, I would suggest just ignoring the .idea directory, rather than all these specific files.
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.
moved .idea files to my local global .gitignore
pkg/v1/tkg/web/src/app/app.module.ts
Outdated
import { BrowserModule } from '@angular/platform-browser'; | ||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; | ||
|
||
import {NgModule} from '@angular/core'; |
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.
nit: we're trying to keep imports alphabetized (within the three sections of Angular, 3rd party, app)
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.
fixed
.../src/app/views/landing/wizard/shared/components/widgets/tkg-labels/tkg-labels.component.html
Outdated
Show resolved
Hide resolved
} | ||
|
||
protected storeUserData() { | ||
this.storeUserDataFromMapping(this.supplyStepMapping()); | ||
this.storeDefaultDisplayOrder(this.supplyStepMapping()); | ||
} | ||
|
||
private supplyStepMapping(): StepMapping { | ||
return this.stepMapping ?? MetadataStepMapping; |
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'm not sure it makes sense to return the default MetadataStepMapping if this.stepMapping is null/undefined. Is this.stepMapping === null/undefined a legitimate state?
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.
refactored
}; | ||
} | ||
|
||
export interface TKGLabel<K = string, V = string> { |
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 there a case where we would use TKGLabel for a type other than string?
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.
refactored to use string
<clr-tooltip> | ||
<clr-icon a11yTooltipTrigger aria-live="assertive" shape="info-circle" size="22"></clr-icon> | ||
<clr-tooltip-content *clrIfOpen clrPosition="top-right" clrSize="lg"> | ||
<span> |
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.
nit: odd indentation here
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.
fixed the indentation
this.labelsFormArray.valueChanges | ||
.pipe(takeUntil(this.stopSubscriptions$), distinctUntilChanged()) | ||
.subscribe(() => { | ||
setTimeout(() => { |
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.
Curious about this setTimeout(): is it necessary, and if so, do we know why?
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.
Was using it for testing. removed now
@@ -47,4 +47,11 @@ hack/providers-sync-tools/**/build | |||
# Build artifacts related to packages |
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.
probably best to just revert any changes to this file. I'm not sure why it got updated.
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.
moved .idea files to my local global .gitignore
...app/views/landing/wizard/shared/components/steps/metadata-step/metadata-step.fieldmapping.ts
Show resolved
Hide resolved
welcome @mpanchajanya ! |
# Conflicts: # pkg/v1/tkg/web/package-lock.json
Cluster Generation A/B Results: |
Codecov Report
@@ Coverage Diff @@
## main #2515 +/- ##
==========================================
+ Coverage 42.32% 42.39% +0.07%
==========================================
Files 398 398
Lines 39693 39704 +11
==========================================
+ Hits 16799 16834 +35
+ Misses 21308 21287 -21
+ Partials 1586 1583 -3
Continue to review full report at Codecov.
|
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.
Very nice!
Cluster Generation A/B Results: |
…-tanzu#2515) * Issue vmware-tanzu#1620 - TKG Labels * update lock * add spaces on imports
What this PR does / why we need it
Which issue(s) this PR fixes
Fixes #
Describe testing done for PR
Release note
PR Checklist
Additional information
Special notes for your reviewer