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

refact: rewrite fetching based on checks+hooks #216

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

davidlougheed
Copy link
Member

@davidlougheed davidlougheed commented Nov 7, 2024

Wrap various state fetches in hooks and manage dispatches on an as-needed basis instead of all piled in the router component.

Should also fix some issues with glitched loading of dashboard with a project/dataset selected on load.

@davidlougheed
Copy link
Member Author

…ed-fetches

# Conflicts:
#	src/js/components/Overview/ChartCard.tsx
#	src/js/components/Overview/OverviewDisplayData.tsx
Copy link
Member

@gsfk gsfk left a comment

Choose a reason for hiding this comment

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

Seems to work as expected, I like the use of condition, which I don't think I've seen before.

@davidlougheed davidlougheed marked this pull request as ready for review November 8, 2024 17:12
…ed-fetches

# Conflicts:
#	src/js/components/Overview/PublicOverview.tsx
#	src/js/features/content/content.store.ts
…ed-fetches

# Conflicts:
#	src/js/features/config/config.store.ts
…ed-fetches

# Conflicts:
#	src/js/components/BentoAppRouter.tsx
#	src/js/features/metadata/metadata.store.ts
Copy link
Contributor

@v-rocheleau v-rocheleau left a comment

Choose a reason for hiding this comment

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

Fails build with one error:

bentov2-public  | ERROR in /bento-public/src/js/components/Beacon/BeaconSearchResults.tsx
bentov2-public  | ./src/js/components/Beacon/BeaconSearchResults.tsx 5:10-33
bentov2-public  | [tsl] ERROR in /bento-public/src/js/components/Beacon/BeaconSearchResults.tsx(5,11)
bentov2-public  |       TS2339: Property 'isFetchingQueryResponse' does not exist on type 'BeaconState'.
bentov2-public  | ts-loader-default_e3b0c44298fc1c14
bentov2-public  |  @ ./src/js/components/Beacon/BeaconQueryUi.tsx 7:0-56 13:161-180
bentov2-public  |  @ ./src/js/components/BentoAppRouter.tsx 18:0-51 84:453-466 84:1035-1048 84:1630-1643
bentov2-public  |  @ ./src/js/index.tsx 15:0-57 30:265-279

@davidlougheed
Copy link
Member Author

we're postponing this one til 18 or onwards since Sanjeeve disagrees with the lazy-loading approach somewhat here @v-rocheleau - i'll convert back to a draft for now.

@davidlougheed davidlougheed marked this pull request as draft November 13, 2024 19:37
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.

3 participants