Design comparison
SolutionDesign
Solution retrospective
What are you most proud of, and what would you do differently next time?
ā Hey everyone! I finished this Markdown app challenge, and I'm very proud of the results. Please check it out, and feel free to provide feedback.ā
š Some notes:
- Utilized
localStorage
to allow user's info to persist beyond refreshing/closing the browser - Used the package
react-markdown
to parse user's markdown into HTML for the preview - Added the ability for the user to download their file (as
title.md
) to their device/computer - Added custom code to ensure that users are able to use the
Tab
key (to create 4 spaces) as well as erase the full tab (instead of 4 individual spaces, one at a time). - Made it as pixel-perfect and responsive as possible.
- Followed best practices throughout project, adhering to DRY, SRP, and separation of concerns with custom hooks, as well as utilizing the Context API to reduce prop drilling.
- Tested all components with Jest and RTL
ā Some other things I added or changed:
- As the user types on the left side, the
textarea
element automatically increases in height, allowing uninterrupted experience for users when typing long documents. - As the user types on the left side, the right side (the preview) automatically scrolls to show the bottom, unless the user purposely scrolls up somewhere, in which case it doesn't automatically scroll for them until they go back to the bottom.
- Added download icon next to the delete icon
- Delete and download icons don't appear for a new document until its been saved, to prevent trying to delete or download a document that technically doesn't exist yet.
- "Unsaved changes" warning appears when trying to navigate to a new or existing document with unsaved changes
- Error messages appear when trying to save a document with:
- a title with a dot (
.
) in it (which could cause issues if downloading the file in terms of determining the extension) - a blank title
- a title identical to another file's title
- a title with a dot (
- Currently selected document's name is highlighted in the light-orange color, and is unable to be clicked (since it's already selected)
- When the title is too long for its space, it is indicated with an ellipsis (
...
) at the end - Originally when the user clicked the 'Save Changes' button, there was no indication that it was successful, so I added a
'Saved!'
indicator (with a checkmark āļø) that disappears after a set amount of time (3000ms
, or 3 seconds). User is unable to click the button again until the'Saved!'
text reverts back to'Save Changes'
. - Made the M of the 'Markdown' logo the site icon š
Community feedback
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord