- Notifications
You must be signed in to change notification settings - Fork 5.3k
Calendar: Using globalize-compile #1651
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
Conversation
@jzaefferer @scottgonzalez @rxaviers Ready for a first review! |
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.
@rxaviers Do you have an ETA on 1.1.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.
Nope. Technically the rc.6 is pretty close to 1.1.0. But, writing a blog post about it (for the release) is the biggest uncertainty on my end.
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.
Can I help with that? Is that the blog post I've reviewed before?
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.
The post you've reviewed is certainly a big portion of it, but 1.1.0 should include more (e.g., unit formatting). You are welcome to help. :)
Overall, this looks good to me. The actual changes are fairly small :-) |
Fixed the jshint tests. |
I'd say this is good to land. |
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.
While this package is pretty convenient, it also blows up an installed node_modules folder by 250 to 300 MB. @rxaviers is there any way to get an English-only cldr-data, since that's all we care about here (I think)?
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 assume we would need at least the locales defined here: https://github.com/jquery/jquery-ui/pull/1651/files#diff-35b4a816e0441e6a375cd925af50752cR408
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.
Nevermind, we're actually compiling several locales.
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.
Another idea: Can we install cldr-data
as part of the compile-globalize grunt task? That'll make the task run a little longer, but avoid a lot of overhead for every other CI run and local install. Since we're committing the result to the repo, it seems pointless to install the dependency all the time.
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.
Answering the first questions, although I see your line of thought is going somewhere else already...
@rxaviers is there any way to get an English-only cldr-data, since that's all we care about here (I think)?
No, cldr-data allows you to choose one of the coverage options given by CLDR (for instance, modern
or full
only).
Also reviewed the whole thing. Looks like the issue in |
Looks good. |
Just checking why the unit tests fail... |
Mhh, this seems like a bug. Unit test does not fail when system date is November 30th. https://travis-ci.org/jquery/jquery-ui/builds/94433780#L257-L261 |
@scottgonzalez Merging this anyway, ok? Issue seems unrelated to the actual changes in this PR. |
Would help to know which of the 5 assertions in that test is failing. The stack should tell, but only points at Is the test failing without the changes from this branch? Then merging anyway seems fine. |
Yeap, knowing which assertion (of the 5) is failing would help. Also, is a Globalize call providing a wrong result? If so, knowing which would help me to provide a quicker response. |
The last test in this set is failing. Just tested this, fails on current datepicker branch too. |
This test to be specific: https://github.com/fnagel/jquery-ui/blob/datepicker-globalize/tests/unit/date/core.js#L170 |
There are no console errors or similar issues. Anything else I could check? |
Let's merge then. You can rewrite the assertion to get more useful output:
Also noticed that this against |
This PR introduces compiled formatters & parsers by using globalize-compile. It's using the lastet 1.1 rc6 of globalize.
We probably want to have the Grunt compile-globalize task to be more flexible -- not sure if we need to process other widgets dependencies with this.
Big thank you to @rxaviers for his help how to do this and quick bugfixes!