Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

Should I submit a PR? or should I fork? #12

Closed
EricCote opened this issue Dec 16, 2022 · 12 comments
Closed

Should I submit a PR? or should I fork? #12

EricCote opened this issue Dec 16, 2022 · 12 comments

Comments

@EricCote
Copy link

EricCote commented Dec 16, 2022

@0phoff said over 20 months ago:

I don't have a lot of time to work on MDXP right now, but once I do, I will probably go through the entire codebase and try to update each of the packages to their newest versions.

Originally posted by @0phoff in #5 (comment)

After 20 months, I wonder if anything will move?

I want to repair a few of those issues for the courses I do. I want to publish a few slide decks for React Academy (https://www.reactacademy.live/live). So I'll be doing a major PR.

Here's I what I want to do:

  • Update to the latest version of MDX and React.
  • Make it run under Vite.
  • Make it compatible with Prism

Anything else?

@karlhorky
Copy link

karlhorky commented Dec 16, 2022

@upleveled is also interested in contributing to an mdx-deck alternative, since we're also using MDX in our slide decks.

@ProchaLu is investigating some alternatives now, including:

  1. Creating a new version of remark-mdxs for MDX v2 as the foundational "mdx splitting library" (see also Implement first pass of MDXs mdx-js/mdx#507 (comment)) and then building a simple slideshow framework around the generated React components
  2. Contributing to / forking MDXP, see #11 and #10
  3. Contributing to / forking next-mdx-deck
  4. Forking mdx-deck and removing the Gatsby parts

It seems that some of our goals are aligned here, maybe it would make sense to work together on this?

@EricCote
Copy link
Author

EricCote commented Dec 16, 2022

I'm down to combine our efforts. From your list, I'd start with # 2, just because I'm familiar with MDXP. And this will also include # 1, because I'm all in with updating to MDX 2.0

What should the next steps be?

I'm starting to create a MDXP branch with the changes. My original plan was to propose a huge Pull Request. But forking the project with you guys would be a lot of fun!

Let's make this happen! I'm stoked!

@karlhorky
Copy link

karlhorky commented Dec 17, 2022

Nice, sounds like it could be a good collaboration 👍

Next steps seem like (to me):

A) @ProchaLu is going to start working on this again in January, so he can continue with the work he was doing investigating remark-mdxs for MDX v2

B) In the meantime, if you want help testing the changes that you're doing to MDXP, then I may be able to take a look during the next weeks - for your plan above, you may also want to consider Shiki as an alternative to Prism

C) Maybe starting with a PR here in this repo would give @0phoff one last chance to accept updates to MDXP under his stewardship - also, it's fine to review and test the changes in a PR here too

D) And then if there's no movement here or if @0phoff decides that they do not want to maintain this project anymore, we can think about forking and future ownership

@EricCote
Copy link
Author

EricCote commented Dec 19, 2022

First, an update on my work (I will post a reply to @karlhorky in a separate message):

I tried very hard to update all dependencies of MDPX. The first half was straightforward and simple (React, Lerna, Chalk, etc). But I got to some major roadblocks trying to update the last few dependencies.

The MDXP codebase is based on MDX-Deck, a Gatsby 2.0 project. MDX-Deck hasn't been updated in the last few years, and cannot run on the newer versions of Gatsby (neither 3.0, 4.0 or 5.0).

When MDXP was created, the team started from MDX-Deck, striped away Gatsby, and replaced it with WebPack.

The problem I face is that both MDX-Deck and MDXP are heavily dependant on a CSS-in-JS engine called theme-ui. There's been a LOT of MAJOR breaking changes between the version used in MDXP (version 0.3) and the current version. (0.15). These changes will necessitate a rewrite of the MDXP rendering engine. There's also a lot of utility functions that workaround the limitations of theme-ui. These will have to be re-written or hacked around for the new version. See: https://github.com/0phoff/MDXP/blob/master/packages/core/src/util/get-as-component.js

These changes are so extensive that I feel that we should drop theme-ui and work with a more popular CSS-in-JS technology, or simply use regular CSS/SASS.

This means that one would have to rewrite a lot of the existing code base. That is a lot to do alone. So unless there is interest from the community to help me, I prefer helping @karlhorky and @ProchaLu with their project.

@EricCote
Copy link
Author

A) @ProchaLu is going to start working on this again in January, so he can continue with the work he was doing investigating remark-mdxs for MDX v2

I'm now ready to give him a hand. I'll start to get a look at remark-mdxs 

B) In the meantime, if you want help testing the changes that you're doing to MDXP, then I may be able to take a look during the next weeks

I now believe that MDXP dependency on theme-ui makes it difficult to update. Not sure I would want to invest more time on it, unless we get a theme-ui expert that want to give us a hand.

for your plan above, you may also want to consider Shiki as an alternative to Prism

Thanks for the tip!

C) Maybe starting with a PR here in this repo would give @0phoff one last chance to accept updates to MDXP under his stewardship - also, it's fine to review and test the changes in a PR here too

D) And then if there's no movement here or if @0phoff decides that they do not want to maintain this project anymore, we can think about forking and future ownership

After my analysis, I feel that there's going to be a lot of rewriting of the MDXP codebase. And sorta feel that that theme-ui should be replaced.

@karlhorky
Copy link

The problem I face is that both MDX-Deck and MDXP are heavily dependant on a CSS-in-JS engine called theme-ui. There's been a LOT of MAJOR breaking changes between the version used in MDXP (version 0.3) and the current version. (0.15). These changes will necessitate a rewrite of the MDXP rendering engine. There's also a lot of utility functions that workaround the limitations of theme-ui. These will have to be re-written or hacked around for the new version.

Interesting, too bad about this. How many versions can you upgrade without it breaking?

Some seemingly relevant breaking changes of APIs I see are:

  • 0.6.0 + 0.8.0 - Switch Styled to Themed
  • 0.13.0 - Move out MDX from main package to @theme-ui/mdx instead

@karlhorky
Copy link

I'm now ready to give him a hand. I'll start to get a look at remark-mdxs

Sure, sounds good. @ProchaLu's plan was to look at the PR below and try to reimplement as a new PR to the mdx-js/mdx repo (using MDX v2):

This work will be useful regardless of what solution we have in the end (MDXP, mdx-deck, or something else)

@karlhorky
Copy link

The MDXP codebase is based on MDX-Deck, a Gatsby 2.0 project. MDX-Deck hasn't been updated in the last few years, and cannot run on the newer versions of Gatsby (neither 3.0, 4.0 or 5.0).

mdx-deck can run with Gatsby 3 and 4, with a few modifications:

We have not invested effort in getting it working with Gatsby v5 yet, because we are trying to move off of Gatsby. But theoretically upgrading to Gatsby v5 may not be too much work, after following my guides above. This would be a part of my option 4 "Fork mdx-deck and remove the Gatsby parts" here.

@ProchaLu
Copy link

Hi @EricCote,

I hope you still want to collaborate with us. To make communication faster, I would reach out on Twitter, and we can discuss future plans. I would start to continue with the work I was doing, investigating remark-mdxs for MDX v2, as @karlhorky wrote above

@0phoff
Copy link
Owner

0phoff commented May 23, 2023

As you probably have guessed, I do not have the time to maintain this project anymore.
I am not working as a web developer at all and it is thus quite challenging for me to keep up with all the advancements in this field.

Personally, I moved over to using slidev, which is a very similar project, only that it is implemented with Vue. It has a bigger team behind it and will thus have more frequent updates.

As with any open-source projects, feel free to fork it and adapt it to your needs !


FYI
I started work on implementing a MDXv2 parser for splitting slides, but never got around implementing MDXP with it.
The idea was to parse the slides at build time rather than at runtime as is the case with the current project.
https://github.com/mdxp-js/rehype-mdx-splitwrap

@0phoff 0phoff closed this as completed May 23, 2023
@karlhorky
Copy link

Seems like Spectacle is the most modern, maintained option for React + MDX slide decks

As of spectacle@10.0.0, the Next.js App Router is supported and documented:

@karlhorky
Copy link

Oh looks like @cpojer just created a minimalist slide deck framework called ReMDX based on a lean fork of Spectacle 👀🔥

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

No branches or pull requests

4 participants