Skip to content

Instantly share code, notes, and snippets.

@mablin7
Created August 21, 2021 13:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mablin7/f59f900b4f494c4a6dcca9a2be651781 to your computer and use it in GitHub Desktop.
Save mablin7/f59f900b4f494c4a6dcca9a2be651781 to your computer and use it in GitHub Desktop.
GSoC 2021 Joplin - Kanban board project - Final report

GSoC 2021 Joplin - Kanban board project - Final report

The goal of the project was to create a plugin for the Joplin note-taking application, which allowed users to view their tasks on a kanban board

Achieved

  • A functional kanban view, which displays the users notes sorted into columns based on a user-defined configuration
  • Drag and drop between columns
  • A YAML-based configuration format for defining the board
  • A UI for editing the configuration
  • Generating static markdown tables to view a snapshot of the board on client where the plugin is not installed

All major features described in the original proposal have been implemented. Additionally, during development in response to the community's active feedback multiple unplanned improvements were added, such as:

  • Automatic reloading of the board
  • Detailed error messages about mistakes in the configuration
  • The ability to include every note on the board, not just from one notebook
  • Categories, independent of columns, marked with colors (Still in progress as of the end of GSoC)

Thanks a relatively early first release and helpful testers from the community, the plugin is quite stable already, with no significant bugs.

The weekly progress reports can be found in this thread.

What's left to do

As mentioned above, the major features from the proposal are done, but there's already a long list of suggested features from the community. Some examples:

  • The already mentioned colored categories, which I'm currently working on, as of the end of GSoC and should get released on the week after the end of the program
  • Generating Gantt charts
  • Pinning the board
  • Automatically opening a board on startup

I am planning to continue to contribute to the plugin, so, as time allows, most of these ideas would be implemented sooner or later.

Contributions

  • Kanban plugin - all my work can be found in the plugin repository. During the summer, I only worked on the plugin, I didn't make pull requests to the main Joplin repository. I was planning to submit an extension to the plugin API, to allow for an improvement in the kanban plugin, but, due to time constraints, I haven't been able to complete that. I'd still like to work on that, after the summer.

Challenges and what I've learned

This wasn't my first project of this scope, but it was the first one to have an active community. Interacting with users of my own application was a new experience for me and I've learned a lot about handling bug reports and feature requests and making the program user-friendly.

On the technical side, the largest challenge was state management, the state being the position of each note on the board. In short, I wanted to avoid keeping the state anywhere in the plugin, and have Joplin's database as the only source of truth. But this introduced the problem that on render the state had to be fetched asynchronously, but the drag and drop library I was planning to use (react-beautiful-dnd) needed synchronous updates.

My first solution, was to temporarily create a copy of the affected columns when a drag occurred, and perform the move there, while waiting for the asynchronous state update. But when I tried introducing custom ordering of cards, this became really complicated, as I would have had to replicate the ordering logic both in the renderer and the backend. So I had to switch to a lower-level drag and drop library (react-dnd), with which I could freeze a drag operation "in the air", while waiting for the update. This required some work, because react-dnd provides much less features than the old library, but in the end I managed to get it to work, and overall the plugin actually became simpler, because I could remove the temporary state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment