Skip to content
This repository was archived by the owner on Apr 14, 2021. It is now read-only.

Release 1.2.0 #171

Closed
5 tasks done
caridy opened this issue May 12, 2016 · 20 comments
Closed
5 tasks done

Release 1.2.0 #171

caridy opened this issue May 12, 2016 · 20 comments
Milestone

Comments

@caridy
Copy link
Collaborator

caridy commented May 12, 2016

@yoni-tock
Copy link

yoni-tock commented May 12, 2016

Are y'all already aware that this broke in Safari?

screen shot 2016-05-12 at 4 54 23 pm

Everywhere we have intl wired in has the text looking like this.

Safari Version 9.1 (11601.5.17.1)

@yoni-tock
Copy link

Stoked about the changes! Highlights why we need to npm-shrinkwrap our dependencies though

@caridy
Copy link
Collaborator Author

caridy commented May 12, 2016

@yoni-tock we rolled back the first attempt, folks from yahoo were expecting weird behaviors that we are fixing. Can you provide more details about that issue?

@shaosh
Copy link

shaosh commented May 12, 2016

@caridy So this 1.2.0 is still not available and the issue mentioned in #69 is not fixed yet, right?

@caridy
Copy link
Collaborator Author

caridy commented May 12, 2016

@shaosh correct, we are working on the release right now... once we close this, you should see it in NPM :)

@shaosh
Copy link

shaosh commented May 12, 2016

@caridy sounds good. Appreciate your effort in fixing the issue!

@caridy
Copy link
Collaborator Author

caridy commented May 13, 2016

update: we are still seeing one issue when formatting pretty big numbers, e.g.:

11.3.2_TRF -- FAILED Formatted value for 12344501000000000000000000000000000, af-u-nu-latn and options {"useGrouping":false,"minimumIntegerDigits":3,"minimumFractionDigits":1,"maximumFractionDigits":3} is 000,001; expected 12344501000000000000000000000000000,0.

we will postpone the release until tomorrow, latest code is in master, feel free to try it.

@yoni-tock
Copy link

@caridy we're probably having the same thing as Yahoo. We're using react-intl version 2.1.2 and react 0.15. The code that's rendering all funny in that screenshot is the following

  render() {
    const displayMonthAs = this.props.displayMonthAs || 'numeric';
    const dateValue = this.props.dateValue;
    const dateMoment = _.isString(dateValue) ? time.fromDate(dateValue) : dateValue;
    const showWeekday = this.props.showWeekday ? { weekday: 'long' } : {};
    const showYear= this.props.showYear ? { year: 'numeric' } : {};
    return (
      <FormattedDate value={time.toJSDateObject(dateMoment)} {...showWeekday} {...showYear}
        day='numeric' month={displayMonthAs} locales={[this.context.locale]} />
    );
  }

@caridy
Copy link
Collaborator Author

caridy commented May 13, 2016

@yoni-tock it is hard to tell from that code, can you be more specific? /cc @ericf

@yoni-tock
Copy link

@caridy Would it be more helpful for me to mock that with actual values? Or do you need the locale (I suspect it's en-us)? Most of the debugging I did was to binary search our artifacts and determine that what was published as intl: 1.2.0 was leading to weird rendering.

I'm happy to dive in more to try to help! Just let me know what you need

@caridy
Copy link
Collaborator Author

caridy commented May 13, 2016

@yoni-tock what I need is just the value of locale, options and value when rendering: Intl.DateTimeFormat(locale, options).format(value)

@yoni-tock
Copy link

Okay so looking into the react-intl source, it looks like here is where it's calling into that function. I'm still digging in to see exactly what's happening there and how are values are being passed down

@yoni-tock
Copy link

One example where we're getting bad behavior is:

locale = "en-us"
options = {weekday: "long", year: "numeric", month: "numeric", day: "numeric"}
value = (A Date object with string value Fri May 13 2016 00:00:00 GMT-0500 (CDT))

@yoni-tock
Copy link

However I can't reproduce the behavior having cloned directly from commit 7b61f24 and trying to build from source.

@caridy
Copy link
Collaborator Author

caridy commented May 13, 2016

solution for big numbers is in 226f0b0

total 99 -- passed 99 -- failed 0

@caridy
Copy link
Collaborator Author

caridy commented May 13, 2016

intl@1.2.1 is in NPM.

@caridy
Copy link
Collaborator Author

caridy commented May 13, 2016

image

@yoni-tock
Copy link

Woo hoo!

@caridy
Copy link
Collaborator Author

caridy commented May 13, 2016

@caridy caridy closed this as completed May 13, 2016
@caridy
Copy link
Collaborator Author

caridy commented May 19, 2016

v1.2.2 patch resolved some issues.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants