mirror of
https://github.com/simonw/datasette.git
synced 2026-10-07 18:06:59 +02:00
Column actions panel on mobile (#2669)
On mobile widths the column actions were no longer available. This adds a new modal to help with that. https://gisthost.github.io/?ec60eb27e22cf5d96642eec1715586b6
This commit is contained in:
parent
63d73a806f
commit
fd016f7986
5 changed files with 886 additions and 169 deletions
|
|
@ -750,6 +750,21 @@ async def test_column_chooser_present(ds_client):
|
|||
assert "primaryKeys" in script_text
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_mobile_column_actions_present(ds_client):
|
||||
response = await ds_client.get("/fixtures/facetable")
|
||||
assert response.status_code == 200
|
||||
soup = Soup(response.text, "html.parser")
|
||||
button = soup.select_one("button.column-actions-mobile.small-screen-only")
|
||||
assert button is not None
|
||||
assert button.text.strip() == "Column actions"
|
||||
assert button.find("svg") is not None
|
||||
assert any(
|
||||
"mobile-column-actions.js" in (script.get("src") or "")
|
||||
for script in soup.find_all("script")
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_column_chooser_data_reflects_col_filtering(ds_client):
|
||||
response = await ds_client.get("/fixtures/facetable?_col=state&_col=created")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue