Use FEP-c16b: Formatting MFM functions #410
No reviewers
Labels
No labels
a11y
Bug
Bug fix
Critical Priority
Documentation
Feature
Feature request
Held for next release cycle
High Priority
Low Priority
Medium Priority
Minor change
Translation/Locale
WIP
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: AkkomaGang/akkoma-fe#410
Loading…
Reference in a new issue
No description provided.
Delete branch "ilja/akkoma-fe:use_fep-c16b_formatting_mfm_functions"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Related AkkomaGang/akkoma#381
After discussing in https://akkoma.dev/FoundKeyGang/FoundKey/issues/343 a scrubber-friendly way was discovered for representing the MFM functions in HTML. These are the front-end changes needed for that. This should fix the MFM in Akkoma and provide compatibility for the same MFM functions as Foundkey has.
In this PR we:
./src/components/emoji_input/suggestor.js
x2
,x3
,x4
, I took the sizes that we already used in Akkomaoverflow: hidden;
on the StatusBody now)Broader scope where this PR is part of:
Extra notes:
Sparkle has not been implemented here. It didn't work before and it requires some extra JS. This is already a strict improvement, and also a very fundamental change over multiple repositories. So it seems better to me, to do sparkle in a separate PR.
We can check MFM on https://genau.qwertqwefsday.eu/ > three dots menu > About Foundkey > click the "I ❤️ Foundkey" button > type MFM and click the "Show preview"
<>
buttonList of MFM functions I tested
These are all the supported functions and different combinations of attributes, and whether they have been confirmed to work. We test text, emoji, and custom emoji.
$[center tofu 🐈 :hehe:]
$[flip tofu 🐈 :hehe:]
$[flip.v tofu 🐈 :hehe:]
$[flip.v,h tofu 🐈 :hehe:]
$[font.serif tofu 🐈 :hehe:]
$[font.monospace tofu 🐈 :hehe:]
$[font.cursive tofu 🐈 :hehe:]
$[font.fantasy tofu 🐈 :hehe:]
$[font.emoji tofu 🐈 :hehe:]
$[font.math tofu 🐈 :hehe:]
$[blur tofu 🐈 :hehe:]
$[rotate tofu 🐈 :hehe:]
$[rotate.deg=30 tofu 🐈 :hehe:]
$[x2 tofu 🐈 :hehe:]
$[x3 tofu 🐈 :hehe:]
$[x4 tofu 🐈 :hehe:]
$[x2 $[x2 tofu 🐈 :hehe:]]
$[x2 $[x2 $[x2 tofu 🐈 :hehe:]]]
$[position.x=3 tofu 🐈 :hehe:]
$[position.y=5 tofu 🐈 :hehe:]
$[position.x=3,y=5 tofu 🐈 :hehe:]
$[scale.x=3 tofu 🐈 :hehe:]
$[scale.y=5 tofu 🐈 :hehe:]
$[scale.x=3,y=5 tofu 🐈 :hehe:]
$[fg tofu 🐈 :hehe:]
$[fg.color=#fff tofu 🐈 :hehe:]
$[bg tofu 🐈 :hehe:]
$[bg.color=#fff tofu 🐈 :hehe:]
$[jelly tofu 🐈 :hehe:]
$[jelly.speed=5s tofu 🐈 :hehe:]
$[twitch tofu 🐈 :hehe:]
$[twitch.speed=5s tofu 🐈 :hehe:]
$[shake tofu 🐈 :hehe:]
$[shake.speed=5s tofu 🐈 :hehe:]
$[spin tofu 🐈 :hehe:]
$[spin.speed=5s tofu 🐈 :hehe:]
$[spin.y tofu 🐈 :hehe:]
$[spin.y,speed=0.3s tofu 🐈 :hehe:]
$[spin.x tofu 🐈 :hehe:]
$[spin.x,speed=0.3s tofu 🐈 :hehe:]
$[spin.alternate tofu 🐈 :hehe:]
$[spin.alternate,speed=0.3s tofu 🐈 :hehe:]
$[spin.left tofu 🐈 :hehe:]
$[spin.left,speed=0.3s tofu 🐈 :hehe:]
$[jump tofu 🐈 :hehe:]
$[jump.speed=5s tofu 🐈 :hehe:]
$[bounce tofu 🐈 :hehe:]
$[bounce.speed=5s tofu 🐈 :hehe:]
$[rainbow tofu 🐈 :hehe:]
$[rainbow.speed=5s tofu 🐈 :hehe:]
$[tada tofu 🐈 :hehe:]
$[tada.speed=5s tofu 🐈 :hehe:]
d1b2e7b51e
toaa173b8642
aa173b8642
to7a7fdae4ae
7a7fdae4ae
to3065416c93
f12068d6c2
to56a59e1b55
WIP: Use FEP-c16b: Formatting MFM functionsto Use FEP-c16b: Formatting MFM functionsUse FEP-c16b: Formatting MFM functionsto WIP: Use FEP-c16b: Formatting MFM functionsWIP: Use FEP-c16b: Formatting MFM functionsto Use FEP-c16b: Formatting MFM functionsdcd09d38e8
to6666a273a4
found a bug ☹️fixed what we can, upstream issue created where we can'thttps://mk.absturztau.be/notes/9vdb32gycp0700sc
The colours don't work. Apparently it usesOnly withoutffaa77
, but I think I expect the colour values to start with#
. Need to check what's the correct way(s) to do.#
is valid for value forcolor
, this is now fixed#
in the data-mfm-color attributeI continue to think it’d be best for API users to perform the “data → style variables” transformation in the backend, so any frontend/app can easily support MFM rendering by just including a static CSS file. CSS rendering is a lower bar to clear than running scripts to parse and transform each post (and then still apply CSS rendering)
@ -0,0 +69,4 @@
*/
.emoji {
--mfm-emoji-zoom-size: 2.63;
}
I think the whole emoji size scaling setup is overly complicated. Just setting
--mfm-emoji-zoom-size: 2.63;
etc as here in all relevant cases and using this with a default of1.0
directly in the base emojiheight
definition would achieve the same effect as now but avoid manually overridingheight
directly and--nested-base-emoji-size
for some MFM effects.However, while i appreciate the effort which went into preserving Akkoma’s old emoji scaling exactly (except for nested scaling which previously was a noop), this scaling behaviour is not compatible with Foundkey, iceshrimp and likely all other keys and imho leads to a jarring discrepancy as emoji get scaled noticeable more than text. Foundkey and IceShrimp set the emoji height to
2em
instead of a fixed pixel value which means they’ll get automatically be scaled together with and by the same amount as text without any emoji-specific scaling logic. Imho we should adopt this too; improving portability and simplifying our logic at the same time.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.