fossasia / visdom

A flexible tool for creating, organizing, and sharing visualizations of live, rich data. Supports Torch and Numpy.
Apache License 2.0
9.99k stars 1.14k forks source link

Split Rendering in `main.js` into seperate Components/Files #889

Closed da-h closed 1 year ago

da-h commented 1 year ago

Description

In order to enable modernizing main.js, this PR suggests to split the rendering-part of the main App-component into smaller parts and files. In total, all proposed changes reduce the size of main.js by about 33% (1736 loc to 1165 loc).

In more detail:

Motivation and Context

The main goal is to improve the maintainability of the webclient's core. As a side-product this PR splits the rendering-function into a disjoint set of components that can be more easily improved or altered in the future.

How Has This Been Tested?

As the env & view modals are refactored here, this PR requires #886 to be merged in order to ensure functionality across the changed implementation.

Note: The Linter Check will fail here. As I have only adapted parts of js/main.js and the file did not yet match linter specs, the github-action that checks all changed files will show some errors for the older code parts. I did not adapted those as the changes required would go beyond the scope of this PR.

Types of changes

Checklist: