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

front: remove react-beautiful-dnd #10617

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

SharglutDev
Copy link
Contributor

The lib hasn't been updated since 2022 and now is outdated regarding React 19 new version. The lib uses React "defaultProps" feature which is deprecated in React 19. As the drag and drop feature isn't used by users and can be bypassed, remove the lib and the related feature to enable a future migration to React 19.

close #10616

The lib hasn't been updated since 2022 and now is outdated regarding React 19 new version.
The lib uses React "defaultProps" feature which is deprecated in React 19.
As the drag and drop feature isn't used by users and can be bypassed, remove the lib and the related feature to enable a future migration to React 19.

Signed-off-by: SharglutDev <[email protected]>
@SharglutDev SharglutDev requested a review from a team as a code owner January 31, 2025 16:56
@github-actions github-actions bot added the area:front Work on Standard OSRD Interface modules label Jan 31, 2025
@SharglutDev SharglutDev requested review from Synar and Math-R January 31, 2025 16:57
@codecov-commenter
Copy link

codecov-commenter commented Jan 31, 2025

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

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.82%. Comparing base (2e46b4b) to head (1204fc1).
Report is 3 commits behind head on dev.

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

Additional details and impacted files
@@            Coverage Diff             @@
##              dev   #10617      +/-   ##
==========================================
- Coverage   81.85%   81.82%   -0.03%     
==========================================
  Files        1075     1073       -2     
  Lines      107153   107015     -138     
  Branches      728      722       -6     
==========================================
- Hits        87708    87564     -144     
- Misses      19406    19412       +6     
  Partials       39       39              
Flag Coverage Δ
editoast 74.23% <ø> (-0.02%) ⬇️
front 89.36% <100.00%> (-0.03%) ⬇️
gateway 2.18% <ø> (ø)
osrdyne 3.28% <ø> (ø)
railjson_generator 87.50% <ø> (ø)
tests 88.14% <ø> (ø)

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.

@Synar
Copy link
Contributor

Synar commented Jan 31, 2025

Worth noting that the authors of beautiful dnd have created a new lib called pragmatic dnd, which they recommend in their deprecation announcement for beautiful dnd. If we're only removing the feature for react 19 support, it may be worth migrating instead

@SharglutDev
Copy link
Contributor Author

Worth noting that the authors of beautiful dnd have created a new lib called pragmatic dnd, which they recommend in their deprecation announcement for beautiful dnd. If we're only removing the feature for react 19 support, it may be worth migrating instead

Yes you're right, I saw that as well.

As I tried to explain, this lib was used only for the drag and drop feature which wasn't used by our users. Ex: I have a path Perrigny - Valence - Avignon - Miramas, if I switch Valence and Avignon, the pathfinding breaks, it doesn't make any sense geographically. It will be pretty rare to have a proper use of this feature.

Even if it's not a big deal to migrate with the new lib, @thibautsailly validated that we don't really need the feature and we shouldn't devote time for that.

Copy link
Contributor

@Synar Synar left a comment

Choose a reason for hiding this comment

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

Then everything LGTM ^^

Copy link
Contributor

@Math-R Math-R left a comment

Choose a reason for hiding this comment

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

Looks fine on my side thanks !

@SharglutDev SharglutDev added this pull request to the merge queue Feb 3, 2025
Merged via the queue into dev with commit 0fbdbed Feb 3, 2025
27 checks passed
@SharglutDev SharglutDev deleted the pfn/front/remove-react-beautiful-dnd branch February 3, 2025 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:front Work on Standard OSRD Interface modules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove react-beautiful-dnd
4 participants