Kaiteki icon indicating copy to clipboard operation
Kaiteki copied to clipboard

Support for Misskey Flavored Markdown

Open ThatOneCalculator opened this issue 2 years ago • 9 comments

Not even sure if text animations is possible with Flutter, but MFM support would be nice to have (obviously down the line, this isn't a super important feature by any means).

  • [x] x2 Big
  • [x] x3 Very Big
  • [x] x4 Unbelievably big
  • [x] blur
  • [x] [links](https://link.com)
  • [ ] <small>
  • [ ] <plain>
  • [ ] small codeblocks
  • [ ] ```big codeblocks```
  • [ ] jelly
  • [ ] tada
  • [ ] jump
  • [ ] bounce
  • [ ] spin
    • [ ] .x
    • [ ] .y
  • [ ] shake
  • [ ] twitch
  • [ ] rainbow
  • [ ] sparkle
  • [ ] rotate
  • [ ] crop
  • [ ] position
  • [ ] scale
  • [ ] fade
  • [ ] Speed modifiers for animated effects

List from https://stop.voring.me/mfm-cheat-sheet

ThatOneCalculator avatar May 23 '22 18:05 ThatOneCalculator

Kaiteki does support MFM but not complex ones. See https://github.com/Kaiteki-Fedi/Kaiteki/blob/master/src/kaiteki/lib/utils/text/parsers/mfm_text_parser.dart

I will doubt Kaiteki will support every effect, as it's really complex and I don't have the Flutter expertise to implement complicated text transformations. On the web it's certainly easier.

Craftplacer avatar May 23 '22 19:05 Craftplacer

Completely understandable. Great to see that there's some effects already supported though! I'm not amazing at Flutter/Dart but if I come across a solution for an effect I'll see what I can do to contribute 💚

ThatOneCalculator avatar May 23 '22 19:05 ThatOneCalculator

I've also replaced the cheatsheet with the SVM one, as it's running the latest develop code which includes new modifiers that will be present globally in 12.111.x.

ThatOneCalculator avatar May 23 '22 20:05 ThatOneCalculator

:eyes: https://pub.dev/packages/animated_text_kit https://pub.dev/packages/animated_text_kit#create-your-own-animations https://github.com/aagarwal1012/Animated-Text-Kit

ThatOneCalculator avatar May 23 '22 22:05 ThatOneCalculator

👀 https://pub.dev/packages/animated_text_kit https://pub.dev/packages/animated_text_kit#create-your-own-animations https://github.com/aagarwal1012/Animated-Text-Kit

Those resources sadly don't completely help since Kaiteki relies on TextSpans (partially because of formatting), which offer wrapping functionality. Plain Text widgets don't offer wrapping when put inside a TextSpan.

Craftplacer avatar May 23 '22 22:05 Craftplacer

Ah dang :(

I'll keep looking tho

ThatOneCalculator avatar May 23 '22 22:05 ThatOneCalculator

@Craftplacer added a couple more formatting things to the list that might be easier to do

ThatOneCalculator avatar Dec 04 '22 18:12 ThatOneCalculator

I made parser and renderer of Misskey Flavor Markdown (compatible of Misskey v13) for my flutter app

renderer is still developping but it would be helpful

shiosyakeyakini-info avatar Jun 05 '23 11:06 shiosyakeyakini-info

The libraries look great!

I'm not a big fan at the usage of WidgetSpan because they wouldn't properly be laid out like normal text paragraphs, as far as I know. (Requires more expert Flutter knowledge to hack around the text/paragraph renderer)

If you don't mind we could adapt some code from the libraries for Kaiteki. Integrating the libraries as-is wouldn't be as optimal. Kaiteki already has its own constraints and code structure handling text parsing to rendering.

Craftplacer avatar Jun 06 '23 05:06 Craftplacer