Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Epic] Replace Data Selector component #27160

Closed
12 of 27 tasks
kulyk opened this issue Dec 12, 2022 · 2 comments
Closed
12 of 27 tasks

[Epic] Replace Data Selector component #27160

kulyk opened this issue Dec 12, 2022 · 2 comments
Assignees
Labels
.Epic Feature Implementation or Project .Frontend Type:Tech Debt or Refactoring

Comments

@kulyk
Copy link
Member

kulyk commented Dec 12, 2022

Our DataSelector component became pretty fragile and hard to work with time as new functionality was added. Here are a few things it's doing:

  • letting users pick databases, schemas, tables, and fields (for both real and virtual data sources; virtual = saved questions represented as tables)
  • doing all the necessary data loading + various states handling (loading, error, empty, lacking permissions, etc.)
  • search (FE-only or via /api/search endpoint)
  • virtualizing long lists of data
  • scoping the picker to a particular database/schema/table

DataSelector became pretty hard to modify and extend. On top of that, it's pretty far from our code quality bar on the FE which is troubling as the component is pretty important and often used.

Proposal

During the Metabase 45 cycle, we've implemented a brand new picker for data app scaffolding. It doesn't support all the DataSelector use cases yet, but it's pretty close. It might be worth adding the missing features and replacing the legacy component with a new one.

The new component is called DataPicker and is stored under metabase/containers on the data-apps-main branch (source code).

Implementation Plan

Done before (for data apps)

Blockers

No blockers on the product/design side

Nice to haves to achieve full feature parity

  • Allow picking databases / schemas (not only tables / models / questions) (needs design)
  • Allow picking table fields (needs design)
  • Allow configuring steps (e.g. don't let a user change a selected database, schema, table, etc.)
  • Add FE search (should show up when there're many databases / schemas / tables/ fields) (needs design)
  • Add popover variant (needs design)

Replacing Data Selector

Admin

Query Builder

Wrapping up

  • Remove DataSelector

Related Issues

@kulyk kulyk added Type:Tech Debt or Refactoring .Frontend .Epic Feature Implementation or Project labels Dec 12, 2022
@flamber
Copy link
Contributor

flamber commented Dec 12, 2022

Related #4874

@ranquild
Copy link
Contributor

Closing in favor of the new "Entity Picker" project

@ranquild ranquild closed this as not planned Won't fix, can't repro, duplicate, stale Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.Epic Feature Implementation or Project .Frontend Type:Tech Debt or Refactoring
Projects
None yet
Development

No branches or pull requests

5 participants