-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Sort grid items properly #21996
Sort grid items properly #21996
Conversation
Now all items under `QGridLayout` are required to be sorted. This allow us to omit tabstop order. The tabstop order will follow the layout order. The script can be invoked to fix wrong grid items order in .ui files: ```console python check_grid_items_order.py file.ui ```
I believe it should be stated in "Coding Guidelines". |
RSS downloader:
RSS tab (in main window): Torrent creator: Some discrepancies that may be off topic (i didn't test the behavior before this PR): Options dialog: Add torrent dialog: And finally, something definitely off topic: |
Thanks for the intensive testing!
It actually doesn't go back to Import at the last step. It goes to somewhere else which I couldn't find out... The Import button is highlighted but it doesn't actually have focus.
The "Torrent parameters" have layout coded in c++ and Qt couldn't figure out the correct tab order. It doesn't seem feasible to fix it in this PR. Let's defer this.
It is a header.
Same situation as the RSS "Import>Export>Import".
Added a commit to fix it: Make links accessible by keyboard
Couldn't find out either...
Added a commit to fix it: Make links accessible by keyboard
One might be the Comment field but I couldn't find out the other one...
It goes to the outer vertical scroll bar.
Nice find!
Looked into it but didn't found a solution... |
Maybe later. The "CI - File health" will actually fail if it is violated so we can rely on it to enforce this rule. And it will emit a diff to show how to fix it. |
This comment was marked as resolved.
This comment was marked as resolved.
Note that this requirement will break experience of WYSIWYG widgets editing. Are there valid reasons to do this? |
You can still use Qt designer tools to edit but you still need to make sure the order is sorted.
|
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Some more fields in options (their names in code):
You forgot /off topic |
Fixed.
Fixed.
I noticed it too. Don't know why.
Revised. It is still the same for me in Qt designer Preview. Does it work for you? |
Yes, now it's like the other links. |
This comment was marked as duplicate.
This comment was marked as duplicate.
UI files do not seem to be intended for "manual" use (under regular workflow). It is just an internal format of Qt Designer. IMO, the only problem with this is that design changes made using Qt Designer often produce "ugly" diffs. So I myself preferred to improve them manually after that, and (obviously) such a workflow is not a problem for me. |
It is of course not immediately obvious to the contributor that there exists such script to help them. However when this specific check failed, the error message will include a diff which should help contributors fixing the code. Or we can just remind the contributor to use the python script.
IMO it is not too different than other CI checks. Once a check fails, the author should just fix it.
It is possible to automate these checks. One can setup pre-commit on their local machine. This is the framework "CI - File health" is using. |
I believe such a script should be mentioned in error message (if possible). Seeing just the diff doesn't look friendly to someone who just edited some widget in the WYSIWYG editor.
This is the current state of affairs. But I wouldn't consider it a solid prerequisite.
Okay, I agree. |
Supersedes qbittorrent#21856.
These fields do not expect tab characters.
PR updated. |
@Chocobo1 Bump "pre-commit-hook" rev to v5.0.0 (has a new hook available, |
A separate PR. |
Related: #21996 (comment) PR #21999.
Now all items under
QGridLayout
are required to be sorted. This allowus to omit tabstop order. The tabstop order will follow the layout order.
The script can be invoked to fix wrong grid items order in .ui files:
python check_grid_items_order.py file.ui
Supersedes Fixed tab stop order in the Options Dialog, Connection page #21856.
These fields do not expect tab characters.