Report 4: Coding Week 4-5

Progress

  • Created a Menubar > Tools entry for Plugin Monitor
  • Added a state variable to track the plugin window:
     case 'PLUGIN_MONITOR_OPEN':
     case 'PLUGIN_MONITOR_CLOSE':
     	{
     		if (action.type === 'PLUGIN_MONITOR_OPEN') {
     			newState = {
     				...state,
     				isPluginMonitorOpen: true,
     			};
     		} else {
     			newState = {
     				...state,
     				isPluginMonitorOpen: false,
     			};
     		}
     	}
     break;
    
  • Used a wrapper on this.setState() to export the function and update the pluginMetrics in the daemon PluginResourceMonitor
  • Data parsing functions added to PluginMonitorScreen

Plans

  • Adding accelerator key support to open PluginWindow.
  • Writing basic tests for the UI.
  • Developing the Alert system.

Problems

  • Opening a new window with the existing react app's content isn't looking viable right now, since the app does not have a router as such, (only a 'route' appstate). The solution may be to try an approach similar to the plugins, and have a separate html file that is loaded by the window, however, this requires some file system changes, and maybe a dedicated folder for holding the html and the scripts.
2 Likes

Just wanted to say thank you for working on this. It's not necessarily a flashy project, but it will be really useful to the future of Joplin.

3 Likes

Do you have some a branch or pull request to share?

Here is a draft pull request that has the stable, and manually tested changes only, I will be adding more. As of now, I have two more commits left for pushing that await manual testing from my side, before this will be ready for merging, this will be the initial version of the plugin monitor.