PublicLab.Editor
                                
                                
                                
                                    PublicLab.Editor copied to clipboard
                            
                            
                            
                        Add "Related work" section to Title module
Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!
Fixes: #470
- [x] tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR -- or run tests locally with 
grunt jasmine - [x] code is in uniquely-named feature branch and has no merge conflicts
 - [x] PR is descriptively titled
 - [x] PR body includes 
fixes #0000-style reference to original issue # - [x] ask 
@publiclab/reviewersfor help, in a comment below 
Before:

After:

In this PR I have added a function for clicking in the input which will also show the suggested posts. I have replaced the focusout function with mouseleave.
cc: @VladimirMikulic @shreyaa-sharmaa @Shulammite-Aso @jywarren @ebarry @keshav234156
In this, I have added the Added Work Div, currently remove button is not assigned any work.
Hi, this looks great, could we remove the "alert" language as discussed in #470 and also change added works to Related posts?
Also just noticing perhaps the button classes have to be updated to display as buttons in this view? Thank you!
Hi, this looks great, could we remove the "alert" language as discussed in #470 and also change
added workstoRelated posts?Also just noticing perhaps the button classes have to be updated to display as buttons in this view? Thank you!
Will do this surely, currently the PR is in progress
Just to clarify, will the related posts be hidden on mouseleave or focusout or visible all the time?
Just to clarify, will the related posts be hidden on
mouseleaveorfocusoutor visible all the time?
Will be hidden on mouseleave.
@jywarren @cesswairimu @VladimirMikulic @shreyaa-sharmaa @keshav234156 @Shulammite-Aso @ebarry I think all the required tasks are completed. Please have a look and review this.

wow this looks great :tada: is the same available when editing?
wow this looks great is the same available when editing?
Yes, we can edit anytime.
Awesome :100:  I also see bunch of changes on this file dist/PublicLab.Editor.js kindly confirm you need those or discard the changes. Thanks
Awesome I also see bunch of changes on this file
dist/PublicLab.Editor.jskindly confirm you need those or discard the changes. Thanks
No, These changes are only due to grunt build. The changes will work without it. Also, it won't affect anything as grunt will build the dist every time. I have made changes in only src/modules/PublicLab.TitleModule.Related.js
Thanks.
aha, gotcha :ok: , if its not much trouble you could remove the changes you made on the file just for accuracy...its showing +9k changes. Thanks
Done 👍. Thanks
@VladimirMikulic have a look.
Hi @govindgoel. The commits are squashed upon merging PR, so it is not mandatory for @NitinBhasneria to do it.
@NitinBhasneria ignoring changes won't get your PR merged. The file is still not formatted correctly. Do I have to point everything manually? Use a tool. Code is still not documented. Follow the best practises. I can't approve something that will be a huge maintenance problem in the future.
@NitinBhasneria ignoring changes won't get your PR merged. The file is still not formatted correctly. Do I have to point everything manually? Use a tool. Code is still not documented. Follow the best practises. I can't approve something that will be a huge maintenance problem in the future.
Yup, I have formatted the file with prettier extension. If you find any line not looking good after the prettier than please let me know. For documentation I am adding some comments. Thank You.
@jywarren have a look and give your review.😊
Hi all. @VladimirMikulic, please remember to be friendly at all times -- it's a very important way that we show respect to one another. I know it can be frustrating sometimes, and myself I sometimes have to take a deep breath and step away for a moment. We know you mean well, and appreciate your help!
@NitinBhasneria you're doing great. please do try to go through each change so that reviewing goes smoothly.
Thank you both for your patience in this PR, which is ending up a bit more complex than we'd thought! Appreciation for you both and @govindgoel and @cesswairimu for your support.
❤️
Hi @jywarren. I apologise if I had done something wrong. Others may not like my approach, but I tend to have almost everything "pixel-perfect". I understand if you would want me to step aside. No hard feelings. :+1:
Hi @jywarren. I apologise if I had done something wrong. Others may not like my approach, but I tend to have almost everything "pixel-perfect". I understand if you would want me to step aside. No hard feelings.
There is no problem from my side. I like your reviews. No hard feeling @VladimirMikulic. Also, I truly understand your work, Thanks you.
@VladimirMikulic I think you are helpful but please use a helping friendly and understanding tone. Like
ignoring changes won't get your PR merged. Do I have to point everything manually?
Reviewers/mentors are for guiding the contributors. You are contributing since much longer time than nitin. That's great. So, you know much more than him. So, there will be many times you have to help the contributors a lot.
The file is still not formatted correctly. Use a tool. Code is still not documented. Follow the best practises. I can't approve something that will be a huge maintenance problem in the future.
Can be changed to
- Please format the file by using a tool named .... . Kindly add documentation following the best practices. Documentation and formatting are requested for better maintainability of the code so that the future developer can easily understand the codebase and commit changes.
 
Please use constructive criticism in a requesting tone/friendly tone.
I understand if you would want me to step aside
We encourage you to continue with the public lab. You did quite well till now and we hope you will do better.
In case you have any concerns, feel free to ping me on gitter personal chat @VladimirMikulic @NitinBhasneria . I remain busy with my job so not able to give time here. Apologies.
@VladimirMikulic i echo Sidharth's excellent response. We are very happy to have you in the community and your detailed support for folks is noted and VERY appreciated. The kinds of in-depth reviews you are providing are excellent and no complaints there.
I think Sidharth has really captured how we hope to have kind and friendly tone in our interactions, not only because it's good to be kind, but also because it helps us all feel good about our work and collaborations and so, work together better. It does sometimes take a little longer to add a friendly quality to our comments. But it has a wonderful immediate and long-term effect on our cohesion and mutual support as a community and so is worth it every time 🙌 I also understand if you need to pace yourself on reviewing in order to ensure you can bring your best self to each session. This is natural -- take care of yourself, too! We appreciate every minute.
I'm also always available to chat via Gitter if you'd like to discuss more. Keep up the great 'pixel-perfect' work! ❤️
Thank you all!
@jywarren have a look

Now that we have Jest testing, would you be able to add a couple simple tests to preserve and protect this behavior? Thank you!
OK, will do it for sure.
Also, wanted to ask is there any problem if I add the test in /specs and run by grunt jasmine
I think the easiest may be to write Jest tests, but if you can do it in Jasmine and it works for you, sounds great! Jasmine is a "simulated" browser environment whereas Jest really runs a headless browser.
@jywarren tests are added.
@sagarpreet-chadha have a look!