Markdown Toolbar PR: Breaking into smaller PRs

The original markdown toolbar pull request had a roughly 7,000-line diff. Most relevant files are in the NoteEditor folder.

Because this is much too long to be comfortably reviewable, I would like some advice on how to break it up.

I currently plan on breaking it into four separate PRs:

  1. Set up the mobile repository for testing with jest
  2. Add syntax highlighting for math, code, etc.
  3. Add commands that will be used by the markdown toolbar and tests (see markdownCommands.ts and markdownCommands.test.ts)
  4. Add the markdown toolbar and connect the commands to it

PRs 2 and 3 in the list above will still be quite long.

Note that I'm still receiving feedback (a large portion of which has to do with bugs!) and, because the PRs will depend on each other (the markdown toolbar, for example, needs the markdown commands) may be backporting fixes from my main development branch. Should I postpone fixing small bugs until after the PRs have been reviewed/merged? Should I wait until I've found/fixed more issues with the markdown commands/the toolbar?

How should I break up the original PR?

1 Like

Separating the markdown commands and toolbar into separate PRs is a good idea as there is always the potential to use those commands for future functionality outside of the toolbar. Not sure if there is any decent way of breaking them down further without making them meaningless unless there are any other reusable components that make sense.

I think small bugs or polish relating to the UI/UX should be put on hold until we are all in agreement as to exactly what that should be (e.g. no point fixing an issue with a button not displaying correctly in a scenario if we don't want it to actually behave that way in the first place).