-
Notifications
You must be signed in to change notification settings - Fork 31
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(Tabs): implementa la componente dei Tab #65
Conversation
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.
Niente di grave, solo typo o mie curiosità. 👍 😄
@@ -0,0 +1,7 @@ | |||
.nav-link { |
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.
Sono solo curioso: come mai hai dovuto sovrascrivere questi stili?
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.
Dovrebbe essere un retaggio di una prova precedente in cui avevo tolto l'href
dal link (con conseguente problema negli stili). Successivamente l'ho risolta con un preventDefault()
.
In breve non appena ho 5 minuti correggo.
import { TabComponent } from './tab.component'; | ||
|
||
/** Usato per generare ID univoci per ogni componente tab */ | ||
let nextId = 0; |
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.
Si potrebbe usare uno uuid per questi?
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.
In tutti gli altri componenti abbiamo usato un id incrementale, inoltre in questo modo ci è più comodo riferirci ad un componente durante gli e2e test. Sarebbe un po' difficile nel caso di uuid.
Questo però mi fa venire in mente un'altra cosa: forse dovremmo, oltre ad autoassegnare l'id alla componente creata, dare la possibilità all'utente di passare un proprio id.
/** | ||
* Un componente tab-group con design bootstrap italia. Utilizzabile con il tag `<it-tab-group>`. | ||
* | ||
* Supporta al suo interno tab di base ``<it-tab> con una label e un contenuto. |
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.
mini-typo nel commento <it-tab>
|
||
/** | ||
* Riferimento all'elemento dal quale il tab è etichettato. | ||
* Viene azzerto se `aria-label` è impostato. |
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.
Viene azzerato
(o meglio, resettato
) se ...
} | ||
|
||
static _isNumberValue(value: any): boolean { | ||
return !isNaN(parseFloat(value as any)) && !isNaN(Number(value)); |
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.
Sono curioso scusa: && !isNaN(Number(value)
è necessario?
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.
Ho preso questa riga di codice da qui:
https://github.com/angular/material2/blob/master/src/cdk/coercion/number-property.ts
Pare che non gestisca stringhe del tipo 123hello
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.
Chiaro, grazie
Tutto ok @ciccio86 grazie anche per le spiegazioni e perdona il ritardo nella review! |
🎉 This PR is included in version 0.5.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Fix #47 |
Descrizione
Implementata la componente dei Tab
Checklist