Skip to content

Conversation

@reshaw
Copy link
Contributor

@reshaw reshaw commented Mar 1, 2019

Add directives for the ComboBox and Calendar to enable the Angular-style template localization pattern.

Change wrapper to fix some timing bugs

reshaw added 2 commits March 1, 2019 10:22
Add directives for the ComboBox and Calendar to help support Angular
template i18n patterns. Change wrapper to support new directives, and fix
a subtle binding bug. Update fabric component to demo new functionality.
Copy link
Contributor

@bengry bengry left a comment

Choose a reason for hiding this comment

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

Looks good overall.
There are some minor things to change, and some I'd like to understand better on why they were made (especially in wrapper-component.ts

reshaw added 2 commits March 4, 2019 10:19
-Used Prettify to format some files
-Changed 'components' to 'declrations' in certain module files
-Adjusted ngAfterContentInit in children of wrapper-component to call
super.ngAfterContentInit to preserve lifecycle event ordering.
This is needed because of moving a lifecycle event from ngAfterViewInit
to ngAfterContentInit in the wrapper component.
Copy link
Contributor

@bengry bengry left a comment

Choose a reason for hiding this comment

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

See my comments

*/
@Directive({ selector: 'fab-combo-box-option' })
export class ComboBoxOptionDirective {
@Input() optionKey: IComboBoxOption['key'];
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not call it key in the property name too? We'd like to stay consistant with the office-ui-fabric-react names as much as possible, especially with stuff like #91 in the pipeline.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I concur, but that runs foul of the wrapper-component _isForbiddenAttribute method. This causes the ComboBox to misbehave (it ignores the key attribute binding and triggers a console warning).

Copy link
Contributor

@bengry bengry Mar 5, 2019

Choose a reason for hiding this comment

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

Ok, makes sense, let's keep it like that then. Please do add some JDoc on this to make a note of this.

@bengry bengry self-requested a review March 6, 2019 08:54
Copy link
Contributor

@bengry bengry left a comment

Choose a reason for hiding this comment

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

Looks good, just the JDoc thing is missing. Please add it and then I'll make the merge to master. I'd do it myself, but I don't have push permissions on your fork (probably).

@bengry bengry merged commit 8ccbaa5 into microsoft:master Mar 6, 2019
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.

2 participants