Skip to content
This repository was archived by the owner on Feb 28, 2023. It is now read-only.

File Uploader #80

Merged
merged 37 commits into from
Feb 22, 2018
Merged

File Uploader #80

merged 37 commits into from
Feb 22, 2018

Conversation

jfnadeau
Copy link
Contributor

No description provided.

@@ -45,6 +46,10 @@ export class MDialog extends ModulVue implements PortalMixinImpl {
@Prop({ default: true })
public paddingFooter: boolean;

public closeDialog(): void {
this.as<PortalMixin>().tryClose();
Copy link
Member

Choose a reason for hiding this comment

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

La mécanique de close des modals a évolué depuis... Est-ce qu'on a validé que ça fonctionnait bien dans le cas où le téléverseur pop à partir d'une fenêtre modale? Et surtout que la fermeture s'effectue correctement lorsqu'on clique sur le backdrop par exemple.

Copy link
Contributor

Choose a reason for hiding this comment

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

J'ai testé le téléverser dans une fenêtre modale et ça fonctionne. Pour le clic sur l'arrière-plan, j'ai mis l'option à false, je vais valider si c'est un comportement qu'on souhaite.

"add": "Add",
"cancel": "Cancel",
"rejectFileMsg": "The following file can not be added.",
"rejectFilesMsg": "The following files can not be added.",
Copy link
Member

Choose a reason for hiding this comment

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

Est-ce que le service $i18n avait des limitation avec la notation au pluriel finalement?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Je vais modifier m-i18n dans une autre pull-request :-)

}
})
export class MFileUpload extends ModulVue {
@Prop() public extensions?: string[];
Copy link
Member

Choose a reason for hiding this comment

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

Mettre l'annotation sur une ligne différente

})
export class MFileUpload extends ModulVue {
@Prop() public extensions?: string[];
@Prop() public maxSizeKb?: number;
Copy link
Member

Choose a reason for hiding this comment

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

Si on ne met pas une valeur par défaut, est-ce qu'une prop n'est pas nécessairement optionnelle? Ou bien si dans le code on veut nécessaire traiter le cas qu'elle puisse être d'un type T | undefined? Typiquement, je crois qu'on utilisais plus l'annotation myProp: string | undefined plutôt que le "?".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Je peux changer pour string | undefined mais le ? c'est exactement la même chose. Je m'en sers dans le code, je ne fais pas les validations si c'est undefined.


Regarde il y a une nouvelle option "strict" dans typescript 2.7:

microsoft/TypeScript#20075

Avec cette switch là, toute prop optionnelle devrait être ? (ou type | undefined)

public state: MProgressState;

private mode: string;
private styleTag;
Copy link
Member

Choose a reason for hiding this comment

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

le type?

return this.circle === false;
}

private get isIndeterminate() {
Copy link
Member

Choose a reason for hiding this comment

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

type de retour

};
}

private get svgViewbox() {
Copy link
Member

Choose a reason for hiding this comment

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

type de retour

return `0 0 ${this.diameter} ${this.diameter}`;
}

private get svgStyles() {
Copy link
Member

Choose a reason for hiding this comment

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

type de retour - voir pour tous les getters

return this.getStore(storeName).files;
}

public setValidationOptions(
Copy link
Member

Choose a reason for hiding this comment

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

Mettre la valeur de retour :void aux méthodes qui ne retourne rien (je sais c'est téteux, mais c'est comme ça!)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Faudrait checker si y'a moyen de configurer tslint pour ça car facile à oublier

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fait

import ProgressPlugin, { MProgressState } from '../progress/progress';
import WithRender from './file-upload.html?style=./file-upload.scss';

const COMPLETED_FILES_VISUAL_HINT_DELAY = 1000;
Copy link
Member

Choose a reason for hiding this comment

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

type : number

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fait

@simardo simardo merged commit dad8185 into develop Feb 22, 2018
@jfnadeau jfnadeau deleted the feature/fileupload branch March 1, 2018 13:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants