Skip to content
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

Mouse movements example does not work #3652

Closed
porridge opened this issue Nov 8, 2023 · 6 comments · Fixed by #3678
Closed

Mouse movements example does not work #3652

porridge opened this issue Nov 8, 2023 · 6 comments · Fixed by #3678
Assignees

Comments

@porridge
Copy link

porridge commented Nov 8, 2023

When I run the example at https://textual.textualize.io/guide/input/#mouse-movements in gnome-terminal all I can see is black screen, and nothing I do (apart from CTRL+C) seems to have any effect.

textual diagnose

Textual Diagnostics

Versions

Name Value
Textual 0.41.0
Rich 13.6.0

Python

Name Value
Version 3.11.2
Implementation CPython
Compiler GCC 12.2.0
Executable /srv/home/porridge/.local/share/virtualenvs/reconcile-Vnvz65ja/bin/python

Operating System

Name Value
System Linux
Release 6.1.0-13-amd64
Version #1 SMP PREEMPT_DYNAMIC Debian 6.1.55-1 (2023-09-29)

Terminal

Name Value
Terminal Application Unknown
TERM xterm-256color
COLORTERM truecolor
FORCE_COLOR Not set
NO_COLOR Not set

Rich Console options

Name Value
size width=87, height=27
legacy_windows False
min_width 1
max_width 87
is_terminal True
encoding utf-8
max_height 27
justify None
overflow None
no_wrap False
highlight None
markup None
height None
Copy link

github-actions bot commented Nov 8, 2023

We found the following entries in the FAQ which you may find helpful:

Feel free to close this issue if you found an answer in the FAQ. Otherwise, please give us a little time to review.

This is an automated reply, generated by FAQtory

@TomJGooding
Copy link
Contributor

TomJGooding commented Nov 8, 2023

It looks like the CSS for this example hasn't kept up with Textual updates. For example, TextLog should be RichLog, but more importantly the transparent layer no longer works following the changes to opacity in 25d72fe. Is this a bug?

@TomJGooding
Copy link
Contributor

TomJGooding commented Nov 8, 2023

For what it's worth, I don't think it really made sense that the Ball widget was still visible when its container had an opacity of 0%.

But this change might have inadvertently introduced a bug for layers with opacity. Here's a simple example adapted from the docs for Layers, with a binding that changes the opacity of #box1.

[Edit to add: I thought perhaps setting the background style with opacity would work, but this has a similar issue]

Before v0.29.0

before-screenshot

After v0.29.0

after-screenshot

@rodrigogiraoserrao
Copy link
Contributor

Fixing this example depends on #3676.

@rodrigogiraoserrao
Copy link
Contributor

Or not. #3678 fixes this by changing the logic in the code a bit.

Copy link

Don't forget to star the repository!

Follow @textualizeio for Textual updates.

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 a pull request may close this issue.

3 participants