Closed vicb closed 5 months ago
[!WARNING]
Review failed
The pull request is closed.
The recent updates primarily involve renaming variables and functions for clarity and consistency, specifically changing speed
to speedKmh
and distance
to distanceM
. Additionally, there were adjustments in event handling logic within the AdminPage
class to ensure proper function calls. These changes enhance code readability and maintainability.
Files/Paths | Change Summaries |
---|---|
.../components/2d/path-element.ts |
Renamed setDistance to setDistanceM , imported getPreciseDistance , updated path vertex removal logic, adjusted distance handling. |
.../components/2d/planner-element.ts |
Renamed setSpeed to setSpeedKmh , speed to speedKmh , distance to distanceM , adjusted related calculations. |
.../pages/admin.ts |
Corrected the click event handler for the "Logout" button to call the logout method properly. |
.../redux/planner-slice.ts |
Renamed speed to speedKmh , distance to distanceM , updated corresponding action functions and state updates. |
.../flyxc.ts |
Updated setSpeed function call to setSpeedKmh in store.dispatch . |
In code's vast and winding trail,
Distances in meters, speeds in km/h prevail.
With clicks and paths now set just right,
Our admin logs out without a fight.
Oh, how the code does gleam and glow,
As changes help the project grow!
πβ¨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
This pull request addresses the issue of route length calculation in the planner by renaming variables to more accurately reflect their units and ensuring the distance is calculated in meters. The changes involve updating variable names and logic in multiple files to maintain consistency and correctness.
Files | Changes |
---|---|
apps/fxc-front/src/app/redux/planner-slice.ts apps/fxc-front/src/app/components/2d/path-element.ts apps/fxc-front/src/app/components/2d/planner-element.ts apps/fxc-front/src/flyxc.ts |
Renamed variables related to speed and distance to include units (Kmh and M) and updated related logic and state handling to ensure consistency and correctness. |
Latest commit: |
c75fa66
|
Status: | β Deploy successful! |
Preview URL: | https://ccbc8c25.flyxc.pages.dev |
Branch Preview URL: | https://fix-length.flyxc.pages.dev |
Thanks Brian Black for the report
/cc @flyingtof
Summary by Sourcery
This pull request fixes the route length calculation in the planner by ensuring the distance is measured in meters and speed in km/h. It also includes refactoring for clarity and a minor syntax fix in the admin page.
Summary by CodeRabbit
Bug Fixes
logout
method.Refactor
distance
todistanceM
andspeed
tospeedKmh
).