Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix track section length when editing geometry #6017

Merged
merged 1 commit into from
Dec 26, 2023

Conversation

Akctarus
Copy link
Contributor

@Akctarus Akctarus commented Dec 5, 2023

Closes #5933

Implementation of a new behavior: when a track section is created, length can be edited directly on the map, but when a length is already entered, the drag must not affect the length.

@Akctarus Akctarus requested a review from a team as a code owner December 5, 2023 23:42
Copy link

codecov bot commented Dec 5, 2023

Codecov Report

Attention: 151 lines in your changes are missing coverage. Please review.

Comparison is base (c45b7e4) 26.91% compared to head (149d383) 26.90%.

Files Patch % Lines
...editor/components/LinearMetadata/FormComponent.tsx 0.00% 57 Missing ⚠️
...lications/editor/tools/trackEdition/components.tsx 0.00% 37 Missing ⚠️
...ootstrapSNCF/FormSNCF/DebouncedNumberInputSNCF.tsx 0.00% 18 Missing ⚠️
...rc/applications/editor/tools/trackEdition/tool.tsx 0.00% 14 Missing ⚠️
front/src/common/IntervalsDataViz/data.ts 25.00% 9 Missing ⚠️
front/src/types/editor.ts 0.00% 7 Missing ⚠️
...rc/applications/editor/tools/trackEdition/utils.ts 64.28% 5 Missing ⚠️
...mmon/IntervalsEditor/IntervalsEditorCommonForm.tsx 0.00% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                dev    #6017      +/-   ##
============================================
- Coverage     26.91%   26.90%   -0.02%     
  Complexity     2139     2139              
============================================
  Files           932      932              
  Lines        123836   123970     +134     
  Branches       2690     2689       -1     
============================================
+ Hits          33336    33351      +15     
- Misses        88894    89014     +120     
+ Partials       1606     1605       -1     
Flag Coverage Δ
core 78.87% <ø> (ø)
editoast 75.34% <ø> (-0.01%) ⬇️
front 9.47% <7.36%> (+<0.01%) ⬆️
gateway 2.55% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Akctarus Akctarus force-pushed the tmn/fix-track-section-length branch 7 times, most recently from 3b5f924 to 0fddb32 Compare December 11, 2023 10:26
@RomainValls RomainValls self-requested a review December 14, 2023 13:18
@flomonster flomonster changed the title front: fix track section length and position Fix track section length when editing geometry Dec 14, 2023
@Akctarus Akctarus requested a review from clarani December 14, 2023 15:04
Copy link
Contributor

@flomonster flomonster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still have a bug. When editing a track section with slopes, changing the geometry results in an invalid position in slopes (negative values).

@Akctarus Akctarus force-pushed the tmn/fix-track-section-length branch 3 times, most recently from d245d8f to e2016ed Compare December 19, 2023 14:17
@SharglutDev SharglutDev removed the request for review from RomainValls December 19, 2023 14:32
Copy link
Contributor

@flomonster flomonster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for this fix 🎉 (Tested, not reviewed)

Copy link
Contributor

@clarani clarani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments

front/src/applications/editor/tools/trackEdition/utils.ts Outdated Show resolved Hide resolved
front/src/common/IntervalsDataViz/data.ts Outdated Show resolved Hide resolved
front/src/common/IntervalsDataViz/data.ts Outdated Show resolved Hide resolved
front/src/common/IntervalsDataViz/data.test.ts Outdated Show resolved Hide resolved
@Akctarus Akctarus force-pushed the tmn/fix-track-section-length branch 2 times, most recently from 1f87a82 to 94b7bd2 Compare December 22, 2023 16:12
Copy link
Contributor

@clarani clarani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ! You just need to squash your commits :) Thanks ✅

@Akctarus Akctarus force-pushed the tmn/fix-track-section-length branch 3 times, most recently from fc83a48 to 805c8f6 Compare December 22, 2023 16:41
@Akctarus Akctarus enabled auto-merge December 22, 2023 16:41
@Akctarus Akctarus force-pushed the tmn/fix-track-section-length branch from 805c8f6 to 9b7a22b Compare December 22, 2023 17:14
@Akctarus Akctarus force-pushed the tmn/fix-track-section-length branch from 9b7a22b to 8a73067 Compare December 25, 2023 20:01
@Akctarus Akctarus force-pushed the tmn/fix-track-section-length branch from 8a73067 to 149d383 Compare December 26, 2023 10:59
@Akctarus Akctarus added this pull request to the merge queue Dec 26, 2023
Merged via the queue into dev with commit 6c12f67 Dec 26, 2023
18 checks passed
@Akctarus Akctarus deleted the tmn/fix-track-section-length branch December 26, 2023 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Slopes and curves editor can be stuck in invalid state
4 participants