Repository
https://github.com/irelandscape/quearn
Pull Request is available at:
https://github.com/irelandscape/quearn/pull/16
Bug Fixes
3 issues were resolved:
- Issue 13: Question submission form was confusing to many users.
- Issue 17: Question submission form not reset upon successful posting.
- Issue 15: Question page doesn't have proper URL in address bar when accessed from the answer page. A properly formatted question page URL resulted in user to be redirected to home page.
Question submission form was confusing to many users.
The issue was mostly about two things: tags were entered using multiple input fields which occupied too much space compared to the rest of the form.
The main text area for the post body started with 1 row height which confused people as to where the main text was supposed to be entered.
Also, the form occupied 100% of the screen width, with the fields and their labels being separated by a lot of empty space on wide screens. This was counter-intuitive.
How the problem was fixed:
The text input field widgets for the tags where replaced with Quasar QChipsInput so that all tags could be entered on a single line and easily added/removed, in line with most other steem apps.
The fixed field labels (on the left) where removed in favor of floating labels automatically shrinking and moving to the top of the field when the user selects the field.
The form width now has a maximum value of 850px.
The text area for the main text has a light grey background and an initial height of 7 rows.
Here is a screenshot of the old form:
And here is the form after the fix:
These changes are covered by commit 0b8888c15e9707c05de4cf79e0feb55cb7080476.
Question submission form not reset upon successful posting
StemQ remembers all fields in the question/answer form within local storage until the question/answer has been successfully published.
This allows a user to create a draft and come back to it at a later stage.
However a bug caused the local storage information not to be deleted upon successful posting.
As a result the user was presented with old information in the form upon clicking the "New Question" link.
This issue was resolved in commit 66d638ab241a2b30f68291cf98ac292de49e80b6
A success variable is initialised to false until the question/answer is properly submitted. It is then set to true.
In the beforeDestroy hook, the success variable is checked. If still false, the form information is stored in local storage.
Upon posting success, the form information stored in the local storage is released.
Question page doesn't have proper URL
The problem can be described as follows.
When clicking on an answer from the home page, the following button is presented to the user to access the associated question page:
Upon clicking this button, the user is redirected to the question page.
However the computed URL which is then shown in the browser address bar, is incorrect:
The URL should have the form:
https://www.stemq.io/question/<question_author>/<question_permlink>
But instead, the URL has the form:
https://www.stemq.io/question/<answer_author>/<answer_permlink>
When the URL is copied and pasted into a new browser tab, the user ends up being redirected to the home page, rather than the question page.
This behavior was actually the result of 2 bugs:
- In the above scenario the question page is accessed using the question id associated with the answer, but the question author and permlink is actually required to create an external link to this page. There was thus a requirement to retrieve the original question author and permlink and reconstruct the correct URL using the window.history.pushState javascript method.
- The question page did not process properly the author and permlink elements of the URL.
This problem was fixed with commit 4bba2b3ad130e82c6bf2ea1ba8a7643712ce495a and da6312fdbb332552ad4c15104744ced08cc054fd.
In short, the question URL address was fixed as explained above, and the original question author/permlink is now retrieved from the question id.
Thanks for the contribution, @irelandscape. It's great to see you are fixing issues and improving the user experience of StemQ! The question submission form looks a lot better imo, so great work with that. Overall the code looks good too, and the only thing I noticed after quickly skimming over it is that
let
is sometimes used whenconst
should be used, but that's quite minor.P.S. the tag "task-development" is for task requests, while the tag "development" for contributions.
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? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]
Hi, ok noted. May I suggest that the use of tags is made a bit clearer on the utopian website?
I find it a little bit confusing at times.
Thanks for your review.
Posted using Partiko Android
Thank you for your review, @amosbastian! Keep up the good work!
Hi @irelandscape!
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
Hey, @irelandscape!
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!