-
Notifications
You must be signed in to change notification settings - Fork 5
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
[VEDA2 Refactor] Spike - Replace Parcel Resolver? #896
Comments
Besides making the different contents available one big task of the veda resolver is to create list of values. It creates a general list of datasets so then individual ones can be loaded and also of all the existent taxonomies for the filters by looking through all the files. Doing this during build allows you not to have a hardcoded list elsewhere and not needed to load all content during runtime to create this. These are things that are very basic when you have a database for example, or even when you use a static site generator like gatsby, or something like Next. It becomes much more complicated when you're building an SPA that needs arbitrary data from an arbitrary number of files without using server tech. |
I feel like I’m missing a lot of detail for how VEDA works internally and how the content is managed so I’m just going to throw out some questions, hoping that it clarifies some questions for me without stirring the pot too much.
|
@oliverroick These are all good questions and should be part of Spike. To lay out the contexts that I am aware of...
I hope this gives you more ground to delve into the issue @oliverroick |
Slack Thread on needing to make a decision wether we want to use a static-page generator like NextJS or stick with what we’re currently using... |
Working on the Next test instance, #947 gave me some insights about what is needed to replace Parcel Resovler (To be clear, I am not talking about Parcel as a bundler. I am talking about Faux module 'Veda' that Parcel resolver outputs. These are being used as
I'd like to spend more time on 3, but I wanted to lay out the problem in a more scoped way first. |
To replace what Parcel Resolver does for 3 ( Approaches
There was an additional option to expose datasets and stories through an MDX file through using the syntax below.
But this will complicate the editor experience, so this approach won't be worth pursuing. |
As we narrowed down what to do to replace Parcel Resolver, I will close this ticket and open the items with action items. (such as #975) |
Parcel Resolver has been used to serve the contents of the VEDA from MDX files. The resolver made the metadata of the contents (frontmatter) instantly available through the faux module
veda
while the contents of each file lazily available through its loader. (So the built assets don't have to hold a large amount of content.)While the resolver has served its purpose so far, it is explicitly written for Parcel, and we hope VEDA-UI can be agnostic from the bundler.
Documentation about Parcel Resolver & Faux Modules: https://github.com/NASA-IMPACT/veda-ui/blob/main/docs/development/ARCHITECTURE.md#veda-modules
Here are some pointers that helped me get more thoughts on what is going on bts:
Where the mdx data objects are generated ({
data
:${FrontMatterData}
,content:${FileLoader}
}): https://github.com/NASA-IMPACT/veda-ui/blob/main/parcel-resolver-veda/index.js#L66-L81Where frontmatter gets processed (ex. we have some prefixes that need special handling for frontmatter, such as
::markdown
,::js
) : https://github.com/NASA-IMPACT/veda-ui/blob/main/parcel-resolver-veda/stringify-yml-func.jsThis ticket is a spike for researching how we can access this problem. The answers that we need to get from this spikes are
The text was updated successfully, but these errors were encountered: