near / near-discovery-components

This is a repository that holds the source code of all NEAR discovery components that the team maintains for near.org.
https://near.org
MIT License
14 stars 12 forks source link

Determine RoC development flow for building out DIG components #757

Closed calebjacob closed 4 months ago

calebjacob commented 5 months ago

This ticket aims to get answers for the following:

I'd like to see us spin up a brand new repo for our RoC components to give us mental separation between RoC and VM components. RoC components use TypeScript and CSS Modules - so their tooling is very different from our existing VM components.

Next Steps:

If we determine the ideal local development flow isn't ready yet, we could start building out our DIG components via the online sandbox: https://roc-sandbox.near.dev

mpeterdev commented 5 months ago

Would this require a new repo, or a sub-folder in near-discovery-components?

If we expect to be migrating components, then you could keep them in the same repo so that contributor history isn't lost.

If we expect to be implementing a new set of components without building too much off existing work, then a fresh repo would be fitting.

There isn't much functional difference between the two, go with whatever feels right.

publishing those RoC components to an account via GitHub action

CI/CD publishing is available as of a few weeks ago. We are using it to publish apps/demos from near/bos-web-engine. See this action which uses my fork of bos-cli-rs for deploy

How would we deploy these components into RoC namespace in SocialDB?

This is part of the workflow, note the first arg in the deploy command

./bos components --social-db-folder "component_alpha" deploy ...

if we've ironed out the tooling for developing/viewing RoC components in a local environment (editing inside VS Code)

bos-loader support came back online around the same time, you can set the URL via the collapsible dev tools on roc.near.dev

We haven't done any work towards bringing the VS Code experience in line with sandbox as far TypeScript support, so it's up to you whether you do your work in sandbox or VS code. If you choose to use Sandbox, I would still recommend copy/pasting out to a git repo for commits and publishing to enable a proper team workflow

calebjacob commented 5 months ago

Fantastic. Thanks for the response @mpeterdev! That gives me enough direction for now to play around with setting up a new repo. I might have some more follow up questions in a day or two.

calebjacob commented 4 months ago

I've got a new repository set up and working end to end: https://github.com/near/near-roc-components

The README has detailed steps on how to get up and running. We'll just want to consider what other documentation and automation we need to copy over from our near-discovery-components repo @charleslavon (eg: contribution guidelines).

I also went ahead and worked on a solution to improve DX further by enabling hot reloading when developing components locally: https://github.com/near/bos-web-engine/pull/420