cloudfour / cloudfour/pleasantest

Improve error message when trying to interact with element that is hidden because of low opacity

Open
#398 0 comments 0 reactions 0 assignees View on GitHub
debuggability improvement good first issue
Dominant language
TypeScript
Stars
175
Forks
2
Avg merge
1m
Merged PRs (30d)
1

Description

Currently if you try to click/type an element that has low opacity to the point of not being visible, here is the error message:

```
Cannot perform action on element that is not visible (it is near zero opacity):
<...element ...>
```

It would be easier to debug if it cascaded up the DOM tree and printed out any non-opaque element:

```
Cannot perform action on element that is not visible (it is near zero opacity):

Its ancestor, this

, has an opacity of 0.02:

```

Or if there are multiple:

```
Cannot perform action on element that is not visible (it is near zero opacity):

Its ancestor, this

, has an opacity of 0.25:

Another ancestor, this

, has an opacity of 0.25:

Another ancestor, this

, has an opacity of 0.25:

This results in the having a net opacity of 0.016, which is not visible.
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.