Skip to content
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

chore: don't accept string as boolean input #552

Closed

Conversation

jnizet
Copy link
Member

@jnizet jnizet commented Aug 7, 2016

This is a first commit for #550, dealing only with boolean inputs, and not changing anything to number inputs.

private _maxSize = 0;
private _page = 0;
private _pageCount = 0;
private _pageSize = 10;

Choose a reason for hiding this comment

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

Could we move those private fields UP, to the top of the file where they were initially?

Choose a reason for hiding this comment

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

_pageSize should be a regular @Input.

Copy link
Member Author

@jnizet jnizet Aug 8, 2016

Choose a reason for hiding this comment

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

I agree, but the idea of this PR was to only focus on boolean inputs, and to keep numbers as is for the moment, mainly because I wasn't sure what to do with all these number inputs.

I will definitely do another PR to deal with numbers, but I wasn't sure about what to do with all the number inputs here.

We agreed that number | string should become number, but the usage of toInteger() here has another effect: it transforms decimal numbers to integers. And I am not sure if that is desired or not, or if we should just accept the user inputs as is.

Once I have an answer for that question (sorry if that wasn't clear in the issue), I will make another PR for numbers, if you don't mind.

@pkozlowski-opensource pkozlowski-opensource added this to the alpha.2 milestone Aug 8, 2016
refs ng-bootstrap#550

BREAKING CHANGE: boolean inputs in progressbar and pagination could be set by just adding the attribute (for example: `<ngb-progressbar striped></ngb-progressbar>`). This is not supported anymore. All boolean inputs must now consistently be set using the syntax `[attr]="value"` (for example: `<ngb-progressbar [striped]="true"></ngb-progressbar>`).
@jnizet jnizet force-pushed the chore/550-uniform-boolean-inputs branch from 4fbc76f to 67c8ad5 Compare August 8, 2016 16:08
@jnizet
Copy link
Member Author

jnizet commented Aug 8, 2016

Moved non-input fields to the top as before, and rebased on master.

@wesleycho
Copy link
Member

This LGTM.

@pkozlowski-opensource
Copy link
Member

@jnizet just landed this one, thnx! You can kill the number part now!

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.

None yet

3 participants