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

Front: Add front endpoint & swr to fetch tags from core #10565

Merged
merged 2 commits into from
Feb 6, 2025

Conversation

PopDaph
Copy link
Contributor

@PopDaph PopDaph commented Feb 5, 2025

Description

This PR adds:

  • New feature flag for tags_filter
  • New function in front coreApi to fetch tags.
  • New front api route to fetch tags (POST /w/[wId]/data_sources/tags)
  • SWR function to call this new endpoint from a React component.

Note: The new Core API route is blocked on #10441 and the request params will most likely change and not look like what I currently have now (PostTagSearchBodySchema).

But we can still merge this to continue working on the UI.

Tests

Tested locally.

Risk

Can be rolled back.

Deploy Plan

Deploy front.

@PopDaph PopDaph requested a review from tdraier February 5, 2025 17:33
export const PostTagSearchBodySchema = t.type({
query: t.string,
queryType: t.string,
dataSources: t.array(t.string),
Copy link
Contributor

Choose a reason for hiding this comment

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

Ideally here you should take an array of dataSourceViews instead (but can be fixed once core api is available)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes I think I'll update when the endpoint is live as I'm likely gonna need to tweak things anyway!

@PopDaph PopDaph force-pushed the front-search-tag-route branch from de35c0f to 85b7de5 Compare February 6, 2025 10:18
Copy link

github-actions bot commented Feb 6, 2025

Fails
🚫

Files in **/sdks/js/ have been modified. Changing the types defined in the SDK could break existing client.
Additions (new types, new values) are generally fine but removals are NOT OK : it would break the contract of the Public API.
Please add the sdk-ack label to acknowledge that your are not breaking the existing Public API contract.

Generated by 🚫 dangerJS against 9765246

@PopDaph PopDaph force-pushed the front-search-tag-route branch from 663d1ad to 9765246 Compare February 6, 2025 10:44
@PopDaph PopDaph merged commit b3c2a5e into main Feb 6, 2025
8 of 9 checks passed
@PopDaph PopDaph deleted the front-search-tag-route branch February 6, 2025 13:34
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.

2 participants