Files
baserow/web-frontend/modules/database/components/sidebar/table
alamin-br f2cadda1f8 feat(database): add table import to the table context menu (#5284) (#5655)
* feat(database): add import context item component for sidebar tables

* feat(database): show import into table item in sidebar context menu

* chore: changelog for sidebar table import (#5284)

* fix(database): populate fetched fields for sidebar table import

The import modal reads field._.type; raw FieldService.fetchAll objects lack
that store metadata, so the field-mapping dropdown threw and the importer hung
on "Parsing data". Populate the fetched fields via populateField before
passing them to ImportFileModal. Adds a full CSV-import e2e test.

* test(database): cover import item permission gating in SidebarItem

* fix(database): disable sidebar import item during table delete

Wire :disabled="deleteLoading" into SidebarImportTableContextItem so the
prop (and its re-entry guard) is no longer inert, matching the Duplicate
item and preventing the import modal from opening on a table mid-delete.

* fix(database): hide context menu on import field-fetch error; scope e2e selectors

Address Copilot review: emit click in a finally block so the sidebar context
menu closes even when fetching fields fails (matching the duplicate item), and
add an error-path unit test. Scope the e2e test's table/three-dots locators to
the sidebar row to avoid ambiguity with the table name elsewhere on the page.

* test(database): make import error-path test reject with a realistic API error

Reject fetchAll with an error carrying a .handler (like a real API error) so
notifyIf reports it instead of re-throwing, removing the unhandled rejection
that made the vitest run exit non-zero. Also assert the error is surfaced.
2026-07-06 18:01:21 +02:00
..