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

Feature: allow explicit focus in GridFlow constructor #752

Merged
merged 1 commit into from Jan 17, 2024

Conversation

penguinolog
Copy link
Collaborator

  • Automatically select first selectable widget if focus is not configured
  • Fallback to 0 if no selectable widgets

Related #301

Checklist
  • I've ensured that similar functionality has not already been implemented
  • I've ensured that similar functionality has not earlier been proposed and declined
  • I've branched off the master or python-dual-support branch
  • I've merged fresh upstream into my branch recently
  • I've ran tox successfully in local environment
  • I've included docstrings and/or documentation and/or examples for my code (if this is a new feature)

* Automatically select first selectable widget
  if focus is not configured
* Fallback to `0` if no selectable widgets
@penguinolog penguinolog added the Feature Feature request/implementation label Jan 17, 2024
@github-actions github-actions bot added the Tests Tests label Jan 17, 2024
@coveralls
Copy link

Pull Request Test Coverage Report for Build 7558672879

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.005%) to 69.898%

Totals Coverage Status
Change from base Build 7557149912: 0.005%
Covered Lines: 8364
Relevant Lines: 12043

💛 - Coveralls

prepared_contents: list[tuple[Widget, tuple[Literal[WHSettings.GIVEN], int]]] = []
focus_position: int = -1

for idx, widget in enumerate(cells):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

logic is the same as in other container widgets

@penguinolog penguinolog merged commit 9301924 into urwid:master Jan 17, 2024
35 checks passed
@penguinolog penguinolog deleted the gridflow_focus branch January 17, 2024 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Feature request/implementation Tests Tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants