I can add tables

Refactoring DbEngine

Fixing unit tests

Fixing unit tests

Fixing unit tests

Refactored DbManager for datagrid

Improving front end performance

I can add new table

Fixed sidebar closing when clicking on it

Fix drag event rebinding, improve listener options, and add debug

Prevent duplicate drag event bindings with a dataset flag and ensure consistent scrollbar functionality. Change wheel event listener to passive mode for better performance. Refactor function naming for consistency, and add debug logs for event handling.

Refactor Datagrid bindings and default state handling.

Updated Javascript to conditionally rebind Datagrid on specific events. Improved Python components by handling empty DataFrame cases and removing redundant code. Revised default state initialization in settings for better handling of mutable fields.

Added Rowindex visualisation support

Working on Debugger with own implementation of JsonViewer

Working on JsonViewer.py

Fixed unit tests

Adding unit tests

I can fold and unfold

fixed unit tests

Adding css for debugger

Added tooltip management

Adding debugger functionalities

Refactor serializers and improve error handling in DB engine

Fixed error where tables were overwritten

I can display footer menu

Working on footer. Refactoring how heights are managed

Refactored scrollbars management

Working on footer menu

I can display footer menu + fixed unit tests

Fixed unit tests

Updated click management

I can display aggregations in footers

Added docker management

Refactor input handling and improve config defaults

Fixed scrollbars colors

Refactored tooltip management

Improved tooltip management

Improving FilterAll
This commit is contained in:
2025-05-11 18:27:32 +02:00
parent e1c10183eb
commit 66ea45f501
70 changed files with 2884 additions and 1258 deletions

View File

@@ -4,7 +4,7 @@ from fasthtml.components import *
from components.tabs.components.MyTabs import Tab, MyTabs
from components.tabs.constants import ROUTE_ROOT, Routes
from tests.helpers import matches, find_first_match
from tests.helpers import matches, find_first_match, search_elements_by_name, div_ellipsis
@pytest.fixture
@@ -105,6 +105,7 @@ def test_add_tab_with_icon_attribute(tabs_instance):
assert tabs_instance.tabs[0].id == tab_id
assert tabs_instance.tabs[0].icon == icon
def test_remove_tab(tabs_instance):
"""Test the remove_tab method."""
# Add some tabs
@@ -171,41 +172,48 @@ def test_do_no_change_the_active_tab_if_another_tab_is_removed(tabs_instance):
def test_render_empty_when_empty(tabs_instance):
expected = Div(id=tabs_instance._id)
actual = tabs_instance.__ft__()
assert matches(tabs_instance.__ft__(), expected)
expected = Div(id=tabs_instance._id)
assert matches(actual, expected)
def test_render_empty_when_multiple_tabs(tabs_instance):
def test_render_when_multiple_tabs(tabs_instance):
tabs_instance.tabs = [
Tab("1", "Tab1", "Content 1"),
Tab("2", "Tab2", "Content 2", active=True),
Tab("3", "Tab3", "Content 3"),
]
actual = tabs_instance.__ft__()
to_compare = search_elements_by_name(actual, "div", {"id": tabs_instance._id})
expected = Div(
Span(cls="tabs-tab "),
Span(cls="tabs-tab tabs-active"),
Span(cls="tabs-tab "),
Div("Content 2", cls="tabs-content"),
Div(
Span(cls="mmt-tabs-tab "),
Span(cls="mmt-tabs-tab mmt-tabs-active"),
Span(cls="mmt-tabs-tab "),
cls="mmt-tabs-header"
),
Div("Content 2", cls="mmt-tabs-content"),
id=tabs_instance._id,
cls="tabs",
cls="mmt-tabs",
)
actual = tabs_instance.__ft__()
assert matches(actual, expected)
assert matches(to_compare[0], expected)
def test_render_a_tab_has_label_and_a_cross_with_correct_hx_posts(tabs_instance):
def test_render_a_tab_header_with_its_name_and_the_cross_to_close(tabs_instance):
tabs_instance.tabs = [
Tab("1", "Tab1", "Content 1"),
]
actual = tabs_instance.__ft__()
expected = Span(
Label("Tab1", hx_post=f"{ROUTE_ROOT}{Routes.SelectTab}"),
Label(div_ellipsis("Tab1"), hx_post=f"{ROUTE_ROOT}{Routes.SelectTab}"),
Div(NotStr('<svg name="close"'), hx_post=f"{ROUTE_ROOT}{Routes.RemoveTab}"),
cls="tabs-tab "
cls="mmt-tabs-tab "
)
actual = find_first_match(tabs_instance.__ft__(), "div.span")
assert matches(actual, expected)
to_compare = find_first_match(actual, "div.div.span")
assert matches(to_compare, expected)