-
Notifications
You must be signed in to change notification settings - Fork 158
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
What's the plan to get Temporal docs into MDN? #1449
Comments
cc @Elchi3 |
Here's the docs on MDN for how to add new docs to MDN: https://developer.mozilla.org/en-US/docs/MDN/Contribute/Howto/Write_an_API_reference |
I'm happy to help here. Are there opinions on when is a good time for MDN to have Temporal docs? The Temporal docs here are cool! Would be nice if we can borrow from it maybe (license?). Some pointers / thoughts:
Probably a lot more to do. I can write a more detailed content plan if we're ready to get going with this. This will need compat data and interactive-examples for all reference pages as well, for example. So, plenty of things to work on here :) |
This is great! I agree with the suggestions you noted above. You're correct, it's quite a large surface area: the API reference is a few hundred properties and methods across 10 different types, and a lot of accompanying conceptual docs outside API reference. The docs are in Implementers are just getting started so implementation launch is at least a few months away. @sffc do you know the latest rough estimate for when the first implementation will come online? @Elchi3 Given the huge size of these docs, I assume it will take a few months from project kickoff to docs being live in MDN. Would it makes sense to start work on the docs in parallel to implementations so that there won't be a few-month gap between implementation release and MDN docs for it? If yes, then how long before the first implementation launch should we kick off the MDN work? @ptomato - are there any license issues preventing MDN from using the Temporal docs? I assume not but I'm not an expert on licensing. |
Thanks @justingrant 👍
It likely makes sense to get a bit ahead here and work on docs early to avoid the few-month gap you describe here. I filed openwebdocs/project#29 so the Open Web Docs group can discuss when is a good time to get into this. |
I don't expect V8 or SpiderMokey to land before Q4 at the earliest. Don't know about JSC. |
CC @meyerweb |
I’ve made an initial run at adding a couple of sections of the API to a local MDN branch, but I need to go back through and make sure it’s up to https://developer.mozilla.org/en-US/docs/MDN/Contribute/Howto/Write_an_API_reference standards before asking others to look at it. Also, I basically ported the content from https://tc39.es/proposal-temporal/docs, with mostly minor editorial tweaks. If that’s a problem for licensing or other reasons, someone please let me know so I can adjust. (Probably by creating bare skeletons of pages for others to fill in, since I am poorly qualified to write original JavaScript API documentation.) |
Update: I have two and a half sections up to MDN standards (anyone is free to pull https://github.com/meyerweb/content/tree/temporal locally and explore). Currently working to resolve possible licensing incompatibilities between Temporal’s BSD license and MDN’s CC-BY-SA-2.5 license, either through relicensing or a special permission grant. Speaking of, is there a guide on how to add attribution to MDN content if it came from another source and was re-used with permission? If that’s even a thing? |
@meyerweb I've built your branch locally and it's such a great feeling to see this stuff actually on an MDN page! What kind of feedback would be most helpful to you at this point? |
Information architecture and organization feedback is highest priority, so that I don’t end up creating a sub-optimal file structure. So if there’s a feeling that there’s a better way to organize the various pages, now’s definitely the time to tell me, before the whole thing gets built out. After that, any content patterns that should be improved—by that, I mean things that occur on multiple pages. That could be as simple as “you should replace this term you always use with this other term” or as complex as “there’s a persistent misrepresentation of how this thing is used and it needs to be corrected”. After that, typos, individual page corrections, missing examples, etc. All missing content has a All that said, I have content authoring on pause until the licensing situation is clarified and I know how to proceed. I’m resisting building out stub pages for all the classes/properties/methods/etc. that I haven’t done, because I’d rather a page that isn’t fleshed out just create a broken link. Much easier to keep track of what still needs to be written that way. |
With the recent closure of #1468, I’ve restarted the migration. Currently 6 of the 11 classes in the Temporal API are complete to at least a first-pass level; that is, all content for those sections is in place, but has not been peer-reviewed. https://github.com/meyerweb/content/tree/temporal |
Heads up @meyerweb - We've done a few recent PRs with minor docs changes that you might want to use. I labelled PRs that looked like they contain docs fixes: https://github.com/tc39/proposal-temporal/pulls?q=is%3Apr+label%3Adocumentation, although it's probably easier to just look at commits in the docs folder. |
Got ’em — thanks! (And sorry for the delay; holidays ’n’ all ’at.) |
FYI mdn/content#37344. Should I tag someone for technical review, once it is ready? |
I have a question. I hope it's fine to ask here. I got hung up on this statement:
Can anyone provide an example where |
A modern example: December 30, 2011 didn't exist in Pacific/Apia, because the country of Samoa changed to the other side of the international date line to better align with its trading partners in Asia. So it skipped from Dec 29 to Dec 31 that year. |
I am aware of the Gregorian calendar shift, but isn't that due to the adoption of a new calendar? I am unable to get it working, at least with the polyfill: for (let y = 1580; y < 2000; y++) {
for (let m = 1; m <= 12; m++) {
const month = Temporal.ZonedDateTime.from({ year: y, month: m, day: 1, timeZone: "Europe/London" });
for (let day = month.with({ day: 1 }), i = 1; day.month === month.month; day = day.add({ days: 1 }), i++) {
if (i !== day.day) throw [y, m, i];
}
}
}
Thank you! I am able to reproduce this. If I understand correctly though, this is due to an offset change, not a calendar change, and the related verbiage is already discussed and removed in #2495. I wonder if I can get the same behavior without using a |
Ahh, good point. This is indeed a different case, because calendars don't know about offsets. That docs text was written at a time when Temporal had the ability for users to create custom calendars. This feature was removed earlier this year to reduce the complexity of Temporal. And I believe (@sffc can correct me if I'm wrong) that all the currently-supported built-in Gergorian-derived calendars are proleptic, meaning that they don't honor the Julian=>Gregorian changeover that happened in the 18th century. Instead, a proleptic Gregorian calendar will simply act as if the Gregorian calendar was used forever. However, I know that @sffc and others have been considering introducing a built-in calendar that is non-proleptic. If that calendar is introduced, or if a future Temporal-extending proposal adds back the ability to add custom time zones, then the docs text above will be needed. TL;DR - I'd recommend keeping that text in the docs because it's smart for future-compatibility, even if it's not needed with today's built-in calendars. It certainly won't hurt! Also, it's good practice so that ZDT code and PlainDate code will return the same result for that Pacific/Apia case. |
Incrementing I believe all engines are currently using proleptic gregorian. When they add a julian-gregory calendar with a change date, I don't believe the behavior has been hammered down, but there are two possibly reasonable behaviors:
But, this seems like not the best issue to discuss this topic. The title of the issue is about MDN. |
Hello! mdn/content#37344 is ready for a technical review, if anyone's interested. |
Ah yes, I forgot to share that news here. Please check it out and let us know if anything's incorrect. |
I plan to take a detailed look at the pages soon. @Josh-Cena Sorry I didn't have the opportunity before it was merged, but if I have any feedback I'll be diligent about filing issues and PRs. |
This is a placeholder issue to track how we'll bring Temporal to MDN documentation. I assume the current Temporal docs would be a helpful starting point, but I also assume that the MDN folks will have well-informed opinions about these docs. ;-)
The text was updated successfully, but these errors were encountered: