Open hyndgrinder opened 6 years ago
I did a bunch of work on this tonight but haven't been able to finish it because my computer was having issues. Every time I went into the browser to check the HTML output, there was a chance it would try to open a tab containing http://localhost:[some_random_port_number] and it was kinda worrying me. Any idea if that's something in Visual Studio? Anyway, I'm scanning my PC and hope to commit the new code as well as send an invoice at some point tonight. Just thought I'd let you know that new code is coming.
No, not a problem with your computer. It's because the project was initially created as a Python Web project. So, if you let the debug run long enough, eventually it will fire a browser window with the random develoment port. I will see if I can stop it from doing that...
Ah, I see. Thanks for the info. I thought maybe I'd mistyped lxml and installed a fake/malicious package (Apparently there are a lot of those out there). Glad that's not the case.
I forgot to mention the new htmlRestructuring branch. It's not amazing (some CSS issues I didn't have time to correct last night), hence the lack of a pull request, but I think going down the hierarchy like that is probably the right approach.
I would normally be sending JSON to the HTML through AJAX and parsing everything with JavaScript. Then I'd use HTML5 templates to handle the code that gets repeated in a lot of places (ex. one for queries, one for dataItems), but we can't really do that the same way I would in other situations. It does feel like we may need to do add some more templates (in the Templates folder, but not full HTML documents) for the various elements so that we don't have so much HTML mixed in with Python. Do you agree?
Hey. Just some thoughts on HTML exports.
I would say that, ideally, we shouldn't have any code at all mixed with HTML. We should just grab the templates and replace/insert content as needed. This keeps the code less messy and ensures that the HTML is easy to read over and modify. We may still be able to reuse templates for the various tables, but I guess it depends on what's needed.
I also keep wondering if maybe we should be using something other than tables. Tables aren't that common these days, and even though the data we're using works well in that format other structural tags might be better. DIVs are more flexible and are often recommended because they don't imply a certain form of content the way table/tr/td/etc. tags do ("separation of style/presentation and content/structure").
Maybe we should each make a sample HTML page (no real data) to sort these things out. Thoughts?
Hey. I sent you an email with an HTML file in it, but I realized I could've just attached it here so that's what I'm doing. There are some notes included in the file. example.zip
The output file is meant to make the report definition easy to ready. Currently, the output shows as JSON.