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

suggest models in the code editor #3705

Merged
merged 3 commits into from
Dec 14, 2023
Merged

Conversation

briangregoryholmes
Copy link
Contributor

Closes #3384

Like the idea of coloring sources and models differently, but this PR does not address that feature.

@briangregoryholmes briangregoryholmes self-assigned this Dec 14, 2023
@briangregoryholmes briangregoryholmes changed the title suggest autocomplete for models in the code editor suggest models in the code editor Dec 14, 2023
@ericpgreen2
Copy link
Contributor

I started on QA, but I hit this error in my browser console, and it crashed the app:
image

I have a select * from adbids model, and I'm able to trigger the error when I refresh the page.

allModels.data.map((r) =>
createTableColumnsWithName(queryClient, instanceId, r.meta.name.name)
),
(sourceColumnResponses) =>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, this tipped me off to where you got this code :). Nice approach to just mirror what we have for sources. But: sourceColumnResponses -> modelColumnResponses

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed

@briangregoryholmes
Copy link
Contributor Author

briangregoryholmes commented Dec 14, 2023

@ericpgreen2 I missed that schema was technically undefined until it hit the reactive code block that populated the source columns. I believe this error would surface if the model query resolved first.

I moved the empty object assignment to the variable declaration, which resolved the issue on my end.

Copy link
Contributor

@ericpgreen2 ericpgreen2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great!

@briangregoryholmes briangregoryholmes merged commit 567993e into main Dec 14, 2023
2 checks passed
@briangregoryholmes briangregoryholmes deleted the 3384-autocomplete branch December 14, 2023 23:59
mindspank pushed a commit that referenced this pull request Dec 18, 2023
* adds autocomplate for models in the code editor

* remove unused type import

* change schema initialization, rename variable in useAllModelColumns
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suggest models in autocomplete
2 participants