urbit/pkg/grid
tomholford 0d25ac2464 ux: clearer button label
This addresses feedback from the Design team: what is being Unsynced?

Thanks @urcades!
2022-11-11 00:54:23 -08:00
..
.husky grid: init combination from liam + hunter 2021-08-13 18:11:16 -05:00
src ux: clearer button label 2022-11-11 00:54:23 -08:00
.env storage: using newer more correct scheme for storage and adding one time wipe 2021-10-21 14:22:37 -05:00
.eslintignore npm: changing to release version 2021-11-23 16:12:36 -06:00
.eslintrc.js grid: fix notification state 2021-09-20 14:30:08 +10:00
.gitignore storage: using newer more correct scheme for storage and adding one time wipe 2021-10-21 14:22:37 -05:00
.prettierrc grid: init combination from liam + hunter 2021-08-13 18:11:16 -05:00
CONTRIBUTING.md grid: fixing readme and contributor docs 2021-11-08 09:29:15 -06:00
index.html theme_color meta precedence corrected 2021-12-20 13:20:59 -05:00
package-lock.json grid: consume Pike interface and scry 2022-11-03 22:19:36 -07:00
package.json ops: fixing build 2022-06-23 12:24:39 -05:00
postcss.config.js grid: init combination from liam + hunter 2021-08-13 18:11:16 -05:00
README.md grid: fixing readme and contributor docs 2021-11-08 09:29:15 -06:00
tailwind.config.js grid: archive notifications without following 2021-09-23 12:11:05 +10:00
tsconfig.json grid: init combination from liam + hunter 2021-08-13 18:11:16 -05:00
vite.config.ts storage: using newer more correct scheme for storage and adding one time wipe 2021-10-21 14:22:37 -05:00

Landscape

Landscape provides the primary launching interface for Tlon's suite of userspace applications. This directory contains the front-end web application to power said interface.

Landscape is built primarily using React, Typescript, and Tailwind CSS. Vite ensures that all code and assets are loaded appropriately, bundles the application for distribution and provides a functional dev environment.

Getting Started

To get started using Landscape first you need to run, npm i && npm run bootstrap at the top level of the greater urbit repo. This will install your npm dependencies and correctly link the current implementation of the packages at pkg/npm/* to your dependencies.

If you intend to edit those packages will developing on Landscape, you should also have npm run watch-libs running to build and re-link them after every change.

Once that's done, you can then run npm run mock if you'd like to get started immediately. This will use hard-coded mock data to power the interface so you can work on the interface without being connected to a ship.

To develop against a working ship, you first need to add a .env.local file to the root of this directory. This file will not be committed. Adding VITE_SHIP_URL={URL} where {URL} is the URL of the ship you would like to point to, will allow you to run npm run dev. This will proxy all requests to the ship except for those powering the interface, allowing you to see live data.

Regardless of what you run to develop, Vite will hot-reload code changes as you work so you don't have to constantly refresh.

Deploying

To deploy, run npm run build which will bundle all the code and assets into the dist/ folder. This can then be made into a glob by doing the following:

  1. Create or launch an urbit using the -F flag
  2. On that urbit, if you don't already have a desk to run from, run |merge %work our %base to create a new desk and mount it with |mount %work.
  3. Now the %work desk is accessible through the host OS's filesystem as a directory of that urbit's pier ie ~/zod/work.
  4. From the directory of grid you can run rsync -avL --delete dist/ ~/zod/work/grid where ~/zod is your fake urbit's pier.
  5. Once completed you can then run |commit %work on your urbit and you should see your files logged back out from the dojo.
  6. Now run =dir /=garden to switch to the garden desk directory
  7. You can now run -make-glob %work /grid which will take the grid folder where you just added files and create a glob which can be thought of as a sort of bundle. It will be output to ~/zod/.urb/put.
  8. If you navigate to ~/zod/.urb/put you should see a file that looks like this glob-0v5.fdf99.nph65.qecq3.ncpjn.q13mb.glob. The characters between glob- and .glob are a hash of the glob's contents.
  9. If you're working at Tlon, you can upload this to our Google storage using gsutil cp glob-*.* gs://bootstrap.urbit.org. Otherwise any publicly available HTTP endpoint that can serve files should be sufficient for distributing the glob.
  10. Once you've uploaded the glob, you should then update the corresponding entry in the docket file that represents Landscape which currently resides at pkg/garden/desk.docket-0. Both the full URL and the hash should be updated to match the glob we just created, on the line that looks like this:
    glob-http+['https://bootstrap.urbit.org/glob-0v5.fdf99.nph65.qecq3.ncpjn.q13mb.glob' 0v5.fdf99.nph65.qecq3.ncpjn.q13mb]
  1. This can now be safely committed and deployed.