Skip to content

FIX Padding: support FIXED render mode if width is PACK - #734

Merged
penguinolog merged 1 commit into
urwid:masterfrom
penguinolog:padding_support_fixed
Jan 10, 2024
Merged

penguinolog merged 1 commit into
urwid:masterfrom
penguinolog:padding_support_fixed

Conversation

@penguinolog

Copy link
Copy Markdown
Collaborator
  • Support the simplest sizing calculation for FIXED pack/render

  • Prevent exposing unsupported render mode

  • Raise human-friendly exception on incorrect CLIP render

  • Move padding tests from test_decoration to test_padding

  • Add WidgetError and WidgetWarning to the widget_decoration module to prevent circular imports

Fix #732

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)

* Support the simplest sizing calculation for FIXED pack/render
* Prevent exposing unsupported render mode
* Raise human-friendly exception on incorrect CLIP render

* Move padding tests from test_decoration to test_padding
* Add `WidgetError` and `WidgetWarning`
  to the `widget_decoration` module to prevent circular imports

Fix urwid#732
@penguinolog penguinolog added Feature Feature request/implementation bug labels Jan 10, 2024
@penguinolog
penguinolog requested review from ulidtko and wardi January 10, 2024 17:20
@github-actions github-actions Bot added the Tests Tests label Jan 10, 2024
Comment thread tests/test_padding.py
self.assertEqual(cols, canvas.cols())
self.assertEqual(rows, canvas.rows())
self.assertEqual(
[

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

real-world interface prototyping without manual elements calculation

@coveralls

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 7478516931

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

Totals Coverage Status
Change from base Build 7478132897: 0.02%
Covered Lines: 8223
Relevant Lines: 11885

💛 - Coveralls

@penguinolog
penguinolog merged commit 6cfbada into urwid:master Jan 10, 2024
@penguinolog
penguinolog deleted the padding_support_fixed branch January 10, 2024 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Feature Feature request/implementation Tests Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Padding documented as suport FIXED operation while supported only FLOW and BOX

3 participants