-
Notifications
You must be signed in to change notification settings - Fork 50
Description
🙋 Feature Request
Hi Adobe I/O team, I wanted to request adoption of MDX v2 in order to enable interleaving of JSX and markdown, as solved in mdx-js/mdx#1039.
🤔 Expected Behavior
My understanding (and please let me know if I'm mistaken!) was that the <Variant /> tag needs to use the repeat=x system because in MDX v1 it's not possible to have constructs like this:
<Variant platform="android" api="extension-version">
#### Java
**Syntax**
\```java
public static String extensionVersion();
\```
</Variant>
😯 Current Behavior
And instead currently require this:
<Variant platform="android" api="extension-version" repeat="3"/>
#### Java
**Syntax**
\```java
public static String extensionVersion();
\```
Which can be quite cumbersome to keep track of and update, especially when making a lot of structural/content changes across a documentation repo.
Potentially related, I found this known limitation of MDX v1:
| // Custom MDX components have slots and/or repeat props to identify markdown content |
💁 Possible Solution
Adopting changes from #1383 (not sure what other changes/testing would be required).
🔦 Context
In the Adobe Experience Platform Mobile SDK docs using Adobe I/O, we use a lot of code tabs to show snippets and examples, and each of those tabs use <Variant> blocks to show the tab content: https://developer.adobe.com/client-sdks/documentation/consent-for-edge-network/api-reference/#registerextension
Making sweeping changes to the structure or content of these blocks can be hard because you have to keep track of and update all the repeat counts. Being able to mark the start and end of <Variant> ... </Variant> blocks using interleaved JSX would make it a lot easier to maintain the docs.
💻 Examples
https://github.com/AdobeDocs/aep-mobile-sdkdocs
🧢 Your Company/Team
Adobe/Experience Platform Mobile SDK