Public Lab Research note


GSoC Proposal:Editor repair and fortification

by keshavgarg234156 | March 06, 2020 13:41 06 Mar 13:41 | #23092 | #23092

About me:


Name: Keshav Garg

Email: KESHAVGARG234156@gmail.com

Github: https://github.com/keshav234156

Affiliation: Indian Institute Of Technology, Mandi

Location: Mandi, India

Degree: Bachelor of Technology in Computer Science and Engineering

Timezone: Indian Standard Time IST(UTC + 5:30)

Project Description:


PublicLab.Editor is a general-purpose, JavaScript modular library for rich-text posting, which provides an author-friendly minimal, mobile/desktop (fluid) interface for creating blog-like content, designed for PublicLab.org .It's built on the Woofmark library which is full of bugs. The projects aim at fixing these bugs, Interface improvements, and Development process refinements.

Problems:


Part 1: Potential Bugs

  1. Bold and Italic formatting bug: https://github.com/publiclab/PublicLab.Editor/issues/307 We are facing this bug due to https://github.com/bevacqua/woofmark/blob/master/src/html/wrapping.js#L19-L21 . Only the HTML mode is using the wrapping function. The Markdown mode is using another function and it works perfectly in Markdown mode. Solving this bug would involve introducing the woofmark in src code and making changes to this function. This will also help in solving other bugs.
  2. Converting text to Header and back again: In the Rich view, we can't convert Header back into text. We should fix this behavior. Also, we can only add header up to "h4" tag. We should increase it to "h6".
  3. Styles for quoted text and Code Sample: Styles for quoted text and Code Sample are not displayed. They are just like a Simple text. Styles for the last 4 buttons are also inconsistent with the toolbar
  4. Exiting out of code module: Right now there is no way by which we can start a new paragraph after we have used code module. We can solve this such that pressing the respective hotkey exits the module like in case of quoted text.
  5. Inserting Hyperlinks and File Attachment: Default text that appears after inserting the Hyperlink and Attachment is link text and null respectively.The user most probably wants to change the name other than the default text.If we try to change there name only the first alphabet of the word is identified as link Eg. Word (here blue represent what is identified as a link).We can improve it by asking the user to enter text and link.
  6. Disabling of #Markdown button: Switching to Markdown mode with ctrl+M disables the #Markdown button and the text of the button is not changing to RICH.
  7. Using the center-alignment button in Markdown mode: After using center-alignment in Markdown mode and then switching to AaRich mode. It doesn't align the text instead it is identified as simple text " ->text
  8. Closing of Add a Table Tooltip: After we added the table the Add Table Hovertip doesn't close automatically. It shows up in between the text area giving a bad user experience.
  9. Decentering a centered text:If a text has already been centered by the user(and it may happen sometimes by mistake ) then it can't be uncentered. Also if you want the further paragraph to be uncentered then it's not possible now.
  10. Error Showing even after the User has removed the text causing error :

Part 2: Interface and General Improvements

  1. Implementing the feature of darkening of all the icons: Implementing the feature of darkening of all the icons when it in use. Eg. The bold icon would be darkened when in use. Similar to the feature that is present in Google Docs. We can easily work on this feature after we have introduced woofmark in the source code of PublicLab.Editor.We can get status of whether we are using a particular module from https://github.com/bevacqua/woofmark/blob/master/src/markdown/boldOrItalic.js#L15-L35 and then can implement the feature of icon highlighting for all modules so that it becomes easy for users to know which modules are currently in use.
  2. The stickiness of toolbar and Improvement :
    The idea of a floating toolbar was introduced so that in case of long notes users don't have to scroll to the end of the page to use the toolbar. But it keeps floating even outside the text area giving a bad user experience. The better way would be to fix the toolbar at the bottom and introduce a vertical scrollbar in a Rich mode as we have in Markdown mode.
  3. Design optimization for the Bottom bar in Mobile view: The bottom-bar occupies a lot of space in the mobile view. We should optimize it to look good in the mobile view.
  4. Making toolbar Responsive: Toolbar is cropped in Mobile view and small Screen View.

Part 3: Development process refinement

  1. Integrating the jest-puppeteer for testing and writing tests in a similar way to that implemented in Image-Sequencer.jest-puppeteer facilitates Keyboard Typing and Mouse simulation so would be best suitable here as well.
  2. Adding a test for Bold and Italic Formatting Bug.
  3. Eslint and Husky: Eslint is a tool for identifying and reporting patterns faced in ECMAScript/JavaScript Code, with the goal of making the code more consistent. In order to force the contributor to use Eslint before they commit their code, we will use Husky.

Timeline/Milestone:


April 27 - May 10 (Community Bonding Period)

Get to know the community in a better way and read documentation related to Woofmark, Eslint, Husky and jest-puppeteer

May 10 - May 16 Week - 1

Setting up Eslint and Husky for automatic linting

May 17 - May 23 Week - 2

  1. Removing woofmark as a node module and including it in PublicLab.Editor source code.
  2. Fixing Closing of Add a Table Tooltip.

May 24 - May 29 Week - 3

  1. Integrating the jest-puppeteer for testing
  2. Making toolbar Responsive

May 30 - June 7

End Semester Examination

June 8 -June 14 Week - 4

  1. Fixing Bold and Italic formatting bug
  2. Adding test For Bold Formatting
  3. Adding test For Italic Formatting

June 15 - June 21 Week - 5

  1. Phase-1 Evaluation
  2. Creating FTOs from the work completed till now

June 22 - June 27 Week - 6

  1. Implementing the feature of darkening of all the icons
  2. Fixing Stickiness of toolbar and Improvement

June 28 - July 4 Week - 7

  1. Fixing Inserting Hyperlinks and File Attachment
  2. Fixing exiting out of code module

July 5 - July 12 Week - 8

  1. Fixing converting text to Header and back again bug
  2. Fixing styles for quoted text and Code sample and last 4 Buttons in the toolbar

July 13 - July 19 Week - 9

  1. Phase-2 Evaluation
  2. Creating FTOs from the work completed till now

July 20 - July 26 Week - 10

  1. Fixing the use center-alignment button in Markdown mode and switching to Rich mode
  2. Disabling of #Markdown button

July 25 - August 1 Week - 11

  1. Design optimization for Bottom bar in Mobile view
  2. Fixing the error Showing even after the User has removed the text causing error.
  3. Decentering a centered text

August 1 - August 10 Week - 12

  1. Writing Final Project Report
  2. Complete the remaining work(if any)
  3. Create FTOs from work done till now

Needs:


While working on the above-mentioned tasks, the review and suggestion from the mentors and the community members at least once a week would be highly appreciable and would be enough to complete the project.

Contributions:


I have been a part of the PublicLab community since August 2019. It is the community where I started my open source journey by contributing to the Image-Sequencer project. The contribution to the Image-Sequencer repository can be seen here https://github.com/publiclab/image-sequencer/pulls?q=is%3Apr+author%3Akeshav234156+is%3Aclosed+is%3Amerged .In total I have made 14 merged PRs and opened around 18 issues in Image-Sequencer repository.For the PublicLab.Editor the recent PRs that I made are

https://github.com/publiclab/PublicLab.Editor/pull/393

https://github.com/publiclab/PublicLab.Editor/pull/392

https://github.com/publiclab/PublicLab.Editor/pull/396

https://github.com/publiclab/PublicLab.Editor/pull/396

https://github.com/publiclab/plots2/pull/7534

Experience:


Currently I am a second year student of B.Tech from IIT,Mandi.I have been actively been contributing to Image-Sequencer and PublicLab.Editor projects and I am comfortable with the codebase of both the repositories

I was also a GCI 2019 Mentor in PublicLab and was chosen as the best mentor.I reviewed a lot of PRs made by the candidate during the GCI period.

Audience:


PublicLab.Editor is an important and substantial part of PublicLab.org. It's used by all the users who write their ideas,views on various issue. At this point of time it's full of bugs.After completing the project I expect users will have a great experience in writing their ideas/views on various issues.

Commitment:


I fully understand that completing this big project demands commitment. So to complete this project I commit to spend at least 40 hours per week which can be increased as per the situation and work conditions.


1 Comments

In addition to this ,Inserting stuff in tables is the area where much improvement is needed. Right now I am thinking of how we can make it better and will include in the proposal after I get Initial idea on it.Please do share your view regarding how we can make it better Thanks!!

Reply to this comment...


Login to comment.