Repository navigation
refactor: simplification pass - #31
Merged
Merged
Conversation
The editor kept a line-for-line copy of the app's topology conversion and antimeridian split. The polygons now live in a dataset-free module both apps import.
siteConfig.ts re-exported core types, dataset.ts renamed TransportModeSchema.options, and worldCountries.ts carried an exact copy of toId. Consumers now import the originals.
Fifteen summaries only restated the name ("Opens trip.", "Represents a
places filter."), which the coding guidelines treat as missing
documentation.
react-transition-group drove two fades in one component while the rest of the app animates with framer-motion. Dropping it removes a dependency, its types, and the transition class CSS. A root MotionConfig makes every framer-motion animation honour prefers-reduced-motion, which the global CSS rule cannot reach.
check repeated the root check, doctor repeated react:doctor, knip:fix was unused, and dev's --host repeated server.host in vite.config.ts.
Lazy views are router lazy routes in app/routing/router.tsx, not React.lazy calls in main.tsx, and they import named exports, so the default-export exception the guidelines described no longer exists.
The editor no longer converts the topology itself; the shared module resolves topojson-client from the public app's dependencies.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Simplification pass on top of
trips-v2. Behaviour is unchanged except where noted.Changes
features/map/lib/countries.ts, which has no dataset imports. The editor dropstopojson-client.data/re-exported core types and renamedTransportModeSchema.options, andworldCountries.tscarried an exact copy oftoId. Consumers now import the originals.react-transition-groupdrove two fades inFilterByCountry; those now use framer-motion like the rest of the app. A rootMotionConfigmakes all framer-motion animation honourprefers-reduced-motion(behaviour change, intended).check,doctor,knip:fix,--host).Left alone on purpose
mobile-device-detectstays: stable, and a hand-rolled user-agent check would be worse.Verification
pnpm checkandpnpm buildpass, via the pre-push hook.compilealland its unit tests pass.