Skip to content

Commit ef14a36

Browse files
committed
merge
2 parents 44cddca + 9d42eb2 commit ef14a36

File tree

8 files changed

+272
-77
lines changed

8 files changed

+272
-77
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
strategy:
2121
matrix:
2222
os: [ubuntu-latest, windows-latest, macos-latest]
23-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
23+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
2424
defaults:
2525
run:
2626
shell: bash
@@ -35,18 +35,18 @@ jobs:
3535
cache: "poetry"
3636
- name: Install dependencies
3737
run: poetry install --no-interaction --extras syntax
38-
if: ${{ matrix.python-version != '3.12' }}
39-
- name: Install dependencies for 3.12 # https://github.com/Textualize/textual/issues/3491#issuecomment-1854156476
38+
if: ${{ matrix.python-version != '3.13' }}
39+
- name: Install dependencies for 3.13
4040
run: poetry install --no-interaction
41-
if: ${{ matrix.python-version == '3.12' }}
41+
if: ${{ matrix.python-version == '3.13' }}
4242
- name: Test with pytest
4343
run: |
4444
poetry run pytest tests -v --cov=./src/textual --cov-report=xml:./coverage.xml --cov-report term-missing
45-
if: ${{ matrix.python-version != '3.12' }}
46-
- name: Test with pytest for 3.12 # https://github.com/Textualize/textual/issues/3491#issuecomment-1854156476
45+
if: ${{ matrix.python-version != '3.13' }}
46+
- name: Test with pytest for 3.13
4747
run: |
4848
poetry run pytest tests -v --cov=./src/textual --cov-report=xml:./coverage.xml --cov-report term-missing -m 'not syntax'
49-
if: ${{ matrix.python-version == '3.12' }}
49+
if: ${{ matrix.python-version == '3.13' }}
5050
- name: Upload snapshot report
5151
if: always()
5252
uses: actions/upload-artifact@v3

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8+
## Unreleased
9+
10+
## Changed
11+
12+
- Fixed Select not scrolling highlight in to view when clicked https://github.com/Textualize/textual/issues/5255
13+
14+
## [0.88.1] - 2024-11-30
15+
16+
### Fixed
17+
18+
- Fixed excessive rendering of the OptionList https://github.com/Textualize/textual/pull/5311
19+
- Fixed rendering glitches in Select https://github.com/Textualize/textual/pull/5311
20+
821
## [0.88.0] - 2024-11-29
922

1023
### Fixed
@@ -2600,6 +2613,7 @@ https://textual.textualize.io/blog/2022/11/08/version-040/#version-040
26002613
- New handler system for messages that doesn't require inheritance
26012614
- Improved traceback handling
26022615

2616+
[0.88.1]: https://github.com/Textualize/textual/compare/v0.88.0...v0.88.1
26032617
[0.88.0]: https://github.com/Textualize/textual/compare/v0.87.1...v0.88.0
26042618
[0.87.1]: https://github.com/Textualize/textual/compare/v0.87.0...v0.87.1
26052619
[0.87.0]: https://github.com/Textualize/textual/compare/v0.86.4...v0.87.0

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "textual"
3-
version = "0.88.0"
3+
version = "0.88.1"
44
homepage = "https://github.com/Textualize/textual"
55
repository = "https://github.com/Textualize/textual"
66
documentation = "https://textual.textualize.io/"
@@ -9,8 +9,8 @@ description = "Modern Text User Interface framework"
99
authors = ["Will McGugan <[email protected]>"]
1010
license = "MIT"
1111
readme = "README.md"
12-
classifiers = [
13-
"Development Status :: 4 - Beta",
12+
classifiers = [
13+
"Development Status :: 5 - Production/Stable",
1414
"Environment :: Console",
1515
"Intended Audience :: Developers",
1616
"Operating System :: Microsoft :: Windows :: Windows 10",

src/textual/widgets/_option_list.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ class OptionList(ScrollView, can_focus=True):
195195
| `option-list--separator` | Target the separators. |
196196
"""
197197

198-
highlighted: reactive[int | None] = reactive["int | None"](None)
198+
highlighted: reactive[int | None] = reactive(None)
199199
"""The index of the currently-highlighted option, or `None` if no option is highlighted."""
200200

201201
class OptionMessage(Message):
@@ -880,6 +880,7 @@ def scroll_to_highlight(self, top: bool = False) -> None:
880880
top: Scroll highlight to top of the list.
881881
"""
882882
highlighted = self.highlighted
883+
883884
if highlighted is None or not self.is_mounted:
884885
return
885886

@@ -901,6 +902,10 @@ def scroll_to_highlight(self, top: bool = False) -> None:
901902
immediate=True,
902903
)
903904

905+
def on_show(self) -> None:
906+
if self.highlighted is not None:
907+
self.scroll_to_highlight()
908+
904909
def validate_highlighted(self, highlighted: int | None) -> int | None:
905910
"""Validate the `highlighted` property value on access."""
906911
if highlighted is None or not self._options:

src/textual/widgets/_select.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ def _setup_variables_for_options(
414414

415415
def _setup_options_renderables(self) -> None:
416416
"""Sets up the `Option` renderables associated with the `Select` options."""
417-
self._select_options: list[Option] = [
417+
options: list[Option] = [
418418
(
419419
Option(Text(self.prompt, style="dim"))
420420
if value == self.BLANK
@@ -425,7 +425,7 @@ def _setup_options_renderables(self) -> None:
425425

426426
option_list = self.query_one(SelectOverlay)
427427
option_list.clear_options()
428-
option_list.add_options(self._select_options)
428+
option_list.add_options(options)
429429

430430
def _init_selected_option(self, hint: SelectType | NoSelection = BLANK) -> None:
431431
"""Initialises the selected option for the `Select`."""

0 commit comments

Comments
 (0)