`post->title` does not work on mobile app
Closed this issue · 0 comments
Problem
post->title
is in the namespace flybot.client.web.core.utils
which is a namespace dedicated to web utils only.
However, this function was called in several common
namespaces such as in flybot.client.common.db.event
. It was also called directly called in mobile namespace such as flybot.client.mobile.core.db.event
.
post->title
relies on markdown-to-hiccup which has deps on clj-commons/hickory.
Hickory uses some web dom logic in their conversion logic which does not work with nodejs. It was discussed in issue #17 and a PR merged for it #33.
Some npm tiers packages are required to be added in the react native deps in order to make it work in nodejs. The packages suggested in the PR33 are:
jsdom
: which does not work with figwheelxmldom
: which has critical vulnerabilities
Suggestion
The mobile development not being a priority right now, we can use a goog-define
to only require markdown-to-hiccup
at runtime in the web build.
post->title
can only use markdown parsing for the mobile apphas-valid-h1-title?
can have a markdown parsing logic to cover most cases in the meantime in the mobile app
Also post->title
needs to be moved in a common namespace such as flybot.client.common.utils