forms icon indicating copy to clipboard operation
forms copied to clipboard

Adding mutiple markdown-it plugins

Open isZYKerman opened this issue 6 months ago • 8 comments

In #1006 I reported that Forms fails to resize pictures when they are rendered and @Chartman123 gave me a useful plugin @mdit/plugin-img-resize to solve this. I managed to add it into Forms. I also added other 4 plugins including @mdit/plugin-align, @mdit/plugin-mark, @mdit/plugin-sub and @mdit/plugin-sup which allow users to align or mark their text and add superscripts or subscripts.

Effects: screencapture-localhost-30030-apps-forms-yK6BYFn2y5wYKeCD-edit-2025-05-09-00_43_36 screencapture-localhost-30030-apps-forms-yK6BYFn2y5wYKeCD-submit-2025-05-09-00_43_57

isZYKerman avatar May 08 '25 17:05 isZYKerman

Please don't use merge commits. It's better to rebase your branch onto our current main :)

Chartman123 avatar May 09 '25 12:05 Chartman123

Sorry, I'm new to GitHub and is really unfamiliar with this :( What should I do now

isZYKerman avatar May 09 '25 12:05 isZYKerman

@isZYKerman no problem :) I see that you managed to rebase the changes and omit the merge commit 👍🏻 And don't get me wrong: we're really happy that you stepped up and help us with this contribution

Chartman123 avatar May 09 '25 18:05 Chartman123

As mentioned in the comment I am not sure we want to add some "random" plugins making it hard to discover what kind of Markdown is supported.

Because this will make it different from e.g. Text, Collectives, Comments, Talk etc apps. Probably the best is to just use NcRichtext like all of those (except text) are using. So the experience across Nextcloud apps is similar.

Yes, a component from our vue lib should be preferred, but there's also no way of setting the image size which could be a real problem, if want to further promote the ability to include images into descriptions

Chartman123 avatar May 12 '25 15:05 Chartman123

but there's also no way of setting the image size which could be a real problem, if want to further promote the ability to include images into descriptions

Maybe we could make them max-width something meaning full as a preview and on click use the viewer to show it as full width?

susnux avatar May 12 '25 15:05 susnux

Most markdown renderers I've ever used (e.g. GitHub) automatically adapt the size of pictures to that of webpages. Just type ![img](/source) and the renderer will deal with the size itself. It would be great if we achieve this. The @mdit/plugin-img-size can only resize pictures to a certain size —— xx px* yy px and thus it is not so friendly to mobile users (but it is still better than the current status in which pictures are displayed in full size and ruin the whole page).

isZYKerman avatar May 12 '25 17:05 isZYKerman

So....... What is out final solution? @Chartman123 @susnux

isZYKerman avatar May 16 '25 21:05 isZYKerman

Hello there, Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

github-actions[bot] avatar May 23 '25 02:05 github-actions[bot]

@susnux what are we gonna do with this PR? keep it open or go for a bigger solution?

Chartman123 avatar Aug 14 '25 20:08 Chartman123