[#45] docs: add JSDoc comments across all components - #66
Merged
Conversation
…components App/RemittanceForm/RouteList/RouteCard had light or no JSDoc. Adds consistent documentation matching the existing prose + @PARAM style already used in routingEngine.js: - App.jsx: component-level doc explaining why state lives here rather than in a hook (ties back to ADR-0001's reasoning), plus doc on handleSubmit's query shape and its error-handling behavior - RemittanceForm.jsx: full @PARAM docs added to the existing component-level comment (currencies, onSubmit's callback shape), plus a one-line comment on handleSwap - RouteList.jsx: doc covering the deliberate "render nothing before a search has run" behavior, which isn't obvious from the code alone - RouteCard.jsx: doc flagging that route.totalCost is intentionally not displayed (it's a ranking score, not a monetary amount) - a clarification worth having directly in the component that renders the other Route fields but skips this one RouteList/RouteCard reference the Route/Hop typedefs already defined in routingEngine.js via an @PARAM import() type reference, rather than redefining them, so there's one source of truth for the shape. Verified for real (this is a JS/Vite project, not one of the Soroban Rust ones - Node tooling works fine in this sandbox): - npm test: 12/12 pass - npm run build: succeeds Closes BreachDirect#45
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.
Summary
Closes #45.
App/RemittanceForm/RouteList/RouteCardhad light or no JSDoc. Adds consistent documentation matching the existing prose +@paramstyle already used inroutingEngine.js.What's included
App.jsx: component-level doc explaining why state lives here rather than in a hook (ties back to ADR-0001's reasoning), plus doc onhandleSubmit's query shape and its error-handling behaviorRemittanceForm.jsx: full@paramdocs added to the existing component-level comment (currencies,onSubmit's callback shape), plus a one-line comment onhandleSwapRouteList.jsx: doc covering the deliberate "render nothing before a search has run" behavior, which isn't obvious from the code aloneRouteCard.jsx: doc flagging thatroute.totalCostis intentionally not displayed (it's a ranking score, not a monetary amount) — worth having directly in the component that renders the otherRoutefields but skips this oneRouteList/RouteCardreference theRoute/Hoptypedefs already defined inroutingEngine.jsvia an@param {import('../engine/routingEngine').Route}type reference, rather than redefining them, so there's one source of truth for the shape.Verification
This is a JS/Vite project (not one of the Soroban Rust ones), so I could verify for real:
npm test: 12/12 passnpm run build: succeedsCloses #45