Mohit Gupta | Github
Areas worked in: Tests, Search, Refactor, Keyboard support
This gist contains work done during Google Summer of Code 2020 with Zulip open source project. Most of my work is fullstack. I Worked both on:
- Zulip's main frontend webapp which is in Javascript
- Zulip backend server which uses Python
Work have been focused upon:
- Refactor of code related to tests
- Cleaning up logging output and verifying it without printing in test output making CI test output clean
- Adding script to detect any unnecessary console output while running tests in CI
- Adding keyboard support for left and right sidebar popover menu.
- Making has:link, has:attachment, has:image work on client side.
- Fixing full text search bug.
I want to thank my GSoC's mentor Shubham Padia for guidance. I also want to thank Zulip's Tim Abbott, Steve Howell, Anders Kaseorg, Rohitt Vashishtha, and many other community members for their support and help during my GSoC journey. I am grateful.
Issue: Can only find URLs when entering them completely. #9165 Right now user have to search messages by typing full urls and the postgres don't index parts of urls. Aim of the work is to allow user to search by typing parts of url instead of full url.
PRs that solves it:
- [WIP] search: Allow searching of messages with link by typing parts of url. It's a WIP work. Essentially it does is that extract urls from rendered html of messages and tokenise them by replacing characters:
.,-,_,/
in the url with space and then index them in postgres for full text search. This will allow the user to search the rendered content by typing just parts of url instead of typing full urls
PRs that solves it:
- Add spam detection in test-backend output: Script to detect unexpected output and tell the test which produced it. A major challenge was that tests were running in parallel. Detection of unexpected console output was not difficult but pin pointing the test that produced it accurate was difficult while tests were running in parralel. With effort finally I was able to solve the problem. (Merged)
- Cleaning up logs, unnecessary console outputs. Most of commits have been merged or were modified and then merged: zulip/zulip#15769, zulip/zulip#15862, zulip/zulip#15867, zulip/zulip#15881, zulip/zulip#15927, zulip/zulip#15934, zulip/zulip#15942
Issue: has:image broken? #16118
PR that solves it:
- filters: Fix has:image and avoid future issues for other has filters. #16126 Merged as commit 4167517 This fixed a bug that was introduced in my previous work on has: filters. The issue was when the message content had a missing outer html tag the search broke. Fixed the issue in such a way, no matter how much html changes in future the search logic won't break.
PRs that solves it:
- popovers: Improve keyboard navigation #15722 This PR adds ability to move the arrow buttons to navigate the items of of the left and right sidebar's popover menus when it is open. This PR also had a commit to open stream popover menu using 'i' hotkey but the commit was removed by a force push as more planning was needed for right way to open the stream popover with keyboard.
PRs that solves it:
- Initially started with: zulip/zulip#15363 (Not merged) but it was closed in favor of - filter: Implement has: filters on client side. #15492 (Commits from PR merged) The goal was basically to bring the has: search filter to client side on webapp for better and quick serching of messages already in browser's local memory.
PRs that do the refactors:
- zulip/zulip#15661, zulip/zulip#15716, zulip/zulip#15711 The main work here was thinking best destination for each test and making sure imports are proper.
PRs that do the refactors:
- zulip/zulip#15569, zulip/zulip#15606 Zulip's markdown flavor for historical reasons was called bugdown which was a confusing term. So a refactor was done to change the word bugdown to markdown from whole code. The challenge like any other refactor was to do this without breaking anything.