Phantom: a publishing tool enabling users of the SAFE Network to easily manage websites

Hey all, this update is a relatively simple one: The Phantom website now has media queries for every component which should make it look (and feel) much better for mobile devices. It would be ridiculous to exhaustively list every change here so I’m going to pick just a few:

Home page

This is the first screen most users will see, as you can see I didn’t have to make many changes to get this looking right:

Logged in menu

This is the menu for users who are logged in, again, I’ve taken the desktop work and refitted it to slide in / out when the hamburger icon is hit. My goal when working on this “feature” has been to re-use as much as possible from the desktop application. This means less bugs, less components to test against and a quicker interface to make changes to.

Post list

This is the post listing page where you can see… well… a list of your posts? Again, I’ve kept it as simple as possible, getting rid of the table headings and inlining them as subtitles for each piece of data.

Image gallery

This one was a bit messy as it was a lot of information to fit in a single screen, and it’s an overlay on top of the main post / page editing interface. I’m not particularly happy with how this one turned out and I’ll probably revisit it in future, but for now it’s good enough to ship.

Work going forwards

All I have left to do now is churn out a tonne of simple themes to get people started. These will be like the 2020 theme from Wordpress: people can use them, and it’ll get the job done, but I expect the majority of people will import themes created by other authors. If enough theme authors pop up, I’ll consider some sort of marketplace for them. I would be open to sharing PtD rewards with theme authors (say, giving theme authors 1/10th of the PtD rewards I get to give incentives for their creation). This would need to be something automated and I’m not sure if PtD as currently planned would support this kind of setup so I need to look in to it.

Personal

In September I’ll be returning to education as an adult learner to study Computer Science. I currently have a conditional place at Salford university and I’m going through the motions with Manchester Metropolitan. To convert the conditionals to guaranteed offers I’ll need to complete an APEL (Accreditation for Prior Experiential Learning) to show that my professional experience is equivalent to (or greater than) the standard entry requirements for the courses.

This is good for three reasons:

  • Firstly, I’ve always had something of an inferiority complex because I lack knowledge in certain areas (for instance pure Mathematics, algorithmic design) and filling in those gaps will help me to further my goals in the future.
  • Secondly, I’m still working through the trauma of the past year and it gives me a chance to slow down and take account of my emotional and mental health while in an environment I can excel.
  • Thirdly, carefully saving the maintenance loan will allow myself and Annelies the opportunity to buy our own home, giving us a lot of stability in the future.

I’m starting a new caring gig in a week or so (I’m just waiting on a fresh DBS (Disclosure and Barring Service) check) but it’s part time and very low pay. I chose to enter the caring roles because they were temporary:

  • I could work in this industry for just a year and then enter education without any “projects” being left behind.
  • I get the chance to give back to a system which helped me through the worst experiences of my life.
  • I was a little bit scared of re-entering software as a career. My last role ended poorly (I quit my job to enter a mental health ward), and I was worried about getting about receiving a poor reference, despite an otherwise stellar career thus far.
  • The flexibility of part time work allowed me to attend counselling sessions, doctor’s appointments, etc.

At a certain point I’m probably going to have to leave this new role and pick up a part-time software role, maybe something remote with a lot of time flexibility, or a contracting gig where I can work on a project basis, rather than a bums-in-seats basis, but this is a concern for a few months from now.

27 Likes

Another, really small update.

Bugs and features

I fixed a bug where the posts would be displayed on your blog in the wrong order, they’re now displayed in order of creation (most recent first).

Themes

I’ve added a new (now default) theme, Zen. I want to stress that the themes I’m adding aren’t really intended to be used. They’re like the default Wordpress themes: Simple, quick to use and mostly used as examples for other theme authors.

It’s a simple, text only theme with 0 dependencies, so it loads on the SAFE network fast as anything. Once RFC0060 is live, I’ll modify my deployment scripts to create live demonstrations of each default theme so that people can see them in action before switching.

I’ve exposed post creation date to the compiled blogs, so theme authors can now take advantage of this extra data, as you can see above. (it’s an ISO-8601 date string you can use as an argument to javsacripts new Date(post.created), so you can format it however you want, above I’m showing off a simple timeAgo algorithm.

I’m going to add a few more of these, continue to search for obscure bugs, and begin my work on the module / plugin system.

16 Likes

Looks great Shane

To be sure, for now, i can’t fiddle wth this myself?

1 Like

So, the website is deployed to safe://phantom and if you have the safe-cli installed you can do safe auth reqs and safe auth allow $REQ_ID to login in to it, but if you try to create an NRS (a domain name) it won’t work because it requires the work from RFC0060 to implement a call which creates empty an FilesContainer.

As soon as that call is implemented and makes it in to the browser (the browser has access to the node-js safe-api library) and I’ve had a half hour to update my libraries to use the new call, it’ll be fully working. For now, you’re waiting for the same thing as I am. I expect if we don’t see this change in the SAFE development update post tomorrow, it’ll be in the post next week. If it doesn’t look like Maidsafe have time to implement it, I’ll submit a pull request myself. Functionally, the change (or at least, the part of the RFC relevant to your question) is a single line change here, but of course tests will have to be created for the new functionality.

To clarify

RFC0060 is my only dependency right now for the entire Phantom application. As soon as that’s done, the whole thing should be usable - some time to bugtest permitting.

16 Likes

Hey all, I would be very interested in talking to native speakers (read: writers) who can help me to translate Phantom in to other languages. All languages are welcome (and will be implemented) but I’m most interested in Simplified Chinese (简化字), Hindi (देवनागरी / Devanagari), Modern Standard Arabic, Spanish and French. I can’t offer any money, but there’s very little text to translate so it won’t be that much work, and I’ll add you to the contributors list on Github. :smiley:

Note: I’m away most of today at a thing but I’ll be back tonight

12 Likes

@Shane, thanks for the marvellous work!

One thing I’m thinking is that uploading to SAFE Network is always going to cost something. Do you have any ideas how the price and payment options are going to be presented in Phantom UI?

I need to think about that and I likely won’t have any response of value until the safecoin implementation is completed by maidsafe, however:

The base Phantom application uploads a single file, regardless of if you change theme, upload a post, etc, and the file is around 180kb in size (uncompressed). It should, I imagine, be the cheapest app on the entire network (taken in aggregate).

7 Likes

I can translate to spanish.

5 Likes

OK.

Maybe this is also a topic where @JimCollinson could play a role. I would like to see all the different apps having as uniform way of handling payments for the network as possible. I guess there are myriad of ways of achieving it. One possibility could be just having “best practices” instruction by Maidsafe, another might be taking the whole question out of individual apps and having a wallet as a gatekeeper for app’s upload payments. I don’t know I really don’t have any qualification on this area, I just wish it to be as clear as possible.

1 Like

I would support having any transactions go through a browser confirmation dialogue first, listing the amount of safecoin being spent and the apps stated reason for spending it. Think this is definitely a conversation worth having if no instrument for it exists already. Rather than have this be on an upload by upload basis (it would be tedious when managing multiple files) the app should be able to authenticate against a fixed amount of safecoin

@digipl I’ll post the translation document, and the context for each phrase tomorrow morning, UTC. Cheers!

3 Likes

Hey Shane, I can do the French if you don’t get any native speakers to do it. Living and working since two years in France though so I’m confident I can manage it, and in any case I can run it by a few native-speaking friends to be extra sure.

2 Likes

How about lumping it all into Google Translate as a first pass? - then when native speakers get to look at it they can be invited improve the translation.
If, as @happybeing says, Translate can now handle poetry, the relatively simple strings in Phantom should be fairly straightforward.

Cool to see people rallying around to help with this. JAMS has a couple of the popular languages covered too (barring mandarin or Arabic) but we set it up where all of the phrases are in an .MD list so it’s easy for people to see every phrase used by the app and add a translation (once we open source, again) We would really appreciate the same community efforts in the future. We recently set our repos to private just until we secure a domain we like and have the app formally launched. I am really excited to have someone like Shane peek through the code and maybe even contribute. I know ours won’t be quite as lightweight but having outside input and commits will be invaluable to the open source SAFE ecosystem as a whole.

It’s really important that these apps are translated because this is a global network not just an English speaking one. I would love for anyone that can translate Arabic, German, or Mandarin to keep JAMS in mind as well. Also Spanish and French speaking folks we would love to receive any corrections. There will be a reminder in a JAMS release update when that comes down the road.

Don’t mean to hijack the thread but wanted to reach out and echo just how important I think this is. Kudos Shane for taking that extra step to make this tool available to all. :earth_americas::earth_asia::earth_africa:

7 Likes

We’ve started designing/building towards this, with the Safe Network App as the gatekeeper you talk of. If you caught my last video on the tools for having control over your data, and in particular the part on permissions requests, and Just in Time Consent (JITC), you’ll see the building block of it.

Basically when an app required permissions relating to access to your safecoin, you’d get a request screen like this for the app in question (Safe Browser is just shown as an example app BTW):

You’ll note that with the Send Payments has been given a rule of Ask every time, which would give your the sort of control you’re desiring in this scenario.

I haven’t actually fleshed out the screen for a JITC dialog for a Safecoin payment (this is actually a nice reminder, thanks!) but it would work in principle like a publishing one such as this:

But of course with payment specific deets, like the payment confirmation in the wallet app:

Of course applying this Ask every time rule might very well be a sensible and welcome precaution for most apps, but for some you trust and use regularly, it might become an inconvenience, so you could dial that back once you are happy to do so.

And then of course there will be the power of combining these rules with spending thresholds, to say things like “check with me before sending over 50 Safecoins” etc. We’ve started thinking this all through, but it’s been put down as a stretch goal, and we’ve also deemed global spending limits (to allow things like “only allow X amount of spending across all apps in this period before I’m required to intervene”) highly desirable, but just out of scope for MVE.

12 Likes

@JimCollinson this makes it look as if everything (every web app) is shielded by and given access permissions as “SAFE Browser” and that you aren’t giving permissions to individual web apps.

So I’d like to check that is not the case and that we’d see “Phantom” where the above shows “SAFE Browser” if Phantom was a web app in the browser?

1 Like

Yes that is correct. The Safe Browser is just an example app I dropped in there (perhaps a confusing example, sorry!) because I had the icons etc to hand.

But yeah, any app, whether used natively, or accessed via a browser, would ping a request like this when trying to use your safecoin.

7 Likes

Hi @Shane, i’m happy to do the Dutch translation.

7 Likes

Hey Nigel, I can definitely take a look at the French and the German, and I might have someone to do the mandarin for you too… depending on how long it is. Could you pm me the three of those and I’ll see what I can do. Thanks, will be thrilled if I can help out. :ok_hand:

5 Likes

This is what happens when I actually go out for a day, I have so much to respond to. :stuck_out_tongue:

@digipl, @sam1, @anon99156678 I’ll send you all over your documents tomorrow (or most likely, post them in here in the interest of openness - it’s possible some other native speakers will take it upon themselves to do some translating!)

@JimCollinson thanks for sharing your work with us, this looks greaaattttt. The vast majority of calls websites make are likely to be files_container_add_from_raw (found here in the node-js libs) because it’s the only file creation / update call which doesn’t require an active file system (which is something the browser websites don’t have access to as part of their sandboxing).

Will there be any way to batch multiple requests together in to a single Permission to Publish request? If not, I may possibly have to look at creating an RFC which implements multiple files_container_add_from_raw calls or a new method for uploading multiple raw data streams.

@Southside the only reason I don’t want to use Google Translate is because it’s far better at western languages than it is at others (English → German, :+1:, English → Chinese :man_shrugging:)

8 Likes

I’m merely punting Google Translate to get some of it done to a rough standard quickly.
Don’t let the perfect be the enemy of the good. If it does a good enough job for us quickly for a few languages - all of which should be checked by native speakers as soon as these resources become available - then that’s a quick win in the short term. It is no Endsolung to the problem.

I can get a couple of Mandarin speakers to help out who did a similar job for me a couple of years back. That project did not go thr full way but we were going to use their contacts to get us work done in Cantonese, so I can pick that up again if you want?

1 Like