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

Cannot see Models as the data source in the data selector when opening a model #39699

Closed
Tracked by #39542
nemanjaglumac opened this issue Mar 6, 2024 · 1 comment · Fixed by #39792
Closed
Tracked by #39542
Assignees
Labels
.Frontend Priority:P2 Average run of the mill bug Querying/Models aka Datasets Querying/Notebook Items specific to the Custom/Notebook query builder .Team/QueryingComponents Type:Bug Product defects
Milestone

Comments

@nemanjaglumac
Copy link
Member

nemanjaglumac commented Mar 6, 2024

Describe the bug

When you open a saved model or a question/model based on a saved model in a notebook mode, you currently cannot see the underlying source model in the data picker. This renders the data picker nearly unusable for models.

To Reproduce

The simplest possible scenario:

  1. Open any saved model
  2. Switch to the notebook mode
  3. Click on the model name in the "data" step (in our case it is the "Accounts Model")
    image
  4. It opens "Saved Questions" and it doesn't find the model there, so nothing is highlighted
    image

Expected behavior

Clicking on an entity based on a model should show Models data selector with the resulting model being highlighted.
image

Logs

No response

Information about your Metabase installation

local dev, master, 4a78412, H2, Sample Database

Severity

P2

Additional context

This behavior existed since forever - basically from the moment we introduced models.

@nemanjaglumac nemanjaglumac added Type:Bug Product defects Priority:P2 Average run of the mill bug Querying/Notebook Items specific to the Custom/Notebook query builder Querying/Models aka Datasets labels Mar 6, 2024
@nemanjaglumac nemanjaglumac self-assigned this Mar 6, 2024
@nemanjaglumac nemanjaglumac linked a pull request Mar 6, 2024 that will close this issue
nemanjaglumac added a commit that referenced this issue Mar 6, 2024
nemanjaglumac added a commit that referenced this issue Mar 6, 2024
nemanjaglumac added a commit that referenced this issue Mar 7, 2024
* Show models correctly in the data source picker

* Address review comments

* Destructure props

* Add E2E reproduction for #39699

* Prevent accessing potentially stale value
@nemanjaglumac
Copy link
Member Author

Fixed in #39686, but the issue stays open until we merge the feature branch to master.

nemanjaglumac added a commit that referenced this issue Mar 7, 2024
* Show models correctly in the data source picker

* Address review comments

* Destructure props

* Add E2E reproduction for #39699

* Prevent accessing potentially stale value
nemanjaglumac added a commit that referenced this issue Mar 7, 2024
* [HDS] Prep/cleanup steps for Highlighting the data source (#39681)

* Rename `DATA_BUCKET` key to `MODELS`

* Rename misleading method

`isSavedQuestionSelected` is too narrow because we can also have
other saved entities, such as models (and soon metrics) as the selected source.

* Fix type for `selectedTableId`

* Extract `sourceId`

* Rename saved question instances to saved entity

* Rename related components

* Show models correctly in the data source picker (#39686)

* Show models correctly in the data source picker

* Address review comments

* Destructure props

* Add E2E reproduction for #39699

* Prevent accessing potentially stale value

Closes #39699
nemanjaglumac added a commit that referenced this issue Mar 7, 2024
* [HDS] Prep/cleanup steps for Highlighting the data source (#39681)

* Rename `DATA_BUCKET` key to `MODELS`

* Rename misleading method

`isSavedQuestionSelected` is too narrow because we can also have
other saved entities, such as models (and soon metrics) as the selected source.

* Fix type for `selectedTableId`

* Extract `sourceId`

* Rename saved question instances to saved entity

* Rename related components

* Show models correctly in the data source picker (#39686)

* Show models correctly in the data source picker

* Address review comments

* Destructure props

* Add E2E reproduction for #39699

* Prevent accessing potentially stale value

Closes #39699
nemanjaglumac added a commit that referenced this issue Mar 7, 2024
* [HDS] Prep/cleanup steps for Highlighting the data source (#39681)

* Rename `DATA_BUCKET` key to `MODELS`

* Rename misleading method

`isSavedQuestionSelected` is too narrow because we can also have
other saved entities, such as models (and soon metrics) as the selected source.

* Fix type for `selectedTableId`

* Extract `sourceId`

* Rename saved question instances to saved entity

* Rename related components

* Show models correctly in the data source picker (#39686)

* Show models correctly in the data source picker

* Address review comments

* Destructure props

* Add E2E reproduction for #39699

* Prevent accessing potentially stale value

Closes #39699

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
@nemanjaglumac nemanjaglumac added this to the 0.49 milestone Mar 7, 2024
This was referenced May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.Frontend Priority:P2 Average run of the mill bug Querying/Models aka Datasets Querying/Notebook Items specific to the Custom/Notebook query builder .Team/QueryingComponents Type:Bug Product defects
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant