-
Notifications
You must be signed in to change notification settings - Fork 240
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
refactor: consolidate tables #730
Conversation
Disk and temp tables now share the same drawing logic, as well as consolidating the "text table" states into one single state, as opposed to two separate states (one for scroll and one for width calculations). BTW I know this is kinda an ugly design - creating a giant struct to call a function - hopefully that's temporary, I want to do a bigger refactor to consolidate more stuff together and therefore avoid this problem, but baby steps, right?
bcf6cc5
to
69ec526
Compare
Codecov Report
@@ Coverage Diff @@
## master #730 +/- ##
==========================================
+ Coverage 20.78% 24.20% +3.42%
==========================================
Files 53 56 +3
Lines 13620 12922 -698
==========================================
+ Hits 2831 3128 +297
+ Misses 10789 9794 -995
Continue to review full report at Codecov.
|
A bunch of work towards also refactoring how the process widget gathers and converts data.
Bugs squashed: - Incorrect column sizing for flex cases - Case where the sort menu bounds were still existing despite being hidden - Proc widget not actually taking into account the calculated row widths in some cases during data conversion.
…o_tables Refactors how the process widget to work with the (maybe better) consolidated tables code, as well as refactoring a bunch of old logic.
3032730
to
01574c8
Compare
Description
A description of the change and what it does. If relevant (such as any change that modifies the UI), please provide screenshots of the change:
Refactors the table drawing code, similar to #710.
Batterynot handled in this PR, uses a different table formatThis serves as somewhat of an intermediary refactor to unify some scrollable table code - in particular, in regards to drawing. This is almost a parallel refactor as #710, which did something similar for time graphs. However, this one has a bit more work in regards to the concepts of component state, in particular, for width calculation caching and scroll position management.
The short term goals of this PR is to cut down on duplicate code across the codebase for doing essentially the same thing. This makes it easier to change all the scrollable tables at once, as opposed to having to duplicate work across each widget each time I need to address an issue, or add a feature. It is also far easier to test a single implementation than multiple.
This also serves as a good way to give some 2+ year old code some polish and eyeball time, and it should also make it much easier to implement sorting across all scrollable widgets that would need it, something I've wanted to do for a long time and has been in the backlog for years now.
Both of these consolidation PRs can also be seen as initial work done for #374 and #571, both of which were originally tackled in #265, #488, and #571, though at a bit of a smaller scale for each PR. As such, these changes are kinda "temporary", in the sense that they are changes for now that may be changed again in the near future as I figure out and refactor other core bits of code. However, if I tried to fit even bigger changes in, the PRs would become a bit too massive IMO to work with.
Testing
If relevant, please state how this was tested. All changes must be tested to work:
Please also indicate which platforms were tested. All platforms directly affected by the change must be tested:
Checklist
If relevant, ensure the following have been met:
cargo fmt
)README.md
, help menu, etc.)