closup / process-xbrl

3 stars 1 forks source link

Improve loading wheel #25

Closed kwheelan closed 1 month ago

kwheelan commented 2 months ago

Goal

Basically, we want to make the website look more professional by creating a better loading visual. I'm imagining a wheel in the center of the page that covers all the content and maybe has some process updates, like "Uploading documents.... Converting data... Validating XBRL.... Creating viewer...". But feel free to be a bit more creative.

Background

The web app is a Flask app. The ReadMe on the main branch gives an overview of the app's file structure. I think you should be able to do most adjustments through the css (and maybe some on the HTML template). Here are all the relevant files:

Tasks

Coding

lucakato commented 2 months ago

@kwheelan hi, I centered the wheel for now (vid below). Could you clarify what you mean by this part? make it appear on top of the webpage (which should be covered by the wheel or made opaque) https://github.com/closup/process-xbrl/assets/55814205/34e75d6f-c00e-4dc6-a4c4-a0e42492fed4 Thanks

kwheelan commented 2 months ago

That looks great! I just meant to have the wheel appear overlapping the content (as you've done). When you have a chance, could you also just confirm that the wheel acts as expected when you upload 2 excel files or 0 excel files? Both should give an error, and the wheel should disappear after you dismiss the dialog box.

lucakato commented 2 months ago

@kwheelan Yup the wheel acts as expected for those 2 cases.

I'm gonna see if I can add text detailing those steps. My thought is it only takes like 3s for the XBRL to complete (at least with Clayton ex) so I'm not sure if it makes sense to display each word 'uploading, processing, validating, creating viewer' within that time frame (I'm assuming your idea is displaying the word sequentially).

Maybe something like a simple progress bar might look better? Or a spinning wheel which acts a progress bar?

kwheelan commented 2 months ago

It's a lot slower when we add the Word documents or a longer excel sheet (it's the XBRL validation that takes the longest time). I also think there's some caching, so it takes longer with a document it hasn't seen before.

That being said, feel free to go for a progress bar/wheel instead of the words. Up to you

lucakato commented 2 months ago

I see. Is there an example of a longer excel sheet I can test it with?

kwheelan commented 2 months ago

I don't have an Excel sheet on hand, but try uploading the Excel sheet you have as well as the attached Word doc. For me, it takes ~20 seconds. CA Clayton 2022 Notes (with comments).docx