enso/app/dashboard
somebody1234 51733ee876
Move some Drive state to zustand (#10913)
- Move Asset Panel open state to zustand
- This avoids re-rendering the entire Data Catalog view every time an asset is clicked
- Move Asset Panel props to zustand
- Move search suggestions to zustand
- Memoize `AssetRow` to avoid re-rendering every row when unnecessary

# Important Notes
It's not a perfect solution to the performance issues, however selection performance seems to have improved quite nicely.
2024-09-08 07:38:13 +00:00
..
docs Inline modules in app/ide-desktop/ (#10305) 2024-07-17 09:10:42 +00:00
e2e Settings improvements (#10924) 2024-09-06 14:29:26 +00:00
src Move some Drive state to zustand (#10913) 2024-09-08 07:38:13 +00:00
.prettierignore Fix Data Catalog showing spinners when refetching (#10647) 2024-07-26 12:03:50 +00:00
.prettierrc.json Edit prettier config (#10648) 2024-07-26 17:47:59 +10:00
404.html Format TS code (#10648) 2024-07-26 17:47:59 +10:00
favicon.ico Inline modules in app/ide-desktop/ (#10305) 2024-07-17 09:10:42 +00:00
index.html Format TS code (#10648) 2024-07-26 17:47:59 +10:00
package.json Local Dashboard fixes (#10958) 2024-09-08 06:54:41 +00:00
playwright.config.ts Split ydoc server into separate module (#10735) 2024-08-08 12:12:05 +00:00
postcss.config.js Inline modules in app/ide-desktop/ (#10305) 2024-07-17 09:10:42 +00:00
README.md Inline modules in app/ide-desktop/ (#10305) 2024-07-17 09:10:42 +00:00
tailwind.config.js Settings improvements (#10924) 2024-09-06 14:29:26 +00:00
tsconfig.json Fix flaky dashboard E2E tests (#10773) 2024-08-12 12:55:49 +00:00
vite.config.ts Format TS code (#10648) 2024-07-26 17:47:59 +10:00
vite.test.config.ts Format TS code (#10648) 2024-07-26 17:47:59 +10:00
vitest.config.ts Format TS code (#10648) 2024-07-26 17:47:59 +10:00

Dashboard

The dashboard is the entrypoint into the application. It includes project management, project sharing, and user accounts and authentication.

Further documentation

Further documentation is provided in the docs/ folder:

Folder structure

  • mock/: Overrides for specific files in src/ when running Playwright tests.
  • e2e/: Contains end-to-end tests.
  • **/__tests__/: Contains all unit tests. Unit tests MUST be in a __tests__/ subfolder, not beside (and not inside) the module they are testing.
  • src/: The dashboard application.
    • index.html: The sole HTML file used by this SPA. It imports the TS entry point.
    • authentication/src/: The main body of the app.
      • index.tsx: The TS entry point.
      • providers/: Contains React Contexts used by the main app.
      • components/: Contains the root component for the app.
      • dashboard/: The main body of the app. Directly in the folder, there are some utility modules that do not belong elsewhere.
        • components/: Contains all components used by the main app.
        • events/: Custom discriminated unions used to communicate messages between unrelated components.
      • authentication/: The authentication flow. This includes login, registration, and changing passwords.
        • components/: Contains all components used by the authentication flow.
        • providers/: Contains React Contexts required for authentication, and used by the main app.
  • index.html: The entrypoint, in the format required by Vite.
  • 404.html: A copy of the entrypoint. This is served on unknown routes by certain static hosting providers.
  • esbuild-config.ts: Configuration for ESBuild based on the environment variables. This is a dependency of esbuild-config.ts in sibling modules.

Cloud environment variables

These are environment variables related to the cloud backend. If these variables are not set, the build will still work, however access to the cloud backend will be disabled.

Note that ENSO_CLOUD_ENVIRONMENT may be set to instead load the files from a .env file. If ENSO_CLOUD_ENVIRONMENT is not set, or it is production or '', then variables are attempted to be read from .env. If it is set to any other value (say, foo), then it is loaded from .foo.env.

(While the convention in the Node.js ecosystem is to name the variants like .env.foo, .foo.env has been chosen here because .env should be more like a file extension. Visual Studio Code also understands .foo.env but not .env.foo.)

  • ENSO_CLOUD_REDIRECT: The domain (or localhost:8080) where the login link should redirect. Should include neither a path, nor a trailing slash.
  • ENSO_CLOUD_ENVIRONMENT: The name of backend environment matching the provided configuration keys. For most builds this should be production, meaning that requests go to the production cloud backend.
  • ENSO_CLOUD_API_URL: The root path for all API endpoints. Should not include a trailing slash.
  • ENSO_CLOUD_SENTRY_DSN: The Sentry Data Source Name (DSN) for this environment. This should normally be the same for all environments.
  • ENSO_CLOUD_STRIPE_KEY: Stripe's publishable client-side key.
  • ENSO_CLOUD_CHAT_URL: The URL for the WebSocket server serving as the chat backend.
  • ENSO_CLOUD_COGNITO_USER_POOL_ID: The ID of the Cognito user pool.
  • ENSO_CLOUD_COGNITO_USER_POOL_WEB_CLIENT_ID: The client-side key of the Cognito user pool.
  • ENSO_CLOUD_COGNITO_DOMAIN: The domain which all Cognito requests should go to.
  • ENSO_CLOUD_COGNITO_REGION: The AWS region for which Cognito is configured. Should match the region of the domain in ENSO_CLOUD_COGNITO_DOMAIN.