Skip to content

Commit

Permalink
Fixing tests, fixing jump mode on latest Textual version
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenburns committed Nov 19, 2024
1 parent 6617460 commit e5e9e6b
Show file tree
Hide file tree
Showing 45 changed files with 3,716 additions and 3,755 deletions.
Binary file modified .coverage
Binary file not shown.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ dependencies = [
"pyyaml>=6.0.2,<7.0.0",
"pydantic-settings>=2.4.0,<3.0.0",
"python-dotenv>=1.0.1,<2.0.0",
"textual[syntax]==0.86.3",
"textual[syntax]==0.86.2",
# pinned intentionally
"textual-autocomplete==3.0.0a12",
"textual-autocomplete==3.0.0a13",
# pinned intentionally
"watchfiles>=0.24.0",
]
Expand Down
1 change: 0 additions & 1 deletion src/posting/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,6 @@ def on_mount(self) -> None:
self.watch_collection_files()

if self.settings.watch_themes:
print("Watching themes")
self.watch_themes()

def get_default_screen(self) -> MainScreen:
Expand Down
6 changes: 2 additions & 4 deletions src/posting/jump_overlay.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
from textual.app import ComposeResult
from textual.binding import Binding
from textual.containers import Center
from textual.geometry import Offset
from textual.screen import ModalScreen
from textual.widget import Widget
from textual.widgets import Label

from posting.jumper import JumpInfo

if TYPE_CHECKING:
from posting.jumper import Jumper

Expand Down Expand Up @@ -77,7 +74,8 @@ def compose(self) -> ComposeResult:
for offset, jump_info in self.overlays.items():
key, _widget = jump_info
label = Label(key, classes="textual-jump-label")
label.styles.offset = offset
x, y = offset
label.styles.margin = y, x
yield label
with Center(id="textual-jump-info"):
yield Label("Press a key to jump")
Expand Down
3 changes: 2 additions & 1 deletion src/posting/posting.scss
Original file line number Diff line number Diff line change
Expand Up @@ -502,13 +502,14 @@ Select {
}

.textual-jump-label {
layer: textual-jump;
dock: top;
color: $text-accent;
background: $accent-muted;
text-style: bold;
padding: 0 1;
margin-right: 1;
height: 1;
width: auto;
}

#textual-jump-info {
Expand Down
3 changes: 2 additions & 1 deletion src/posting/themes.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ def load_user_theme(path: Path) -> TextualTheme | None:
raise ValueError(f"Invalid theme file {path}. A `name` is required.")


galaxy_primary = Color.parse("#8A2BE2")
galaxy_primary = Color.parse("#C45AFF")
galaxy_secondary = Color.parse("#a684e8")
galaxy_warning = Color.parse("#FFD700")
galaxy_error = Color.parse("#FF4500")
Expand All @@ -363,6 +363,7 @@ def load_user_theme(path: Path) -> TextualTheme | None:
panel=galaxy_panel.hex,
dark=True,
variables={
"input-cursor-background": "#C45AFF",
"footer-background": "transparent",
},
),
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
222 changes: 111 additions & 111 deletions tests/__snapshots__/test_snapshots/TestConfig.test_config.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit e5e9e6b

Please sign in to comment.