From 25dcd9482851ba452d15b08357eff3c3a5b53a83 Mon Sep 17 00:00:00 2001 From: cspotcode Date: Sun, 6 Aug 2023 18:05:25 -0400 Subject: [PATCH 1/5] initial commit for doc_stack/ux_polish From 3b12c5f15f4517feafa560dd347f345b9a645560 Mon Sep 17 00:00:00 2001 From: cspotcode Date: Thu, 10 Aug 2023 13:17:26 -0400 Subject: [PATCH 2/5] Collapse 3 "quick index" tables into one --- util/template_quick_index.rst | 8 -------- util/update_quick_index.py | 37 ----------------------------------- 2 files changed, 45 deletions(-) diff --git a/util/template_quick_index.rst b/util/template_quick_index.rst index 2f440e0f5..4dd0b93a4 100644 --- a/util/template_quick_index.rst +++ b/util/template_quick_index.rst @@ -6,14 +6,6 @@ "paging": false, "dom": '<"bottom"flp><"clear">' } ); - $('table#quickapigui').DataTable( { - "paging": false, - "dom": '<"bottom"flp><"clear">' - } ); - $('table#tilemap').DataTable( { - "paging": false, - "dom": '<"bottom"flp><"clear">' - } ); } ); diff --git a/util/update_quick_index.py b/util/update_quick_index.py index b0b914fd9..636e23e0f 100644 --- a/util/update_quick_index.py +++ b/util/update_quick_index.py @@ -302,26 +302,6 @@ def include_template(text_file): * - Name - Group""" -table_header_gui = """ -.. list-table:: - :widths: 50 50 - :header-rows: 1 - :name: quickapigui - :class: display - - * - Name - - Group""" - -table_header_tiled = """ -.. list-table:: - :widths: 50 50 - :header-rows: 1 - :name: quickapitiled - :class: display - - * - Name - - Group""" - def clear_api_directory(): """ @@ -350,27 +330,10 @@ def main(): process_directory(ROOT / "arcade/texture", text_file) process_directory(ROOT / "arcade/texture_atlas", text_file) process_directory(ROOT / "arcade/text", text_file) - - # text_file.write(f"The ``arcade.gl`` module\n") - # text_file.write(f"-------------------------\n\n") # process_directory(Path("../arcade/gl"), text_file) - - text_file.write("\n\n") - text_file.write("The arcade.gui module\n") - text_file.write("---------------------\n\n") - - text_file.write(table_header_gui) - process_directory(ROOT / "arcade/gui", text_file) process_directory(ROOT / "arcade/gui/widgets", text_file) process_directory(ROOT / "arcade/gui/property", text_file) - - text_file.write("\n\n") - text_file.write("The arcade.tilemap module\n") - text_file.write("-------------------------\n\n") - - text_file.write(table_header_tiled) - process_directory(ROOT / "arcade/tilemap", text_file) text_file.close() From fafcb080febb950dd1ae6116ac584a52405df905 Mon Sep 17 00:00:00 2001 From: cspotcode Date: Sat, 12 Aug 2023 12:00:30 -0400 Subject: [PATCH 3/5] Always show grey highlight behind signatures, makes the doc sections easier to visually navigate --- doc/_static/css/custom.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/_static/css/custom.css b/doc/_static/css/custom.css index 01bb9816c..38ea33d70 100644 --- a/doc/_static/css/custom.css +++ b/doc/_static/css/custom.css @@ -115,6 +115,11 @@ img.right-image { width:100%; height:100%; } +/* Make signatures look nice */ +.sig:not(.sig-inline) { + /* Highlight even when not hovering */ + background: var(--color-api-background-hover); +} /* Make Function API look nice */ .sig-param .n:first-of-type { margin-left: 10px; From 0252c6a2831a72721aed09588d7b437641826447 Mon Sep 17 00:00:00 2001 From: cspotcode Date: Sat, 12 Aug 2023 12:01:49 -0400 Subject: [PATCH 4/5] Hide `ClassName.` prefix from class methods and attributes in TOC sidebar --- doc/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/conf.py b/doc/conf.py index c3fdbc959..a2f981ef1 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -35,6 +35,7 @@ 'undoc-members': True, 'show-inheritance': True } +toc_object_entries_show_parents = 'hide' sys.path.insert(0, os.path.abspath('..')) sys.path.insert(0, os.path.abspath('../arcade')) From 42ef0909c851d9c130d943f8a453ae524f185dab Mon Sep 17 00:00:00 2001 From: cspotcode Date: Tue, 15 Aug 2023 17:21:28 -0400 Subject: [PATCH 5/5] Remove extra headings from api pages --- util/update_quick_index.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/util/update_quick_index.py b/util/update_quick_index.py index 636e23e0f..30ec75f88 100644 --- a/util/update_quick_index.py +++ b/util/update_quick_index.py @@ -244,10 +244,6 @@ def process_directory(directory: Path, quick_index_file): quick_index_file.write(f" * - :py:class:`{full_class_name}`\n") quick_index_file.write(f" - {title}\n") - api_file.write(f"{full_class_name}\n") - underline = "^" * len(full_class_name) - api_file.write(f"{underline}\n\n") - api_file.write(f".. autoclass:: {full_class_name}\n") api_file.write(" :members:\n") # api_file.write(f" :member-order: groupwise\n") @@ -272,10 +268,6 @@ def process_directory(directory: Path, quick_index_file): quick_index_file.write(f" * - :py:func:`{full_class_name}`\n") quick_index_file.write(f" - {title}\n") - api_file.write(f"{full_class_name}\n") - underline = "^" * len(full_class_name) - api_file.write(f"{underline}\n\n") - api_file.write(f".. autofunction:: {full_class_name}\n\n") # print(f" Function {item}")