Skip to content
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

Adopt MDX v2 for interleaving markdown and JSX #1389

Open
timkimadobe opened this issue Feb 16, 2023 · 2 comments
Open

Adopt MDX v2 for interleaving markdown and JSX #1389

timkimadobe opened this issue Feb 16, 2023 · 2 comments
Assignees

Comments

@timkimadobe
Copy link

timkimadobe commented Feb 16, 2023

🙋 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

🎁 Tracking Ticket (optional)

@timkim
Copy link
Collaborator

timkim commented Mar 16, 2023

Hey there other @timkimadobe,

I believe we would need to update Gatsby to v5 and some other dependencies. We haven't gotten around to that yet and are currently busy with a few things right now. Hopefully soon!

@timkim timkim self-assigned this Mar 16, 2023
@timkimadobe
Copy link
Author

timkimadobe commented Jul 21, 2023

Hi @timkim! I was just circling back on the DEVSITE-586 ticket and noticed it was closed as fixed. Does that mean the wrapper style Variant block is available for use in a current/future release? Our team would really love to have this feature to help with easier doc writing and maintenance

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

No branches or pull requests

2 participants