Skip to content

Conversation

@vgeorge
Copy link
Contributor

@vgeorge vgeorge commented Oct 28, 2025

Summary

This PR introduces an early experiment toward a monorepo setup. It establishes a /packages and /apps structure and moves the main library code into packages/veda-ui. The goal is to explore the migration path and gather practical feedback before any broader restructuring decisions.

Contributes to:

Context

Based on my proposal on the ADR created by @AliceR. This is meant to complement it by prototyping a practical setup before committing to a full migration.

Changes

  • Moved app/scripts/packages/veda-ui/src/
  • Moved app/graphics/packages/veda-ui/graphics/
  • Added Yarn workspaces at root
  • Updated configs (tsconfig, gulpfile, vite, aliases`)
  • Fixed test and HTML paths
  • Kept lib/ and dist/ at root

Status

  • yarn buildlib, build, serve, test, and test:e2e all working
  • Existing builds appear unaffected

Potential Next Steps

  • Move app/apps/legacy-spa/
  • Move storybook/apps/storybook/
  • Review placement of mock/, test/, static/, and docs/
  • Revisit Parcel tooling and release process

Feedback and suggestions are welcome on the approach and possible next steps.

cc @dzole0311 @ifsimicoded @snmln @sandrahoang686 @aboydnw

- Move graphics to packages/veda-ui/graphics
- Update parcel config to extend from root
- Update gulpfile to use new source paths but keep lib output at root
- Remove package.json from library package (uses root dependencies)
- Add graphics alias to tsconfig and package.json
- Library build now working successfully
- Add $mock and $test aliases to tsconfig and package.json
- Fix test file imports to use aliases instead of relative paths
- Fix import order in test files
- TypeScript check now passes
- Note: stylelint errors are pre-existing, not introduced by refactor
@netlify
Copy link

netlify bot commented Oct 28, 2025

Deploy Preview for veda-ui ready!

Name Link
🔨 Latest commit 5dd8941
🔍 Latest deploy log https://app.netlify.com/projects/veda-ui/deploys/6929cca4027b540008420605
😎 Deploy Preview https://deploy-preview-1898--veda-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Collaborator

@dzole0311 dzole0311 left a comment

Choose a reason for hiding this comment

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

Looks good as a first pass @vgeorge 👍

@vgeorge
Copy link
Contributor Author

vgeorge commented Nov 10, 2025

@dzole0311 thanks for the review! Given that veda-ui is entering in maintenance mode (see #1889), I'm not sure if we should keep working on this refactor as there isn't a clear need for it in v6. I would suggest we close this PR.

# Conflicts:
#	app/scripts/components/common/blocks/figure.js
#	app/scripts/components/common/blocks/images/compare.js
#	app/scripts/components/common/blocks/images/index.js
#	app/scripts/components/common/blocks/index.test.js
#	app/scripts/components/common/blocks/lazy-components.js
#	app/scripts/components/common/bounds-fieldset.js
#	app/scripts/components/common/cookie-consent/cookieConsent.spec.js
#	app/scripts/components/common/mdx-content.js
#	app/scripts/components/common/meta-tags.js
#	app/scripts/components/common/nasa-logo-color.js
#	app/scripts/components/common/nasa-logo.js
#	app/scripts/components/common/nav-wrapper.js
#	app/scripts/components/common/try-render.js
#	app/scripts/components/sandbox/cards/index.js
#	app/scripts/components/sandbox/index.js
#	app/scripts/components/sandbox/legacy/cards/index.js
#	app/scripts/components/sandbox/legacy/colors/index.js
#	app/scripts/components/sandbox/legacy/content-blocks/index.js
#	app/scripts/components/sandbox/legacy/exploration-map/index.js
#	app/scripts/components/sandbox/legacy/exploration/timeline-analysis/external-layer-card.js
#	app/scripts/components/sandbox/legacy/exploration/timeline-analysis/index.js
#	app/scripts/components/sandbox/legacy/hug/index.js
#	app/scripts/components/sandbox/legacy/layer-info/index.js
#	app/scripts/components/sandbox/legacy/map-block/index.js
#	app/scripts/components/sandbox/legacy/mdx-chart/index.js
#	app/scripts/components/sandbox/legacy/mdx-page/index.js
#	app/scripts/components/sandbox/legacy/mdx-scrollytelling/index.js
#	app/scripts/components/sandbox/legacy/request/index.js
#	app/scripts/components/sandbox/legacy/table/index.js
#	app/scripts/components/sandbox/legacy/typography/index.js
#	app/scripts/components/sandbox/override/index.js
#	app/scripts/components/uhoh/fatal-error.js
#	app/scripts/components/uhoh/index.js
#	package.json
#	packages/veda-ui/src/components/common/blocks/figure.js
#	packages/veda-ui/src/components/common/blocks/figure.jsx
#	packages/veda-ui/src/components/common/blocks/images/compare.js
#	packages/veda-ui/src/components/common/blocks/images/compare.jsx
#	packages/veda-ui/src/components/common/blocks/images/index.js
#	packages/veda-ui/src/components/common/blocks/images/index.jsx
#	packages/veda-ui/src/components/common/blocks/index.test.js
#	packages/veda-ui/src/components/common/blocks/index.test.jsx
#	packages/veda-ui/src/components/common/blocks/lazy-components.js
#	packages/veda-ui/src/components/common/blocks/lazy-components.jsx
#	packages/veda-ui/src/components/common/bounds-fieldset.js
#	packages/veda-ui/src/components/common/bounds-fieldset.jsx
#	packages/veda-ui/src/components/common/cookie-consent/cookieConsent.spec.js
#	packages/veda-ui/src/components/common/cookie-consent/cookieConsent.spec.jsx
#	packages/veda-ui/src/components/common/mdx-content.js
#	packages/veda-ui/src/components/common/mdx-content.jsx
#	packages/veda-ui/src/components/common/meta-tags.js
#	packages/veda-ui/src/components/common/meta-tags.jsx
#	packages/veda-ui/src/components/common/nasa-logo-color.js
#	packages/veda-ui/src/components/common/nasa-logo-color.jsx
#	packages/veda-ui/src/components/common/nasa-logo.js
#	packages/veda-ui/src/components/common/nasa-logo.jsx
#	packages/veda-ui/src/components/common/nav-wrapper.js
#	packages/veda-ui/src/components/common/nav-wrapper.jsx
#	packages/veda-ui/src/components/common/try-render.js
#	packages/veda-ui/src/components/common/try-render.jsx
#	packages/veda-ui/src/components/exploration/components/map/share-button.tsx
#	packages/veda-ui/src/components/sandbox/cards/index.js
#	packages/veda-ui/src/components/sandbox/cards/index.jsx
#	packages/veda-ui/src/components/sandbox/index.js
#	packages/veda-ui/src/components/sandbox/index.jsx
#	packages/veda-ui/src/components/sandbox/legacy/cards/index.js
#	packages/veda-ui/src/components/sandbox/legacy/cards/index.jsx
#	packages/veda-ui/src/components/sandbox/legacy/colors/index.js
#	packages/veda-ui/src/components/sandbox/legacy/colors/index.jsx
#	packages/veda-ui/src/components/sandbox/legacy/content-blocks/index.js
#	packages/veda-ui/src/components/sandbox/legacy/content-blocks/index.jsx
#	packages/veda-ui/src/components/sandbox/legacy/exploration-map/index.js
#	packages/veda-ui/src/components/sandbox/legacy/exploration-map/index.jsx
#	packages/veda-ui/src/components/sandbox/legacy/exploration/timeline-analysis/external-layer-card.js
#	packages/veda-ui/src/components/sandbox/legacy/exploration/timeline-analysis/external-layer-card.jsx
#	packages/veda-ui/src/components/sandbox/legacy/exploration/timeline-analysis/index.js
#	packages/veda-ui/src/components/sandbox/legacy/exploration/timeline-analysis/index.jsx
#	packages/veda-ui/src/components/sandbox/legacy/hug/index.js
#	packages/veda-ui/src/components/sandbox/legacy/hug/index.jsx
#	packages/veda-ui/src/components/sandbox/legacy/layer-info/index.js
#	packages/veda-ui/src/components/sandbox/legacy/layer-info/index.jsx
#	packages/veda-ui/src/components/sandbox/legacy/map-block/index.js
#	packages/veda-ui/src/components/sandbox/legacy/map-block/index.jsx
#	packages/veda-ui/src/components/sandbox/legacy/mdx-chart/index.js
#	packages/veda-ui/src/components/sandbox/legacy/mdx-chart/index.jsx
#	packages/veda-ui/src/components/sandbox/legacy/mdx-page/index.js
#	packages/veda-ui/src/components/sandbox/legacy/mdx-page/index.jsx
#	packages/veda-ui/src/components/sandbox/legacy/mdx-scrollytelling/index.js
#	packages/veda-ui/src/components/sandbox/legacy/mdx-scrollytelling/index.jsx
#	packages/veda-ui/src/components/sandbox/legacy/request/index.js
#	packages/veda-ui/src/components/sandbox/legacy/request/index.jsx
#	packages/veda-ui/src/components/sandbox/legacy/table/index.js
#	packages/veda-ui/src/components/sandbox/legacy/table/index.jsx
#	packages/veda-ui/src/components/sandbox/legacy/typography/index.js
#	packages/veda-ui/src/components/sandbox/legacy/typography/index.jsx
#	packages/veda-ui/src/components/sandbox/override/index.js
#	packages/veda-ui/src/components/sandbox/override/index.jsx
#	packages/veda-ui/src/components/uhoh/fatal-error.js
#	packages/veda-ui/src/components/uhoh/fatal-error.jsx
#	packages/veda-ui/src/components/uhoh/index.js
#	packages/veda-ui/src/components/uhoh/index.jsx
Addresses PR feedback to include apps/* in workspaces alongside packages/* for proper monorepo setup.
@vgeorge vgeorge requested a review from dzole0311 November 25, 2025 12:08
@vgeorge
Copy link
Contributor Author

vgeorge commented Nov 25, 2025

I reopened this PR because it helps move #1871 across the finish line and improves the overall maintainability of the library.

@dzole0311 I made some updates and responded to your comments. I think we should keep the scope of this PR limited to isolating the library files.

This is ready for another review.

@dzole0311
Copy link
Collaborator

@vitor sounds good. I pulled the branch locally and everything looks fine 👍 One question before we merge: should we also do a global search here and replace leftover paths like app/scripts to match the new path structure?

# Conflicts:
#	packages/veda-ui/src/components/exploration/atoms/center.ts
#	packages/veda-ui/src/components/exploration/atoms/embed.ts
#	packages/veda-ui/src/components/exploration/atoms/zoom.ts
#	packages/veda-ui/src/components/exploration/components/embed-exploration/embed-timeline.tsx
#	packages/veda-ui/src/components/exploration/embed-exploration.tsx
Update all app/scripts and app/graphics references to packages/veda-ui/src and packages/veda-ui/graphics across configs and documentation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants