https://github.com/Steemia/Steemia
https://github.com/Steemia/Steemia/pull/66
Steemia is a social network app running over the Steem Blockchain. This app will provide the users an enriched user experience plus features commonly encountered in a casually used social media. The goal of this project is to give the community a mobile app where they can do their daily activity in the blockchain.
Here is the url for the third party plugin used before https://github.com/Crypho/cordova-plugin-secure-storage
Comments cannot be edited
Our input had a max length. When an user tried to edit a post with exceed the max length, it will not allow the user to perform any action in this input. To solve this, we've just removed the max-length property in the input allowing the user to write freely.
Transparent toolbar in some devices
After seeing a video from one of our users reporting a bug, we noticed something interesting. The toolbar with options to create a post was half transparent (weird because in my device it did show correctly). However, after looking through Ionic forums, I realized that I was missing te <ion-toolbar> tag in the footer in order to have a background in it.
App frozen after inserting a whitespace as tag
We have to admit that we didn't think about this edge case when we were validating the user input in the tags input. A single whitespace was breaking the app. In order to resolve this, we just add a trim() function to remove any extra empty space in the user input.
Retry http calls up to three times
In order to help slow internet connections, we decide to give three http calls before rejecting a promise with an error. So, if an end user is not able to get the data at first intent, they will have two more chances until the promise is rejected.
Organize comments in a tree view
We have to admit that implementing this feature was challenging in both client side and server side. In server side, we had to recursively collect all the replies of n depth in the tree until n is equal to 0. In client side, we had to recursively render a template by using a createEmbeddedView. We ended up with the following code:
<ul class="pad">
<ng-template #recursiveComments let-commentsTree>
<li *ngFor="let item of commentsTree">
<render-comment [comment]="item"></render-comment>
<ul *ngIf="item.replies.length > 0">
<ng-container *ngTemplateOutlet="recursiveComments; context:{ $implicit: item.replies }"></ng-container>
</ul>
</li>
</ng-template>
<ng-container *ngTemplateOutlet="recursiveComments; context:{ $implicit: commentsTree }"></ng-container>
</ul>
In the code above, it will recreate a nice tree of li and ul tags with the comment inside each of them with the proper indentation and here is the result:
Stay alert because a new feature is also on its way 馃槑Steemia will be speaking more languages in few days :D
Fork the Steemia Repository and send us a pull request with your changes.