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

Focus REPL panel on click #2005

Merged
merged 1 commit into from
Jul 1, 2024
Merged

Focus REPL panel on click #2005

merged 1 commit into from
Jul 1, 2024

Conversation

byorgey
Copy link
Member

@byorgey byorgey commented Jul 1, 2024

Closes #1486.

I'm not entirely sure I understand why this is necessary but it seems like for anything with a brick viewport it's not enough to just rely on wrapping it in clickable. We have to actually set their focus explicitly depending on the identity of the clicked viewport.

Copy link
Member

@xsebek xsebek left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this @byorgey. 👍 I read this code but it did not occur to me it was missing a line for REPL.

Perhaps this should be mentioned in the brick documentation.
Or it's a bug and clickable should apply through viewport.

@byorgey
Copy link
Member Author

byorgey commented Jul 1, 2024

Perhaps this should be mentioned in the brick documentation.
Or it's a bug and clickable should apply through viewport.

I'm really not sure! Maybe someone should try to make a minimal example in order to ask about it on the brick issue tracker. But I don't think I have the motivation to do that.

@byorgey byorgey added the merge me Trigger the merge process of the Pull request. label Jul 1, 2024
@mergify mergify bot merged commit 6b58979 into main Jul 1, 2024
12 checks passed
@mergify mergify bot deleted the push-vwzoxtuvyxto branch July 1, 2024 10:42
@byorgey byorgey added the CHANGELOG Once merged, this PR should be highlighted in the changelog for the next release. label Jul 1, 2024
@xsebek
Copy link
Member

xsebek commented Jul 1, 2024

@byorgey on further thought, maybe this is correct.

If you have a clickable named widget and inside it another named widget, then the name in event will be the inner one.

Maybe the other panels just don't have inner named widgets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CHANGELOG Once merged, this PR should be highlighted in the changelog for the next release. merge me Trigger the merge process of the Pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clicking anywhere in REPL panel should focus it
3 participants