-
Notifications
You must be signed in to change notification settings - Fork 243
Being able to choose the default initial-sort column #521
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
Comments
You can provide your own CSS file(s). It’s additive, so you should be able to override only the bits you want. |
If that doesn’t work, we could support a query param that sets initial sort. |
You could add the following lines of code file:
file:
|
Thanks, but we're rebuilding the plugin from scratch, so that won't be possible. But it will likely be straightforward to do it via query-param. Look out for v4.0.0-rc1 in the coming weeks. |
Can you try with 4.0.0rc0? |
By reading the documentation and the JavaScript files, I realized you added a GET query parameter to let users choose the column to apply the initial sort. I would have preferred the initially proposed idea: adding an INI option via |
Given a good enough argument to why, I'm happy to accept a PR which adds that. |
The It is cleaner and better to set these kind of options via a INI configuration file, instead of typing a long URL with several query parameters. |
The |
You can set And you’re right, it would be more consistent to have |
I see the fix is already present in the source code of the
|
By default, the
initial-sort
css class is set to the Result column<th class="sortable initial-sort result" col="result">Result</th>
Could we be able to change the initial sorted column ?
In my personal case, I prefer to have the sort applied to the Test column (
col="name"
)I do know we can achieve this by using the
pytest_html_results_table_header
hook.But I think it would be easier and move convenient to be able to do this via a command-line option
Maybe by adding another
group.addoption
orparser.addini
?which of these two is better ?
The text was updated successfully, but these errors were encountered: