-
Notifications
You must be signed in to change notification settings - Fork 9
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
MC-21331 Intl.DateTimeFormat returns different format #19
MC-21331 Intl.DateTimeFormat returns different format #19
Conversation
I'm not sure I understood this right. Is it dependent on the user's settings or rather on the user's runtime, i.e. browser? |
Yeah the issue seems quite tricky 🎃 I tried it in my browser and the format looks good, but the test is failing in our local dev environment and in the build environment, e.g. 2021.04.16 is displayed as 2021/04/16 🐙 "/" instead of "." I'm not sure if it's sth that we only need to fix for the test, or sth that might potentially result in different display format for users with different user_setting 🤔 (e.g. an old windows machine with edge) I have put this issue as an item in our next sync meeting 😎 and @Sakai-san is currently looking a bit into it 😇 |
Did you see #6 (comment) and the issue linked there: nodejs/node#19214 Node <= 12 does not have full ICU support, i.e., it does not come with german date formats. I am guessing you're using node <= 12 on the build hosts. Upgrading node to 14 (LTS) should fix the tests. Am I the only one confused with a lot of PRs issues etc. covering the same topic? Or do you have some system I just don't understand? |
Sorry @neonnoon @Sakai-san for the confusion! Actually I got confused myself too (still getting used to Github 😂 ), but now I think I get everything and let's see if this helps clears up confusion ;)
|
@neonnoon Thanks for your comments. Let me explain what this PR is about in two words. So :
The thing is that we want a universal formatting. Means the same whatever language setting or nodejs version. |
I think there's a misunderstanding between available Intl languages and the browser language. The pyrene/pyrene/src/components/TimeRangeSelector/TimeRangeNavigationBar/TimeRangeNavigationBar.jsx Line 31 in 0eedd32
specifically uses german locale, independent from the browser's language setting. As long as the browser supports german it will display it correctly in german style formatting. And this is independent of the user settings. It is quite difficult to figure out a list of "guaranteed" supported languages. From what I could gather, most browsers are based on http://site.icu-project.org/home (as is node), which contains german. Now the issue was that full-icu was not contained in node prior to 13. So node 12 does not know what to do with So we're not talking about selected browser languages, but about what browsers fully support So, we could add this to Does that make sense? Or did I misunderstand your comments? |
For example, try @neonnoon Thanks a lot for your comprehensive explanation. You were right and I was actually wrong. To sum up, there are two solutions for fixing this language support issue that we are facing with our Continuous Deployment within our main project.
I tried both solution and prefer yours. Why ? Because long term it means getting rid of external dependencies also in development mode. But the problem is the following. We are using nodejs To conclude, I would say we can go for a pragmatic solution this time. However long term speaking I ll try to push built-in solutions like the |
8820cb1
to
6667a82
Compare
Huh, I'm confused, why is your comment posted under my name? 😳😀 Did you use Anyway, I agree with your suggested options (I guess the initial use of I do not have a strong preference for either of the two solutions. Whatever is easier for you (also short time). Either way though, we may wanna think about node 14 and npm 7 eventually. |
@neonnoon Correct. Sorry, I ll quote from now on. Ok let's do so for now. I am not sure to understand your sentence
You'd like to add that config to the
|
The What I meant to refer to was this change: If you keep using node 12 for your internal CI environment, it probably makes sense to revert the version used by github actions. So, to summarise, the way I see it: There are two options:
I do not have a strong opinion for any of those decisions (just wanted to make sure we don't misunderstand each other on the options). So I suggest you discuss and decide this internally? |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
@neonnoon Thank you very much for sharing your expertise as well as your time. It was indeed super helpful. If you agree we I will now submit the change we came up within the present PR to the team. Then if the team agrees we can merge this PR today. Would be nice if you could also accept or reject the PR. Thanks again. |
Thank you so much @neonnoon @Sakai-san for the thorough discussions! I learned a lot from you :) 🤩 🙏 I agree that for now it might be better to go with solution 2 because of the different node environments in the projects:
But since we're abandoning internal CI - it's already announced internally that further new PRs should all be targeting at Github directly, and like @neonnoon mentioned, in general it's nice to think about node 14 and npm 7, could we keep the current node-version in Github action? So possible action items could be:
|
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.
Thank you very much for the PR! I learned a lot!
…ToTS to main * commit '0ab2c1b313e3649ec0990eb7bd13d01d59988dd8': Pass button bar elements as elements, not props. Revert "Pass ButtonProps, not buttons to button bar." Show buttons in kitchensink modal example. Remove unused import. Fix key types. Pass ButtonProps, not buttons to button bar. not working solution
… main * commit '5f95fd642c6bf38d99708e2c46f0ad2a13cc3f1e [formerly 0ab2c1b]': Pass button bar elements as elements, not props. Revert "Pass ButtonProps, not buttons to button bar." Show buttons in kitchensink modal example. Remove unused import. Fix key types. Pass ButtonProps, not buttons to button bar. not working solution Former-commit-id: da477b1115f4a4df31a8c1a3461c8d7cda69715f
* Improvement/MC-21331, PR init code comment. * Fix linting. * Code comment. * Improvement/MC-21331. Story done. * Fix template literal. * Compute local time based on utc time. * Align github action node version with main project node version. Former-commit-id: 24a75c21c0e267792af2e50f80a6569a80516da5
Follow-up of PR merged on the 2021-04-12.