-
-
Notifications
You must be signed in to change notification settings - Fork 346
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
feat(widgets::table): add option to always allocate the "selection" constraint #375
Conversation
should i do a similar thing for |
909bd26
to
95e19d2
Compare
Codecov Report
@@ Coverage Diff @@
## main #375 +/- ##
==========================================
+ Coverage 85.10% 85.11% +0.01%
==========================================
Files 40 40
Lines 8727 8736 +9
==========================================
+ Hits 7427 7436 +9
Misses 1300 1300
|
Also +1 to implementing this idea - this is otherwise pretty jarring. |
i think i addressed all requests, is the current state OK? PS: someone with write, could the "CI / coverage (pull_request)" workflow be re-run? |
I'll wait on a second review on this one. |
Thanks for implementing this, this has been a pet peeve of mine on other I am not sure if allocating is a fitting word here, it confused me initially. Otherwise LGTM. |
All the fields on |
You are right, I somehow thought the fields were public. |
any suggestions what to use instead? |
How about something like:
with a commit body like:
|
is the change in 146d791 enough or should something else be changed? |
Sorry - I miscommunicated here a little. The suggested text in my previous comment was for the git commit history rather than the doc comments. I suggest the docs should be written about the current implementation, and they don't need to cover history unless there's a strong likelihood of users needing to transition. Because this is new code, I'd avoid this. The git commit is where we talk in terms of what the change was "This is how things changed". Aside from that, the other comment changes are good. If you can rebase and squash this with a new commit message that better explains the changes (rather than 8 commits), that would be great. |
146d791
to
621fc2f
Compare
rebased onto latest master, squashing commits that could / should be squashed, i think any further squashing would reduce clarity of the commits also changed the initial commits messaging based on the feedback |
Thanks for the PR! This is a feature that I've wanted for a while as well! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only have minor documentation related comments. The PR LGTM otherwise.
just as a note, i have explicitly mentioned "row selection symbol" instead of just "selection symbol" for things like #376 |
b8f413e
to
0d65db6
Compare
force-pushed to rebase onto latest master (which added |
i will ask again, just to be sure:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good, but let's use a commit message such as feat(table): ...
before merge 🐻
Before this option was available, selecting a row in the table when no row was selected previously made the tables layout change (the same applies to unselecting) by adding the width of the "highlight symbol" in the front of the first column, this option allows to configure this behavior.
and "render" to make use of that
…_width instead of a boolean also refactor "render" to make use of this change
Co-authored-by: Dheepak Krishnamurthy <[email protected]>
0d65db6
to
114d2b3
Compare
@orhun are the commits correct now? i personally use that style for my projects, to quickly note which subject (file) is meant, because there could be multiple things that have the same name in different paths (example in this project |
Keeping it broad is fine for this - it's mostly for the Changelog |
Yes please. Thanks for this change. |
This PR adds a option for
Table
to always allocate the "selection column", regardless of if something is selected, this way there is less "moving around" of the layout.The default is still
false
(only allocated if something is selected), but it can both be enabled or disabled in a builder function.Note: also renamed some internal variables to better reflect on what they do / track