Closed mdonadoni closed 1 year ago
Currently there is some padding around the preview of ROOT files and of PDF files. Should I remove it?
Also, what do you think about moving all the logic regarding the preview of files (e.g. checking constraints, fetching the file, how to display each type of file, etc.) to a new React component, so that it is not mixed with the logic of the "Workspace" tab (e.g. files sorting, etc.)?
Works nicely :+1: In view of longer term, it'll be really good to separate the previewer logic into a new component.
I very slightly prefer the version without padding, both for the ROOT file preview and for the PDF preview. I also agree on extracting the logic of previewing the files to a new React component.
I have just found out that the final js bundle is much bigger than before (sizes reported by yarn build
after gzip):
Before
225.62 kB build/static/js/main.bebbe785.js
101.64 kB build/static/css/main.730fe37a.css
After
735.92 kB (+510.31 kB) build/static/js/main.1debd93c.js
101.71 kB (+68 B) build/static/css/main.0c6eca96.css
[many other smaller files...]
The build time has also increased:
yarn
2:51 to 4:17yarn build
28s to 1:02I will investigate how to improve bundle size and/or build time
After lazy loading:
508.7 kB build/static/js/200.d642ac61.chunk.js
231.06 kB build/static/js/main.fee16449.js
101.76 kB build/static/css/main.440a8806.css
[many other smaller files...]
Main application bundle is back to less than 250kB
Closes #322
How to test:
AnalysisResults.root