From d15aa132ab9598cbcb6fe8c1369ce2c781738053 Mon Sep 17 00:00:00 2001 From: Dave Pearson Date: Fri, 31 Jan 2025 22:47:29 +0000 Subject: [PATCH] :hammer: Swap the default for SHOW_IN_FOOTER I don't show in the footer way more than I do, so make that the default. --- src/peplum/app/commands/base.py | 2 +- src/peplum/app/commands/filtering.py | 6 ------ src/peplum/app/commands/finding.py | 1 - src/peplum/app/commands/main.py | 8 ++++++-- src/peplum/app/commands/navigation_sorting.py | 4 ---- src/peplum/app/commands/peps_sorting.py | 3 --- 6 files changed, 7 insertions(+), 17 deletions(-) diff --git a/src/peplum/app/commands/base.py b/src/peplum/app/commands/base.py index 3471620..b72ac81 100644 --- a/src/peplum/app/commands/base.py +++ b/src/peplum/app/commands/base.py @@ -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 diff --git a/src/peplum/app/commands/filtering.py b/src/peplum/app/commands/filtering.py index 1e94280..75151b7 100644 --- a/src/peplum/app/commands/filtering.py +++ b/src/peplum/app/commands/filtering.py @@ -10,7 +10,6 @@ class ShowAll(Command): """Clear any filters and show all PEPs""" BINDING_KEY = "a" - SHOW_IN_FOOTER = False ############################################################################## @@ -18,7 +17,6 @@ class Search(Command): """Search for text anywhere in the PEPs""" BINDING_KEY = "/" - SHOW_IN_FOOTER = False ############################################################################## @@ -26,7 +24,6 @@ class SearchAuthor(Command): """Search for an author then filter by them""" BINDING_KEY = "u" - SHOW_IN_FOOTER = False ############################################################################## @@ -34,7 +31,6 @@ class SearchPythonVersion(Command): """Search for a Python version and then filter by it""" BINDING_KEY = "v" - SHOW_IN_FOOTER = False ############################################################################## @@ -42,7 +38,6 @@ class SearchStatus(Command): """Search for a PEP status and then filter by it""" BINDING_KEY = "s" - SHOW_IN_FOOTER = False ############################################################################## @@ -50,7 +45,6 @@ class SearchType(Command): """Search for a PEP type and then filter by it""" BINDING_KEY = "t" - SHOW_IN_FOOTER = False ### filtering.py ends here diff --git a/src/peplum/app/commands/finding.py b/src/peplum/app/commands/finding.py index e9771f8..16deaa3 100644 --- a/src/peplum/app/commands/finding.py +++ b/src/peplum/app/commands/finding.py @@ -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 diff --git a/src/peplum/app/commands/main.py b/src/peplum/app/commands/main.py index cdf007f..cd5298c 100644 --- a/src/peplum/app/commands/main.py +++ b/src/peplum/app/commands/main.py @@ -10,7 +10,6 @@ class ChangeTheme(Command): """Change the application's theme""" BINDING_KEY = "f9" - SHOW_IN_FOOTER = False ############################################################################## @@ -19,6 +18,7 @@ class EditNotes(Command): BINDING_KEY = "f2" FOOTER_TEXT = "Notes" + SHOW_IN_FOOTER = True ############################################################################## @@ -26,7 +26,6 @@ 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 ############################################################################## @@ -34,6 +33,7 @@ class Help(Command): """Show help for and information about the application""" BINDING_KEY = "f1, ?" + SHOW_IN_FOOTER = True ############################################################################## @@ -41,6 +41,7 @@ class Quit(Command): """Quit the application""" BINDING_KEY = "f10, ctrl+q" + SHOW_IN_FOOTER = True ############################################################################## @@ -51,6 +52,7 @@ class RedownloadPEPs(Command): COMMAND = "Redownload All PEPs" BINDING_KEY = "ctrl+r" ACTION = "redownload_peps_command" + SHOW_IN_FOOTER = True ############################################################################## @@ -59,6 +61,7 @@ class TogglePEPDetails(Command): FOOTER_TEXT = "Details" BINDING_KEY = "f3" + SHOW_IN_FOOTER = True ############################################################################## @@ -67,6 +70,7 @@ class ViewPEP(Command): FOOTER_TEXT = "View" BINDING_KEY = "f4" + SHOW_IN_FOOTER = True ### main.py ends here diff --git a/src/peplum/app/commands/navigation_sorting.py b/src/peplum/app/commands/navigation_sorting.py index c2fb652..a8369a9 100644 --- a/src/peplum/app/commands/navigation_sorting.py +++ b/src/peplum/app/commands/navigation_sorting.py @@ -10,7 +10,6 @@ class ToggleTypesSortOrder(Command): """Toggle the sort order of types in the navigation panel""" BINDING_KEY = "T" - SHOW_IN_FOOTER = False ############################################################################## @@ -18,7 +17,6 @@ class ToggleStatusesSortOrder(Command): """Toggle the sort order of the statuses in the navigation panel""" BINDING_KEY = "S" - SHOW_IN_FOOTER = False ############################################################################## @@ -26,7 +24,6 @@ class TogglePythonVersionsSortOrder(Command): """Toggle the sort order of Python versions in the navigation panel""" BINDING_KEY = "V" - SHOW_IN_FOOTER = False ############################################################################## @@ -34,7 +31,6 @@ 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 diff --git a/src/peplum/app/commands/peps_sorting.py b/src/peplum/app/commands/peps_sorting.py index 5ec8405..7e84bec 100644 --- a/src/peplum/app/commands/peps_sorting.py +++ b/src/peplum/app/commands/peps_sorting.py @@ -10,7 +10,6 @@ class SortByNumber(Command): """Sort PEPs by their number""" BINDING_KEY = "1" - SHOW_IN_FOOTER = False ############################################################################## @@ -18,7 +17,6 @@ class SortByCreated(Command): """Sort PEPs by their created date""" BINDING_KEY = "2" - SHOW_IN_FOOTER = False ############################################################################## @@ -26,7 +24,6 @@ class SortByTitle(Command): """Sort PEPs by their title""" BINDING_KEY = "3" - SHOW_IN_FOOTER = False ### peps_sorting.py ends here