Skip to content

Conversation

Math-R
Copy link

@Math-R Math-R commented Sep 24, 2025

Description

-TrainrunSection: remove nbOfStops attribut and associated getter setter

Issues

close #535

Checklist

  • This PR contains a description of the changes I'm making
  • I've read the Contribution Guidelines
  • I've added tests for changes or features I've introduced
  • I documented any high-level concepts I'm introducing in documentation/
  • CI is currently green and this is ready for review

-first step to transform trainrunSection.nbOfStops, in actual nodes
Copy link
Contributor

@aiAdrian aiAdrian left a comment

Choose a reason for hiding this comment

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

Thank you for suggesting this change. I just wonder why we don't have changes arround the DataMigration.ts nor in data.service.ts

When i am loading a Netzgrafik using the numberOfStops the data must be migrated into the new schema - right?

See data.service.ts

  loadNetzgrafikDto(netzgrafikDto: NetzgrafikDto, preview = false) {
    this.netzgrafikLoadedInfoSubject.next(new NetzgrafikLoadedInfo(true, preview));

    DataMigration.migrateNetzgrafikDto(netzgrafikDto);
    
    ...
    

@Math-R
Copy link
Author

Math-R commented Sep 25, 2025

Thank you for suggesting this change. I just wonder why we don't have changes arround the DataMigration.ts nor in data.service.ts

When i am loading a Netzgrafik using the numberOfStops the data must be migrated into the new schema - right?

See data.service.ts

  loadNetzgrafikDto(netzgrafikDto: NetzgrafikDto, preview = false) {
    this.netzgrafikLoadedInfoSubject.next(new NetzgrafikLoadedInfo(true, preview));

    DataMigration.migrateNetzgrafikDto(netzgrafikDto);
    
    ...
    

Yes it's true. This change will occur at the end of the development of the new nodes management system.
@louisgreiner just report the implementation plan in this issue. (it will be translate soon).
Before permanently removing the nbOfStops property, we will modify the loading script to transform nbOfStops into an actual Node. This will allow us to not break existing projects and remain consistent.

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.

2 participants