-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use SASS for CSS styling + UI improvements #1644
Conversation
* Use SASS that is compiled to vanilla CSS and checked in to version control. This introduces a dependency on SASS for editing the styling of the Web UI. * Add sass_watch and sass_build Make tasks * Use Breakpoint SASS lib for media queries. * Use javascript variables for new/edit test links. * Use CSS gradient instead of image for top bar background.
Change cursor from "pointer" to "default" for exceptions table, since it's not actually sortable.
Hide close link in start dialog in the ready/initial state (before a test has been started)
… and not JavaScript if it should be done, but it's 2020 so let's make the UI snappier instead. SASS:ified CSS rules using SASS indentation. Remove old CSS rules that is not longer used. Indentation fixes.
Make the whole background dark green (remove white edges) Use same table styling as we use in the Web UI, by re-using the styling from tables.sass
…ains info on how to build SASS files, run the test suite, and build the documentation.
Codecov Report
@@ Coverage Diff @@
## master #1644 +/- ##
==========================================
+ Coverage 80.53% 80.61% +0.08%
==========================================
Files 30 30
Lines 2676 2683 +7
Branches 411 412 +1
==========================================
+ Hits 2155 2163 +8
+ Misses 427 425 -2
- Partials 94 95 +1
Continue to review full report at Codecov.
|
…s that has already been downloaded
Looks nice! I still havent spent enough time in the UI code to say much more than that :) On a side note I highly recommend running black "on save" in your editor (not only will it ensure that you never need to make that extra commit, it will also save you time as you dont have to format stuff manually + expose some accidental/bad indentations) |
I did turn that on, but I had to turn in back off because it didn't respect the black settings in Also, a fairly common pattern for me while debugging is to jump into some function/class definition that is located in a |
Ah, yea, that is too bad... Sounds a bit weird though? Is WingPro really incompatible with every black-formatted project that has a pyproject.toml?
True. Assuming you can get pyproject.toml working, we could specify to only include the |
It seems so :/.
Ah, yes, that sounds like a good idea! |
Use SASS for CSS styling
This PR introduces CSS styling though SASS. This greatly improves the readability of the CSS styling rules, as well as the productivity when making changes to the Web UI.
A drawback is that it adds a dependency on having SASS installed for anyone who wants to edit the CSS styling. That's a price well worth paying in my opinion. (Note that it does not add any dependency for people who uses Locust, or even make changes to Locust itself without changing the CSS styling).
Some things to note:
make sass_build
ormake sass_watch
to have SASS continuously watch for changes and re-generate the CSS files.Improve design of HTML reports
This PR also improves the design of the HTML report by styling the tables in the same way as the tables in the normal Web UI. It also makes the whole background dark green (removing the white on the sides), and decreases the text contrast to be slightly friendlier to the eye. The "Download the Report" link is no longer shown on reports that have already been downloaded, or on reports generate through the
--html
flag.(These changes uses the SASS changes, so it didn't make sense to make a separate PR.)
Now:
Before: