diff --git a/templates/audit/list.html b/templates/audit/list.html index 8924a6f..c1838b1 100644 --- a/templates/audit/list.html +++ b/templates/audit/list.html @@ -107,7 +107,7 @@ - {{ ui::table_container_open(id="audit-table", has_top_scroll=true, max_height="68vh") }} + {{ ui::table_container_open(id="audit-table", max_height="68vh") }} @@ -214,7 +214,7 @@ {% endif %}
- {{ ui::table_container_close(id="audit-table", has_top_scroll=true) }} + {{ ui::table_container_close(id="audit-table") }}
diff --git a/templates/auth/users.html b/templates/auth/users.html index b2a35cc..bdb7cd2 100644 --- a/templates/auth/users.html +++ b/templates/auth/users.html @@ -26,7 +26,7 @@
- {{ ui::table_container_open(id="users-table", has_top_scroll=false, max_height="auto") }} + {{ ui::table_container_open(id="users-table", max_height="auto") }} @@ -96,7 +96,7 @@ {% endif %}
- {{ ui::table_container_close(id="users-table", has_top_scroll=false) }} + {{ ui::table_container_close(id="users-table") }}
← Back to Account Settings diff --git a/templates/components/macros.html b/templates/components/macros.html index 3a9d480..c8bb8e3 100644 --- a/templates/components/macros.html +++ b/templates/components/macros.html @@ -389,53 +389,13 @@
{% endmacro %} -{% macro table_container_open(id, has_top_scroll=true, max_height="68vh") %} -{% if has_top_scroll %} - -
-
-
-{% endif %} - +{% macro table_container_open(id, max_height="68vh") %}
{% endmacro %} -{% macro table_container_close(id, has_top_scroll=true) %} +{% macro table_container_close(id) %}
-
- -{% if has_top_scroll %} - -{% endif %} -{% endmacro %} +{% endmacro %} diff --git a/templates/docs/tables.html b/templates/docs/tables.html index 7fcf7ee..a316b62 100644 --- a/templates/docs/tables.html +++ b/templates/docs/tables.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% import "components/macros.html" as ui %} -{% block title %}Tables & Scroll Sync - Design System Wiki{% endblock %} +{% block title %}Tables - Design System Wiki{% endblock %} {% block content %}
@@ -15,9 +15,9 @@
Layout & Navigation -

Tables & Scroll Sync

+

Tables

- A standardized container macro for horizontal scroll synchronization and scrollbar-fitting layout. It resolves the common usability issue of unreachable scrollbars on wide tables. + A standardized container macro for table styling and scrollbar-fitting layout. It resolves common styling issues like corner clipping and header bleed-through.

@@ -25,7 +25,7 @@

Container Showcase

- The macro standardizes the background styling, shadows, rounded borders, vertical height bounds, sticky headers, and outputs a synced scrollbar clone that rests at the top of the table. + The macro standardizes the background styling, shadows, rounded borders, vertical height bounds, and sticky headers.

@@ -37,7 +37,7 @@
- {{ ui::table_container_open(id="docs-demo-table", has_top_scroll=true, max_height="250px") }} + {{ ui::table_container_open(id="docs-demo-table", max_height="250px") }} @@ -84,7 +84,7 @@
- {{ ui::table_container_close(id="docs-demo-table", has_top_scroll=true) }} + {{ ui::table_container_close(id="docs-demo-table") }}
@@ -96,7 +96,7 @@
{{ "{%" }} import "components/macros.html" as ui {{ "%}" }}
 
-{{ ui::table_container_open(id="my-custom-table", has_top_scroll=true, max_height="68vh") }}
+{{ ui::table_container_open(id="my-custom-table", max_height="68vh") }}
     <table class="min-w-full divide-y divide-slate-800 text-left text-sm text-slate-300 relative">
         <thead class="shadow-[0_1px_0_0_rgba(255,255,255,0.05)]">
             <tr class="text-xs font-bold text-slate-400 uppercase tracking-wider">
@@ -113,7 +113,7 @@
             </tr>
         </tbody>
     </table>
-{{ ui::table_container_close(id="my-custom-table", has_top_scroll=true) }}
+{{ ui::table_container_close(id="my-custom-table") }}
@@ -125,9 +125,9 @@
-

Top Scroll Sync Logic

+

Stylized Container Wrapper

- Since HTML natively positions horizontal scrollbars only at the bottom of overflow elements, the component generates a custom dummy scroll container at the top of the table. A Javascript listener observes layout resizing and syncs the horizontal offsets of both the top scroll track and the main table scroll track dynamically. + Tables are automatically styled with rounded-3xl corners and background styling. The table container is scrollable, displaying a native horizontal or vertical scrollbar as needed.