Skip to content

Conversation

@volkan-aslan
Copy link
Contributor

If you move 'col-result' to right hand side in results-table, it always shows 'hide details' even details are already collapsed.

the reason is, col-result is not the first td element of the results-table anymore and therefore it adds collapsible class to first td element.

because of this reason, below function does not work:

.col-result:hover::after {
  content: " (hide details)";
}

.col-result.collapsed:hover::after {
  content: " (show details)";
}

changing '.collapsible > td' to '.collapsible > col-result' fix this problem.

Copy link
Contributor

@BeyondEvil BeyondEvil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It be great if you could add a test for this as well, preferably an integration test.


if (collapsed) {
resultBody.querySelector('.collapsible > td')?.classList.add('collapsed')
resultBody.querySelector('.collapsible > col-result')?.classList.add('collapsed')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have the code infront of my right now as I'm on vacation, but are we sure this will uniquely identify the column?

I ask because IIRC other things can have at least the ".collapsible" class.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it is but better if you can double check when you return from vacation.
Thanks.

@BeyondEvil
Copy link
Contributor

Thank you for your contribution!

Please see my comments.

@volkan-aslan
Copy link
Contributor Author

I have added a test to verify if it adds the 'collapsed' class to col-result even if the table order changed.

@volkan-aslan volkan-aslan requested a review from BeyondEvil April 24, 2024 11:55
Copy link
Contributor

@BeyondEvil BeyondEvil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@BeyondEvil BeyondEvil merged commit 38b8a6c into pytest-dev:master Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants