Gsoc 2019 — Implementing user mentions feature for Apache Allura
Apache Allura is an open source implementation of a software forge, a site that manages source code repositories, bug reports, discussions, and more for projects. Allura is having a well-featured markdown editor. It offers many features such as artifact short-coding with the help of the markdown extensions. Whereas, there was no mechanism to mention other users in a specific artifact or comment. That feature is offered by many modern-type web applications because it is a very useful feature in group discussions.
I was implementing an user mentioning system for Apache Allura during this year’s Google Summer of Code.
Deliverables
Component #1: Markdown extension for detecting user mentions
Allura converts plain text into markdown format using markdown library. I have added a new extension for the library to detect user mentions (Eg: @shalithasuranga
).
Component #2: Autocomplete list for user mentions
When user press @
sign there will be a user list as suggestions.
SimpleMDE is used as the global markdown editor in Allura and it uses CodeMirror for syntax highlighting. Therefore, I wrote a helper script to display the autocomplete list.
Component #3: Info tip for user mentions and user links
An info card will be appeared with mouse hover event on user mentions.
Component #4: A function to send a notification for a given user Id and project
User(s) will be notified via email if their user names were mentioned somewhere. Allura has separate task service for handling long running functions. I have implemented a new task to deliver emails when the artifact identifier and content were passed as the parameters.
Component #5: Notification settings graphical user interface
Users will be able to control user notifications preference of course.
Contributions log
Tickets
- https://forge-allura.apache.org/p/allura/tickets/8281/
- https://forge-allura.apache.org/p/allura/tickets/8282/
- https://forge-allura.apache.org/p/allura/tickets/8283/
- https://forge-allura.apache.org/p/allura/tickets/8284/
- https://forge-allura.apache.org/p/allura/tickets/8285/
- https://forge-allura.apache.org/p/allura/tickets/8299/
- https://forge-allura.apache.org/p/allura/tickets/8304/
- https://forge-allura.apache.org/p/allura/tickets/8323/
- https://forge-allura.apache.org/p/allura/tickets/8324/
Merge Requests
- https://forge-allura.apache.org/p/allura/git/merge-requests/326/
- https://forge-allura.apache.org/p/allura/git/merge-requests/327/
- https://forge-allura.apache.org/p/allura/git/merge-requests/328/
- https://forge-allura.apache.org/p/allura/git/merge-requests/329/
All contributions were not submitted via merge requests and those were merged to master via several branches with ss/
prefix (Eg: ss/8284
).
Commits
https://github.com/apache/allura/commits?author=shalithasuranga
Documentation
- https://forge-allura.apache.org/p/allura/wiki/Features/ — Updated
- In-app markdown help was updated
Tests
Unit tests were added and can be seen in some commits.
TODOs
- https://forge-allura.apache.org/p/allura/tickets/8294/
- https://forge-allura.apache.org/p/allura/tickets/8293/
Conclusion
You are very lucky if you were selected to Apache Software Foundation for Gsoc because it gives a chance to play with complex and well designed software code bases. Thus, ASF mentors are perfect!. My Gsoc mentor was Dave Brondsema
Happy coding everyone!