Location: New Delhi, India
Time Zone: UTC+05:30
Mentors: Jeffrey Yoo Warren, Naman Gupta, Ruth Waiganjo
Tag/Topic System: Project Overview
The Tag/Topic System is a very critical component of any content management system. It helps to keep the content organized in a way to easily searchable, indexable and view similar content by navigating to the tag's own page. It is one of the most important feature on PublicLab's Content Management Platform. Publiclab's content produced by the environmental researchers and the PublicLab community is organized by the use of tags very efficiently.
In my GSoC project, I worked on improving the already built Tagging System, fixed bugs and added some additional features and UI changes to make the tagging system more accessible and efficient.
Problem- There was no tag moderation and hence any user was able to add tags to any user's work which sometimes introduces spammy or unrelated tags and hence caused inefficiencies in content organization.
Implemented Tag moderation by blocking first-time posters from adding tags to the notes except their own.
- Hide tag form from first-time-posters and display a message instructing when they will have access to add tags on others work.
- Added tests for the changes introduced.
Learnt more about testing and dig a bit deeper into the project and understood the functioning.
Also, learnt about REST APIs in Ruby while testing possible ways of adding tags on content other than the normal interaction using tag form UI.
Subscription stats bug fixes
P.S- This was one of the scariest bugs that I thought of before working on it. But after working on it, I realized I need to start fresh and therefore, I did not try to fix the query but wrote a new query and the issue was fixed, yayy!!
Problem- The subscription stats page had bugs in the number of subscribers. It was showing some wrong subscribers count for all the tags.
Fixed the query driving the subscription stats
Learnt a lot about Database queries and caching database queries. Came across with the concept of mocking databases for testing.
Best Match autosuggestions
Problem-In autosuggestions for searching tags, existing tags were not showing up as an exact match in the search bar due to inefficient ordering of the autosuggestion results.
Introduced Autosuggestion ordering by placing -
- The exact match, if exists, should be placed at the top
- followed by tags starting with the search query
- followed by tags having search query in the mid of the word
- and at last, the tags having search query in the last.
Got to learn more about Database queries and order by different cases.
Refinements in Cytoscape Visualization
This was one of the most interesting changes made by me in the GSoC Project.
- Improved Visual Display of the Cytoscape Visualization to clearly display the clustering of the tags.
- Improved responsiveness of the cytoscape by limiting the number of tags when displaying on small screen.
- Implemented min and max zoom.
- Implemented sorting feature based on number of subscribers or no. of notes.
- Sort by No. of Subscribers- The tag with highest number of subscribers subscribed to it will have the largest radius in the Cytoscape graph followed by the lower number of subscribers. The radius of node in graph is proportional to the subscriber count of the tag.
- Sort by No. of Nodes- The tag which has been tagged in the largest number of nodes will have the largest radius of node in the Cytoscape graph. The radius of node will be proportional to the number of nodes the tag has been tagged in.
- Introduced filtering of the tags on a number of subscribers or number of nodes.
- Filter by No. of Subscribers- Filter by number of subscribers by setting a minimum number of subscribers and displaying only tags having more number of subscribers than the threshold value.
- Filter by No. of Nodes- Filter by number of notes tagged by the tag by setting a minimum number of notes and displaying only tags having more number of notes tagged by that tag than the threshold value.
- Search by Tags - Show autosuggestions on typing in search bar and show only the searched tag and the connected tags to the searched tag.
- Connection(Edges) of the tag is defined by the number of notes on which the tags occur together more than a threshold value.
Learnt a lot while contributing to this feature. - Learnt about the cytoscape.js library and different graph visualizations. - Worked on UI and responsiveness of the UI. - Learnt heavy database queries for introducing searching and sorting features.
Optimised TagLocations and TagNearbyPeople API-
Time : 2.12s
Learning Outcomes- Collaborated with @barun1024 to do some awesome detective work on the Database queries and optimised the taglocations and tagnearbypeople API to around 10 times faster than before. Learnt various new concepts like eager loading, n+1 problem, rails ActiveRecord deferring of queries and many more.
What is left?
- Develop a category tree interactive feature at /topic-tree with nested topics in a tree view like: https://www.appropedia.org/Appropedia:Fundamental_category_tree Collaborating with @Manasa2850 on this issue to work on the server part while Manasa will be working on the client part.
- Ordering blogs based on when
blogtag was added - https://github.com/publiclab/plots2/pull/10068
Thank you to all the mentors specially @jwarren for constantly supporting each of us and guiding us and always encouraging us throughout the journey. Also, I would like to thanks all the contributors and soc folks for making the past 10 weeks a memorable experience.