move fixtures to app package, get cosmos working for web #4189
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes TLON-3223
/packages/app/fixtures
. (some mobile specific fixtures still exist in thetlon-mobile
app package, and can still be selected in cosmos).cosmos:web
,cosmos:native
, andcosmos
scripts to the root.cosmos
runs the two other scripts concurrently.fixturesLocation
.tlon-web
fixtures and the cosmos dep there.If you pull this down, run
pnpm i
, you should be able to runpnpm cosmos
from the root and then see cosmos running at bothhttp://localhost:5000/
andhttp://localhost:5001/
, one for the web and one for mobile.Note: I couldn't get separate web fixtures working with this setup (yet). For now, any fixture in the
app
package should work on both platforms.Also: I used gitpkg because react-cosmos is a monorepo, more about gitpkg here: https://gitpkg.vercel.app/about
Copilot description:
This pull request includes significant changes to the
tlon-mobile
andtlon-web-new
applications to improve the configuration and module imports for React Cosmos. The most important changes include the removal of automatically generated files, updates to package dependencies, and adjustments to import paths and fixture configurations.Configuration and Dependency Updates:
apps/tlon-mobile/package.json
: Updated thereact-cosmos
dependency to use a specific GitHub repository version.apps/tlon-web-new/package.json
: Updated thereact-cosmos
andreact-cosmos-plugin-vite
dependencies to use specific GitHub repository versions.apps/tlon-web-new/cosmos.config.json
: Added a new Cosmos configuration file for thetlon-web-new
application.Import Path Adjustments:
apps/tlon-mobile/src/App.cosmos.tsx
: Updated the import path forcosmos.imports
to reflect the correct directory structure.apps/tlon-mobile/src/fixtures/InputToolbar.fixture.tsx
: Corrected the import path forFixtureWrapper
.Removal of Unnecessary Files and Code:
apps/tlon-mobile/cosmos.imports.ts
: Removed the automatically generated file and its content.apps/tlon-mobile/src/fixtures/FixtureWrapper.tsx
: Removed theFixtureWrapper
component and its related code.Fixture Configuration Changes:
apps/tlon-web-new/cosmos.imports.ts
: Added a new Cosmos imports file for thetlon-web-new
application.apps/tlon-web/src/components/About/__fixtures__
: Removed outdated fixture files for the About component. [1] [2] [3]