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

Migrate collection and category queries to data layer #2739

Merged
merged 16 commits into from
Jan 23, 2024

Conversation

bard
Copy link
Contributor

@bard bard commented Dec 8, 2023

Fixes: #2749

Depends on: #2731

Description

Core:

  • move collection and category queries to the data layer
  • make queries async so as to be independent from where they come from (source or remote service)

Additional:

  • (optional, experimental): allow fetching collections from a Google spreadsheet (example). Enable with:
new DataLayer({ 
  collections: { googleSheetsUrl: 'https://docs.google.com/...' }
})
  • cleared console/test warnings

Testing

In the PR environment, browse collections and categories and compare with corresponding collections/categories in production. Results should be the same (minus shuffling of entries). Edit: collections and categories are no longer visible after merging latest main, but they can still be verified in the deployment for the previous commit (at least as long as Vercel keeps it around): https://explorer-6d4mfl1jy-grants-stack.vercel.app/

Checklist

This PR:

  • Includes only changes relevant to the original ticket. Significant refactoring needs to be separated. Does not apply — the change is the refactoring.
  • Doesn't disable eslint rules.
  • Doesn't work around the type checker (including but not limited to: type casts, non-null assertions, @ts-ignore, unjustified optional values).
  • Doesn't contain commented out code.
  • If adding/updating a feature, it adds/updates its test script on Notion.

Copy link

vercel bot commented Dec 8, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
builder ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 23, 2024 11:22am
builder-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 23, 2024 11:22am
explorer ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 23, 2024 11:22am
explorer-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 23, 2024 11:22am
manager ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 23, 2024 11:22am
manager-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 23, 2024 11:22am

@bard bard marked this pull request as ready for review December 18, 2023 15:08
@bard bard requested review from a team as code owners December 18, 2023 15:08
@bard bard marked this pull request as draft December 18, 2023 15:11
@bard bard marked this pull request as ready for review December 18, 2023 16:15
@bard bard self-assigned this Dec 19, 2023
Copy link
Member

@melissa-neira melissa-neira left a comment

Choose a reason for hiding this comment

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

lgtm!

@boudra boudra self-assigned this Jan 16, 2024
Copy link

gitstream-cm bot commented Jan 23, 2024

This PR is 51.41760818588787% new code.

@boudra boudra merged commit 48b2fb5 into main Jan 23, 2024
19 checks passed
@boudra boudra deleted the migrate-collection-category-queries-to-data-layer branch January 23, 2024 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

migrate collection and category queries to the data layer
4 participants