Skip to content

Commit

Permalink
Merge feat/ci-cd -> development
Browse files Browse the repository at this point in the history
  • Loading branch information
EGAMAGZ committed Jul 17, 2024
2 parents b7e7b90 + 34abc3f commit 19b068a
Show file tree
Hide file tree
Showing 6 changed files with 111 additions and 121 deletions.
32 changes: 1 addition & 31 deletions ignori/widgets/generation_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,40 +19,10 @@
from ignori.widgets.language_badge import LanguageBadge


class PathGenerationButton(Button):
DEFAULT_CSS = """\
PathGenerationButton {
padding: 0 1;
height: 1;
min-width: 5;
background: $primary;
color: $text;
border: none;
text-style: none;
&:hover {
text-style: b;
padding: 0 1;
border: none;
background: $primary-darken-1;
}
}
"""
class PathGenerationButton(Button): ...


class GenerationForm(Widget):
DEFAULT_CSS = """\
GenerationForm {
padding: 1;
& Horizontal {
height: 1;
& .label {
padding: 0 1;
background: $primary-darken-3;
}
}
}
"""

class Generated(Message):
"""Event sent when `.gitignore` file is generated"""
Expand Down
39 changes: 0 additions & 39 deletions ignori/widgets/language_badge.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,45 +16,6 @@ class LanguageBadge(
can_focus_children=False,
inherit_bindings=False,
):
DEFAULT_CSS = """\
LanguageBadge {
height: 1;
width: auto;
background: $secondary-darken-3;
&.no-language{
background: $secondary-background;
& #icon {
display: none;
}
}
& #icon {
padding: 0 1;
background: $secondary;
color: $text;
}
& #language-name {
color: $text;
min-width: 10;
padding: 0 1;
}
}
LanguageBadge:focus {
&.no-language {
background: $secondary-darken-3;
}
& #icon {
background: white;
color: $text;
text-style: bold;
}
}
"""

BINDINGS = [
Binding("enter,space", "press", "Unselect languague", show=False),
]
Expand Down
47 changes: 1 addition & 46 deletions ignori/widgets/search_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,55 +27,10 @@ def get_option_by_id(
return selected_file


class SearchButton(Button):
DEFAULT_CSS = """\
SearchButton {
height: 1;
min-width: 5;
background: $secondary;
color: $text;
border: none;
text-style: none;
&:hover {
text-style: b;
padding: 0 1;
border: none;
background: $secondary-darken-1;
}
}
"""
class SearchButton(Button): ...


class SearchForm(Container):
DEFAULT_CSS = """\
SearchForm {
width: 100%;
& #search-container{
height: 1;
& #search-input {
width: 1fr;
}
& #search-button {
width: auto;
}
}
& #ignore-container{
& OptionList {
width: 1fr;
height:100%;
}
& #ignore-code{
width: 1fr !important;
}
}
}
"""

@dataclass
class Selected(Message):
"""Event sent when language is selected"""
Expand Down
8 changes: 4 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ readme = "README.md"

[tool.poetry.dependencies]
python = "^3.12"
textual = "^0.72.0"
textual = "^0.63.5"
rich = "^13.7.1"
pipe = "^2.2"
tox = "^4.16.0"
Expand Down
104 changes: 104 additions & 0 deletions styles/app.tcss
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,107 @@ FilePreview {
FilePreview:focus {
border: round $accent;
}

PathGenerationButton {
padding: 0 1;
height: 1;
min-width: 5;
background: $primary;
color: $text;
border: none;
text-style: none;

&:hover {
text-style: b;
padding: 0 1;
border: none;
background: $primary-darken-1;
}
}

GenerationForm {
padding: 1;
& Horizontal {
height: 1;
& .label {
padding: 0 1;
background: $primary-darken-3;
}
}
}
LanguageBadge {
height: 1;
width: auto;
background: $secondary-darken-3;

&.no-language{
background: $secondary-background;
& #icon {
display: none;
}
}

& #icon {
padding: 0 1;
background: $secondary;
color: $text;
}

& #language-name {
color: $text;
min-width: 10;
padding: 0 1;
}
}

LanguageBadge:focus {
&.no-language {
background: $secondary-darken-3;
}

& #icon {
background: white;
color: $text;
text-style: bold;
}
}
SearchButton {
height: 1;
min-width: 5;
background: $secondary;
color: $text;
border: none;
text-style: none;

&:hover {
text-style: b;
padding: 0 1;
border: none;
background: $secondary-darken-1;
}
}
SearchForm {
width: 100%;

& #search-container{
height: 1;

& #search-input {
width: 1fr;
}

& #search-button {
width: auto;
}
}

& #ignore-container{
& OptionList {
width: 1fr;
height:100%;
}
& #ignore-code{
width: 1fr !important;
}
}
}

0 comments on commit 19b068a

Please sign in to comment.