Repository
App | Repo |
---|---|
Web | https://github.com/hapramp/alpha-web |
Android | https://github.com/hapramp/1Rramp-Android |
1. The Rating Display Modal in Web App
The 1Ramp Android app displays the ratings on a post by clicking on the rating display section on a post. This feature is now also available for the web app.
1.2. Preparations
In order to get started with adding the display modal, I had to make a few changes/additions to the existing project -
1.2.1. Allowing UserAvatar
component without a link
The UserAvatar
component makes it really easy to add a user's avatar given their username. This component is also rendered in the rating section of a post.
In order to make the click consistent throughout the rating section, it was required to be able to remove the link from the UserAvatar
component. So I introduced a new prop
to it called noLink
-
The links can now be safely turned off before adding the onClick
handle to the rating section.
1.2.2. Adding dependencies
react-custom-scrollbars
and react-modal
are the two dependencies which were added to display a decent looking scroll bar and the modal respectively.
1.3. Implementation Details
Every post ActionBar
now has showPostRatings
in state
to keep track of whether the overlap is open. The state variable gets set to true
when a user clicks on the rating and the modal gets displayed.
1.3.1. Handling document scroll issue
When the ratings in display modal are exhausted, the document below starts scrolling when the user scrolls. To prevent this, Modal
's props are used to enable/disable scroll -
1.3.2. Lazy loading ratings for faster rendering
Rendering all the votes for posts with a large number of votes makes the app very laggy. To prevent this, react-infinite-scroller
is used and only the votes in view are rendered -
1.3.3. More Optimizations
Even when the modal is not active, the components inside it are rendered. So I adjusted the code to display no ratings in the beginning.
When watching a list of posts with many votes associated, it becomes ineffective to calculate total
rshares
for each of the posts. So in this case, totalrshares
are calculated only when the modal is displayed -Vote values are calculated only when a rating card is rendered. This prevents the overhead of calculating all the vote values at once.
1.4. Pull requests
2. Image upload in the markdown editor
Recently we gave the markdown editor support in the web-app. Now you can upload images using the editor too.
2.1. Implementation Details
The image uploader reuses the uploadImage
method and <MediaSelector />
component from the project. Once the media is selected, it inserts the required markdown at the given position in the editor -
2.2. Pull Request
3. Land to the last page after logging in
Earlier in the web app, users used to land on the home page after logging in. While the expectation should be to land on the page where they started the login process.
This has been fixed now, ensuring a better browsing experience in the app.
3.1. Implementation Details
Using the state argument for SteemConnect's login URL builder, we can specify the redirect page after the authentication is successful.
This state is then used in the OAuth callback method to set the route accordingly.
3.2. Pull request
4. Fix "New on 1Ramp" section in Android
The Android app earlier used condenser API to fetch the latest posts by a given tag. The latest changes in the Steem APII rendered it non-functional. To fix this, database API was used instead -
5. What's next?
5.1. Participate in the ongoing contests on 1Ramp
Check out more contests and winners from the previous contests here -- https://alpha.1ramp.io/competitions
5.2. We need your feedback
What features would you like to use on Steem? What do you think is missing from the 1Ramp platform? Give us your feedback on the web and Android applications. We'd love to work on them and build a better platform for creative communities on Steem.
Thanks for the contribution, @singhpratyush! As I mentioned on your previous contribution, it's always very impressive to me how you (and the rest of 1Ramp) consistently submit high quality contributions!
As for the code, there isn't really anything to say. It's very high quality as always. I see you also took @helo's feedback into account and started adding more comments, which is great to see as well.
Since you asked me if I had used the web app on your previous post (which I hadn't), I decided to try it out for a while. It's really amazing what you guys have made! The UI is very clean, and all the additional features such as the competitions are very cool.
One thing I noticed (on your post) is that Markdown tables don't really seem to work properly though:
I'm a creature of habit and still use Steemit.com, but I must say I am quite tempted to switch to 1Ramp! Great work once again, I'm already really looking forward to future updates!
Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.
To view those questions and the relevant answers related to your post, click here.
Need help? Chat with us on Discord.
[utopian-moderator]
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Hi @amosbastian!
Thanks for the quick review :)
Glad that you tried out the app found it interesting. We have quite a few features planned in the upcoming days and you'll surely come to know about them with our utopian updates.
For the table rendering, I see that the table is rendered properly but there are a few more styling improvements required to make it look better.
But I must say that the app is still far from rendering posts perfectly (as compared to Busy or Steemit). I have tried making some improvements but it is taking more efforts than I had expected.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Thank you for your review, @amosbastian! Keep up the good work!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Hey, @singhpratyush!
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!
Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).
Want to chat? Join us on Discord https://discord.gg/h52nFrV.
Vote for Utopian Witness!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Hi @singhpratyush!
Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Congratulations @singhpratyush! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :
Click here to view your Board
If you no longer want to receive notifications, reply to this comment with the word
STOP
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit