Skip to content

Commit

Permalink
🔀 Merge pull request #27 from davep/swap-show-in-footer-default
Browse files Browse the repository at this point in the history
Swap the default for `SHOW_IN_FOOTER`
  • Loading branch information
davep authored Jan 31, 2025
2 parents e50b531 + d15aa13 commit 64df011
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/peplum/app/commands/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Command(Message):
If no `FOOTER_TEXT` is provided the `command` will be used.
"""

SHOW_IN_FOOTER: bool = True
SHOW_IN_FOOTER: bool = False
"""Should the command be shown in the footer?"""

BINDING_KEY: str | tuple[str, str] | None = None
Expand Down
6 changes: 0 additions & 6 deletions src/peplum/app/commands/filtering.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,47 +10,41 @@ class ShowAll(Command):
"""Clear any filters and show all PEPs"""

BINDING_KEY = "a"
SHOW_IN_FOOTER = False


##############################################################################
class Search(Command):
"""Search for text anywhere in the PEPs"""

BINDING_KEY = "/"
SHOW_IN_FOOTER = False


##############################################################################
class SearchAuthor(Command):
"""Search for an author then filter by them"""

BINDING_KEY = "u"
SHOW_IN_FOOTER = False


##############################################################################
class SearchPythonVersion(Command):
"""Search for a Python version and then filter by it"""

BINDING_KEY = "v"
SHOW_IN_FOOTER = False


##############################################################################
class SearchStatus(Command):
"""Search for a PEP status and then filter by it"""

BINDING_KEY = "s"
SHOW_IN_FOOTER = False


##############################################################################
class SearchType(Command):
"""Search for a PEP type and then filter by it"""

BINDING_KEY = "t"
SHOW_IN_FOOTER = False


### filtering.py ends here
1 change: 0 additions & 1 deletion src/peplum/app/commands/finding.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ class FindPEP(Command):
"""Find and jump to a specific PEP"""

BINDING_KEY = "p"
SHOW_IN_FOOTER = False


### finding.py ends here
8 changes: 6 additions & 2 deletions src/peplum/app/commands/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ class ChangeTheme(Command):
"""Change the application's theme"""

BINDING_KEY = "f9"
SHOW_IN_FOOTER = False


##############################################################################
Expand All @@ -19,28 +18,30 @@ class EditNotes(Command):

BINDING_KEY = "f2"
FOOTER_TEXT = "Notes"
SHOW_IN_FOOTER = True


##############################################################################
class Escape(Command):
"Back up through the panes, right to left, or exit the app if the navigation pane has focus"

BINDING_KEY = "escape"
SHOW_IN_FOOTER = False


##############################################################################
class Help(Command):
"""Show help for and information about the application"""

BINDING_KEY = "f1, ?"
SHOW_IN_FOOTER = True


##############################################################################
class Quit(Command):
"""Quit the application"""

BINDING_KEY = "f10, ctrl+q"
SHOW_IN_FOOTER = True


##############################################################################
Expand All @@ -51,6 +52,7 @@ class RedownloadPEPs(Command):
COMMAND = "Redownload All PEPs"
BINDING_KEY = "ctrl+r"
ACTION = "redownload_peps_command"
SHOW_IN_FOOTER = True


##############################################################################
Expand All @@ -59,6 +61,7 @@ class TogglePEPDetails(Command):

FOOTER_TEXT = "Details"
BINDING_KEY = "f3"
SHOW_IN_FOOTER = True


##############################################################################
Expand All @@ -67,6 +70,7 @@ class ViewPEP(Command):

FOOTER_TEXT = "View"
BINDING_KEY = "f4"
SHOW_IN_FOOTER = True


### main.py ends here
4 changes: 0 additions & 4 deletions src/peplum/app/commands/navigation_sorting.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,27 @@ class ToggleTypesSortOrder(Command):
"""Toggle the sort order of types in the navigation panel"""

BINDING_KEY = "T"
SHOW_IN_FOOTER = False


##############################################################################
class ToggleStatusesSortOrder(Command):
"""Toggle the sort order of the statuses in the navigation panel"""

BINDING_KEY = "S"
SHOW_IN_FOOTER = False


##############################################################################
class TogglePythonVersionsSortOrder(Command):
"""Toggle the sort order of Python versions in the navigation panel"""

BINDING_KEY = "V"
SHOW_IN_FOOTER = False


##############################################################################
class ToggleAuthorsSortOrder(Command):
"""Toggle the sort order of the authors in the navigation panel"""

BINDING_KEY = "A"
SHOW_IN_FOOTER = False


### navigation_sorting.py ends here
3 changes: 0 additions & 3 deletions src/peplum/app/commands/peps_sorting.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,20 @@ class SortByNumber(Command):
"""Sort PEPs by their number"""

BINDING_KEY = "1"
SHOW_IN_FOOTER = False


##############################################################################
class SortByCreated(Command):
"""Sort PEPs by their created date"""

BINDING_KEY = "2"
SHOW_IN_FOOTER = False


##############################################################################
class SortByTitle(Command):
"""Sort PEPs by their title"""

BINDING_KEY = "3"
SHOW_IN_FOOTER = False


### peps_sorting.py ends here

0 comments on commit 64df011

Please sign in to comment.