From ccfcd00aa9bd17ef9ee5822bcff3cf578a0037bc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Feb 2025 11:14:22 +0000 Subject: [PATCH 1/4] Bump textual from 0.58.0 to 1.0.0 Bumps [textual](https://github.com/Textualize/textual) from 0.58.0 to 1.0.0. - [Release notes](https://github.com/Textualize/textual/releases) - [Changelog](https://github.com/Textualize/textual/blob/main/CHANGELOG.md) - [Commits](https://github.com/Textualize/textual/compare/v0.58.0...v1.0.0) --- updated-dependencies: - dependency-name: textual dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 6df070e..766b874 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ async-cache==1.1.1 pyytlounge==2.0.0 rich==13.9.4 ssdp==1.3.0 -textual==0.58.0 +textual==1.0.0 textual-slider==0.1.2 xmltodict==0.14.2 rich_click==1.8.5 From 38efe843de90a9d43bf909a6605be757cfc13b77 Mon Sep 17 00:00:00 2001 From: dmunozv04 <39565245+dmunozv04@users.noreply.github.com> Date: Wed, 12 Feb 2025 13:06:11 +0100 Subject: [PATCH 2/4] Update textual styles to work with textual 1.0 --- src/iSponsorBlockTV/setup-wizard-style.tcss | 24 ++++++++++++++++----- src/iSponsorBlockTV/setup_wizard.py | 12 +++++------ 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/src/iSponsorBlockTV/setup-wizard-style.tcss b/src/iSponsorBlockTV/setup-wizard-style.tcss index 4f6d25e..cde381d 100644 --- a/src/iSponsorBlockTV/setup-wizard-style.tcss +++ b/src/iSponsorBlockTV/setup-wizard-style.tcss @@ -21,9 +21,13 @@ scrollbar-gutter: stable; } -.small-button{ +.button-small { height: 3; - + border: none; + border-top: none; + border-bottom: none; + offset: 0 -1; + padding: 0; } .button-100 { @@ -106,13 +110,14 @@ EditDevice { } Element { - background: $panel; + background: $panel-darken-1; border-top: solid $panel-lighten-2; layout: horizontal; height: 2; width: 100%; margin: 0 1 0 1; padding: 0; + } Element > .element-name { offset: 0 -1; @@ -120,7 +125,11 @@ Element > .element-name { width: 100%; align: left middle; text-align: left; - + background: $panel-darken-1; + &:hover { + background: $panel-lighten-1; + border-top: tall $panel-lighten-3; + } } Element > .element-remove { dock: right; @@ -132,7 +141,7 @@ Element > .element-remove { margin: 0 1 0 0; } -#add-device { +#add-device, #add-channel { text-style: bold; width: 100%; align: left middle; @@ -140,6 +149,11 @@ Element > .element-remove { dock: left; text-align: left; + background: $panel-darken-1; + &:hover { + background: $panel-lighten-1; + border-top: tall $panel-lighten-3; + } } #add-device-button-container{ height: 1; diff --git a/src/iSponsorBlockTV/setup_wizard.py b/src/iSponsorBlockTV/setup_wizard.py index 5734ad9..762c5d7 100644 --- a/src/iSponsorBlockTV/setup_wizard.py +++ b/src/iSponsorBlockTV/setup_wizard.py @@ -84,12 +84,12 @@ class Element(Static): def compose(self) -> ComposeResult: yield Button( label=self.element_name, - classes="element-name", + classes="element-name button-small", disabled=True, id="element-name", ) yield Button( - "Remove", classes="element-remove", variant="error", id="element-remove" + "Remove", classes="element-remove button-small", variant="error", id="element-remove" ) def on_mount(self) -> None: @@ -102,7 +102,6 @@ class Device(Element): """A device element.""" def process_values_from_data(self): - print(self.element_data) if "name" in self.element_data and self.element_data["name"]: self.element_name = self.element_data["name"] else: @@ -285,7 +284,8 @@ class AddDevice(ModalWithClickExit): " computer\nIf it isn't showing up, try restarting the" " app.\nIf running in docker, make sure to use" " `--network=host`\nTo refresh the list, close and open the" - " dialog again" + " dialog again\n[b][u]If it still doesn't work, pair using a" + " pairing code (it's much more reliable)" ), classes="subtitle", ) @@ -618,7 +618,7 @@ class DevicesManager(Vertical): def compose(self) -> ComposeResult: yield Label("Devices", classes="title") with Horizontal(id="add-device-button-container"): - yield Button("Add Device", id="add-device", classes="button-100") + yield Button("Add Device", id="add-device", classes="button-100 button-small") for device in self.devices: yield Device(device, tooltip="Click to edit") @@ -812,7 +812,7 @@ class ChannelWhitelistManager(Vertical): id="warning-no-key", ) with Horizontal(id="add-channel-button-container"): - yield Button("Add Channel", id="add-channel", classes="button-100") + yield Button("Add Channel", id="add-channel", classes="button-100 button-small") for channel in self.config.channel_whitelist: yield Channel(channel) From 5884844da1ca28dda071228cc876c539b100fe62 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 12 Feb 2025 12:06:38 +0000 Subject: [PATCH 3/4] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/iSponsorBlockTV/setup_wizard.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/iSponsorBlockTV/setup_wizard.py b/src/iSponsorBlockTV/setup_wizard.py index 762c5d7..9437d49 100644 --- a/src/iSponsorBlockTV/setup_wizard.py +++ b/src/iSponsorBlockTV/setup_wizard.py @@ -89,7 +89,10 @@ class Element(Static): id="element-name", ) yield Button( - "Remove", classes="element-remove button-small", variant="error", id="element-remove" + "Remove", + classes="element-remove button-small", + variant="error", + id="element-remove", ) def on_mount(self) -> None: @@ -618,7 +621,9 @@ class DevicesManager(Vertical): def compose(self) -> ComposeResult: yield Label("Devices", classes="title") with Horizontal(id="add-device-button-container"): - yield Button("Add Device", id="add-device", classes="button-100 button-small") + yield Button( + "Add Device", id="add-device", classes="button-100 button-small" + ) for device in self.devices: yield Device(device, tooltip="Click to edit") @@ -812,7 +817,9 @@ class ChannelWhitelistManager(Vertical): id="warning-no-key", ) with Horizontal(id="add-channel-button-container"): - yield Button("Add Channel", id="add-channel", classes="button-100 button-small") + yield Button( + "Add Channel", id="add-channel", classes="button-100 button-small" + ) for channel in self.config.channel_whitelist: yield Channel(channel) From 73b277706e8a0c3cab700d06bc9949151ed56508 Mon Sep 17 00:00:00 2001 From: dmunozv04 <39565245+dmunozv04@users.noreply.github.com> Date: Wed, 12 Feb 2025 13:09:05 +0100 Subject: [PATCH 4/4] Make deepsource happy --- src/iSponsorBlockTV/setup_wizard.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/iSponsorBlockTV/setup_wizard.py b/src/iSponsorBlockTV/setup_wizard.py index 9437d49..de5cd21 100644 --- a/src/iSponsorBlockTV/setup_wizard.py +++ b/src/iSponsorBlockTV/setup_wizard.py @@ -287,8 +287,8 @@ class AddDevice(ModalWithClickExit): " computer\nIf it isn't showing up, try restarting the" " app.\nIf running in docker, make sure to use" " `--network=host`\nTo refresh the list, close and open the" - " dialog again\n[b][u]If it still doesn't work, pair using a" - " pairing code (it's much more reliable)" + " dialog again\n[b][u]If it still doesn't work, " + "pair using a pairing code (it's much more reliable)" ), classes="subtitle", )