Evening all, I wasn’t expecting to have another update so soon, but I couldn’t sleep tonight so I smashed through some work instead.

At the moment, most of these calls are mocked, so the safe://phantom website won’t be functional - I’m waiting on a couple of very minor updates in the next week from the SAFE development team to unblock me (and anyone else doing SAFE browser-based development), so while what you’re seeing has all been coded in entirety, the underlying SAFE network libraries are all using mock data for my own testing purposes.

New features

There is now a posts listing page, accessible after selecting an NRS to edit:

Creating a new post takes you to the post edit page, where basic markdown is now supported, including a live updating preview (very similar to the safenetforum editor, only bigger). I still need to add support for anchors, blockquotes, code blocks and images. I’m actually quite proud of the markdown -> HTML formatter so far, I’m just very happy with how so little code is accomplishing so much. Normally, when I write raw Javascript it ends up a horrible mess, so I guess it was a good night for me.

At the moment, the save post / publish post buttons do nothing, but all the Markdown -> HTML work has been done, so making those work will be minor, I just need to do some more mocking work first to enable it.

And here is the post listing page if you click the back button:

Design decisions

I’ve decided that posts will be stored as raw markdown, with a small amount of HTML issuing a REL canonical, at their respective post URL, for instance:

Accessing /#/post/draft-post will show you the webpage with all theme styling, javascript, etc.

will show you the webpage with all theme styling, javascript, etc. Crawlers can simply load just /post/draft-post which will contain the text-only markdown version of the page, but the canonical URL will point to: /#/post/draft-post

This means that despite it being a single page app, crawlers shouldn’t have any issue indexing the content of the website.

I mentioned in the last update that I was targeting a 180kb download for the entire Phantom application (all pages, all CSS, all Javascript, etc), and at the moment I’m doing pretty well:

Compressed, I am totalling 67KB, + 44KB of font files, so 111KB, uncompressed I am totalling around 230KB. I’ve managed to get it so small by being absolutely ruthless with dependencies, at the moment I have no dependencies which aren’t required for VueJS to function (for instance, writing my own Markdown parser as tersely as possible, writing my own SAFE network libraries, my own Promise library, my own cache library - with the position of caring more about code-size than ease of development).

I don’t see any reason why I shouldn’t be able to keep the compressed (what is sent over the network) size under 150KB and the uncompressed size under 260KB for the final project.