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

Feature: Highlight markdown syntax when editing a note #2922

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

xavierleune
Copy link

Feature

This features allows the end user to see a light markdown preview when editing a note.

I'm a daily user of simplenote, it's working quite well and has almost anything I need for my daily basis usage. I always use markdown to edit notes. This is ok for small documents, but when editing large documents, it's sometimes hard to understand where we are in the document. With this pull requests, the markdown syntax is highlighted, thanks to the feature built in Monaco editor.

Here is a document with markdown enabled:

Simplenote.mp4

Note: I also updated the README.md to reflect the node version used by the project.

@xavierleune xavierleune force-pushed the feature/preview-markdown branch from fa7db37 to a21873a Compare May 31, 2021 12:53
@xavierleune xavierleune changed the title Show markdown preview when editing a note Feature: Highlight markdown syntax when editing a note May 31, 2021
@sandymcfadden
Copy link
Contributor

Hey @xavierleune this is really cool! Thanks for submitting it.
It's something I've personally wanted but hadn't yet dedicated the time to look into options.
I'm going to dedicate some time to this over the week to look it over more fully and test it out.

@xavierleune
Copy link
Author

Hey @sandymcfadden thanks for the feedback, that's good to read that this is something you wanted to see done. I can't wait to see it released ;)

@rj-xy
Copy link

rj-xy commented Jun 7, 2021

This is great! Looking forward to this feature

@xavierleune
Copy link
Author

Hi @sandymcfadden, did you had a chance to review this change ?

@sandymcfadden
Copy link
Contributor

sandymcfadden commented Jun 22, 2021

@xavierleune sorry for the delay I had to focus on some other things for a while but should be able to get back to this in the near future.
If we move forward we'll likely need to update some colors and it doesn't look like markdown rules currently catch all the markdown we support, but it catches most and looks like we could even define a custom Monarch language so we can highlight everything we support. This will provide a good start in any case.

It will require some special consideration as it's a big change and should we ever move away from Monaco as the editor it would be hard to remove something like this once added.
We also try to consider our other platforms as ideally we have feature parity across them.

@rj-xy
Copy link

rj-xy commented Sep 15, 2021

@sandymcfadden would you be able to review this PR please?
Its pretty straight forward one from what I can see.
Thank you 🙏

Copy link

@rj-xy rj-xy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work 👍

@codebykat
Copy link
Member

Hi @rj-xy, thanks for your enthusiasm. So there's no confusion about our workflows, let me note that PRs still need to be approved by someone within Automattic before they can be merged. There's not really a point to approving PRs from outside the organization, and it's especially counterproductive to leave an approving review on a PR that already has a comment from a maintainer stating that it needs further work (and also currently has conflicts anyway).

If you would like to build and test a PR or otherwise comment on the code, you are welcome to. However, please list the exact testing steps that you followed rather than simply saying something vague like "Nice work" or "LGTM".

I'm assuming this was all an honest mistake, but I need to warn you that drive-by reviewing multiple PRs without leaving substantive comments comes across as somewhat spammy behavior, so please avoid that in the future as it only wastes everyone's time. Thanks!

@rj-xy
Copy link

rj-xy commented Sep 15, 2021

Hey @codebykat 👋
Thank you for your message.

When I marked this PR as "Approved" (and the other two PRs), I was just indicating that I had reviewed the code and could not see any issues, so just wanted to indicate that I had put some "time" into reviewing this PR.
I only did this because I really like Simplenote, and I use it everyday, and I'd like to use this feature.
I can see how my actions looks spammy, and fair enough, I'm just some random person on Github approving a few PRs in a row 🔫 - but I assure you I did it with only the best intentions - but lesson learnt.

I understand that had I been someone internal (Automattic), my PR approvals would have carried some weight - but I'm not.
So, I've taken what you've written on board, and in the future I will only comments on PRs where I think/believe there is an issue.

As with file conflicts, I just trust the author will address those periodically, until the PR is merged.

As for the comments from the maintainer - I missed that - my bad 😬

Keep up the good work 🥇

@jarruda
Copy link

jarruda commented Dec 5, 2021

Can the maintainer please leave specifics on what they would like resolved in order to merge this PR?

If the way this PR is implemented is problematic, it would be helpful to write requirements for the feature so that time isn't wasted implementing a desired feature in a way that won't be accepted. It's clear that features like this are low priority for the project (PR open for 6+ months), so structuring work in such a way that it's easy to review and accept external work will benefit everyone. 👍

Edit:
@sandymcfadden

It will require some special consideration as it's a big change and should we ever move away from Monaco as the editor it would be hard to remove something like this once added.

After reviewing the PR, the change looks trivial to me - simply enabling a visualization feature implemented in Monaco. Can you clarify why you feel this change is big? If the project should move away from Monaco, simply having had syntax highlighting enabled in it wouldn't complicate it. Anything other than using Monaco's built-in highlighting would necessarily be a far more invasive change.

@logandelafosse
Copy link

Would love this PR to be implemented. I like Simplenote but it easy to get lost in all of the black/white with no syntax highlighting, so I wind up writing my notes in a local text editor with .md highlighting and then copy/pasting to simplenote for remote storage. With syntax highlighting I'd just use Simplenote.

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

Successfully merging this pull request may close these issues.

6 participants