-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Update Syntax Transforms list #2676
Conversation
✔️ Deploy Preview for react-native ready! 🔨 Explore the source changes: d5e22cd 🔍 Inspect the deploy log: https://app.netlify.com/sites/react-native/deploys/60eff3d6e38f200007652b90 😎 Browse the preview: https://deploy-preview-2676--react-native.netlify.app |
After facebook/metro#681 is merged, then |
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.
Hi @SConaway, thank you for updating the transformers list! One thing which needs a bit of improvement is the addition of "when not using Hermes" label. It's a bit hard to spot, so maybe we can create the special label (based on the current platform labels - example: https://reactnative.dev/docs/button) for Hermes and flip the markings? (from "when not using Hermes" to "also avaible in Hermes").
Also converting list to the table or just adding an compatibility table (with two columns "JSI" and "Hermes") might be a bit more readable for the users, I'm not sure which solution will be the best, but it will be nice to improve those markings a bit.
Yes, I'll do that a bit later today! I'll try a three-column table, where the columns are:
|
Wait what should I do with the categories / groups (ES3, ES5, ES2020, ...)? |
You can use HTML on the Docusaurus pages, so maybe you can utilize a cell with a Let me know if you will need any help. 🙂 |
@SConaway thanks for updating the list of transforms! There is however a small issue: the transform profile is considered an unstable feature of Metro and the Hermes profile is not turned on by default even when Hermes is used as the engine. So it may be too early to call them out. Cc @motiz88 for a second opinion on this. |
Ok, that’s fine. Just let me know what to do and I can do it! |
Agree with @Huxpro - let's remove the Hermes mention until this is a supported workflow. |
Ok cool. Do we want to stick with the version labels / tags or use groups like in @Simek’s screenshot? |
@SConaway The short ECMAScript names are for newest versions are deprecated, so we should use the full year names ( Also if we don't list the Hermes transformations currently, the table refactor is not required. I can accept the this PR if you just remove the "when not using Hermes" text and updated the ES naming. 🙂 |
Ok I'll do that. Personally I think the table looks a bit better and then wouldn't need to be redone when the Hermes stuff is ready, but let me know! |
@SConaway We can stick to the table, but it would only include Regarding to labels, website also have a quite large portion of visitors using mobile devices and it would be nice if we can spare some width (especially with yearly names in ES labels) and avoid repetition by adding group headings instead of labels (but feel free to customize the appearance of header row, if you thing it's necessary to differentiate them somehow). 🙂 |
Yes. Sounds good. I'll have the PR updated by EOD today |
The table indeed looks much better to me (notably the alignment) and it's more future-proof once the transform profile feature is going public. @Simek I guess you were trying to mean |
Converted to table, but I couldn't quite figure out the I suggest doing something with the proposals, as I'm not sure the best way to organize them—or even if the stages makes sense. Let me know how to improve it. |
Also, is it normal for docusaurus to take about 7 minutes for a full build ( |
Yup, my bad, hope it's not a critical issue. 😉
The reason behind the prod build time is the amount of versions served, in dev more and in preview most of versioned docs are stripped. Additionally adding According to the transformations table - as I suggested earlier to achieve table heading you need to use HTML. Unfortunately you cannot mix the Markdown and HTML table elements together. Also there are some issues in Remark when parsing table content (As seen, for example on the I have also utilized the Please check out the deployed preview (https://deploy-preview-2676--react-native.netlify.app/docs/next/javascript-environment#javascript-syntax-transformers), I'm curious about your feedback. 🙂 Preview |
@Simek May I suggest that we should increase the font size of code blocks? I knew it's probably inherited from somewhere but I just felt like they are way too small to read. |
@Huxpro Do you have in mind If you have in mind those specific |
…eBlock font issue
@Simek In the tables! The general size over the whole website is okay.
Thanks for digging that out. |
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.
Yes, it does look a lot better. Glad my desire to keep the information in the docs up-to-date led to the revamp of the entire page. |
In light of facebook/metro#681, I thought it fitting to update the list of syntax transforms so users know exactly what will work and what won't. Feel free to make any chages as you see fit, I wasn't sure where to put some things.