ULOG #3: Introducing the #Ulog-Ned Editor and Bug Fix for Draft Auto-Save

in #ulog6 years ago

No fancy introduction for this contribution, just some simple story-telling for changes to ulogs.org.

1) Save Drafts for New Editors

image.png

Because the new #main-editor uses a new URL (/main-editor), there was a bug that the editor redirects to the /editor when it auto-saves.

The fix for this was to pass the location URL when saving drafts so that it redirects to this route when it triggers the auto-save function.

The key fix for this is in the src/client/post/Write/editorActions.js file when it calls the saveDraft editor action. Instead of re-directing to a fixed /editor location, it will pass the current location when it saves a draft.

PR Link: https://github.com/surpassinggoogle/UlogsV2/pull/29/files

2) #Ulog-Ned Editor

screencast-ulogs.org-2018.07.31-23-17-21.gif

This is basically a copy of normal editor, but with some additional explanatory text on what this editor is for when one should use it.

The key changes for this were:

  • src/common/routes.js - added support for #ulog-ned URL to display the Editor component
  • src/client/post/Write/Write.js - refactored the codes to use Switch-Route from react-router-dom instead of using boolean variables
  • src/client/components/Editor/EditorUlogNed.js - the main editor code

PR Link: https://github.com/surpassinggoogle/UlogsV2/pull/31

Final Thoughts

I thank God for the wisdom and knowledge he gave me. For this case, it's to understand and come up with a simple solution for the editor redirect problem.

As what my mentors Dr. Daniel Razon and Bro. Eli Soriano have taught and showed me and my brethren, always give thanks for even the simple things.

This post was made from https://ulogs.org

Sort:  

Indeed,'ulog is upgrading that fast.

Indeed! It's time for uloggers to shine. :)

incredible, this will improve even more the experience when using Ulog.org, congratulations for dedicating so much time to this, you are the best.

Thank @fabian98. Your feedback is very much appreciated.

You're welcome :D i'll always do

@eastmael
That is great.
Keep steeming

oh wow finally someone paid attention to this bug great for every user now :D

Yes, we need to fix those pesky bugs! Lol

Technical Guy

excellent work, be in constant improvement is the goal! thanks for the dedication.

Ten small steps can reach further than one big leap.

Thank you so much for the information and update..

You're welcome. Hope you enjoy the update. :)

Its a big help.. i am always grateful for changes..

Posted using Partiko Android