OpenRailAssociation / osrd

An open source web application for railway infrastructure design, capacity analysis, timetabling and simulation
https://osrd.fr
GNU Lesser General Public License v3.0
415 stars 40 forks source link

front: avoid useless query on editor for switch types and infra #7904

Closed sim51 closed 2 days ago

sim51 commented 3 days ago

Fix #6971

codecov-commenter commented 3 days ago

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 168 lines in your changes missing coverage. Please review.

Project coverage is 28.51%. Comparing base (7353c7a) to head (d553c1b). Report is 5 commits behind head on dev.

Files Patch % Lines
...tions/editor/tools/switchEdition/useSwitchTypes.ts 0.00% 53 Missing and 1 partial :warning:
...c/applications/editor/tools/switchEdition/utils.ts 0.00% 50 Missing and 1 partial :warning:
front/src/modules/infra/useInfra.ts 0.00% 46 Missing and 1 partial :warning:
front/src/applications/editor/Editor.tsx 0.00% 5 Missing :warning:
front/src/applications/editor/Home.tsx 0.00% 2 Missing and 1 partial :warning:
front/src/applications/editor/Map.tsx 0.00% 2 Missing :warning:
...tor/tools/rangeEdition/speedSection/SwitchList.tsx 0.00% 2 Missing :warning:
...plications/editor/tools/switchEdition/useSwitch.ts 0.00% 2 Missing :warning:
...s/switchEdition/components/SwitchEditionLayers.tsx 0.00% 1 Missing :warning:
...witchEdition/components/SwitchEditionLeftPanel.tsx 0.00% 1 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #7904 +/- ## ============================================ - Coverage 28.54% 28.51% -0.04% Complexity 2059 2059 ============================================ Files 1249 1251 +2 Lines 154182 154232 +50 Branches 3036 3038 +2 ============================================ - Hits 44009 43972 -37 - Misses 108363 108448 +85 - Partials 1810 1812 +2 ``` | [Flag](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7904/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [core](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7904/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `74.95% <ø> (ø)` | | | [editoast](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7904/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `71.64% <ø> (-0.04%)` | :arrow_down: | | [front](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7904/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `9.99% <0.00%> (-0.01%)` | :arrow_down: | | [gateway](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7904/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `2.34% <ø> (ø)` | | | [railjson_generator](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7904/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `87.49% <ø> (ø)` | | | [tests](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7904/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `72.93% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sim51 commented 3 days ago

@emersion Thanks I fixed all your feedback, and now the PR is ready to be tested