Skip to content

Conversation

@jacomyal
Copy link

Description

This PR depends on PR #554. It should only be merged once #554 is merged as well.

This PR adds a new block in the "Edit" side panel, to allow controlling the isCollapsed state of the nodes.
This form displays:

  • a list of all nodes, with their name and a checkbox to toggle their isCollapsed state
  • a text input to filter the nodes list
  • a global checkbox to toggle all filtered nodes at once

Issues

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

This commit addresses issue:
OpenRailAssociation/osrd#13292

Details:
- Adds new component GlobalNodesManagementComponent in app/view/editor-edit-tools-view-component
- The new component controls the isCollapsed state of the nodes
- Adds EN and FR translations for the new component
- Adds the new component to the existing EditorEditToolsViewComponent panel
Copy link
Contributor

@louisgreiner louisgreiner left a comment

Choose a reason for hiding this comment

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

Looks very nice and the search bar is really good.

I wonder if we could ask user's confirmation when checking the box for all the nodes at once? This component already exists in the application I think, we can reuse it.

PS: you should make your PR into mrd/new-nodes-management-system I think, we use this as feature branch

"nodes": "Noeuds"
}
},
"nodes-search-placeholder": "Rechercher par noms ou trigrammes",
Copy link

Choose a reason for hiding this comment

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

Suggested change
"nodes-search-placeholder": "Rechercher par noms ou trigrammes",
"nodes-search-placeholder": "Rechercher par nom ou trigramme",

/>
</div>
<div class="nodes-list">
@if (getVisibleNodes().length) {
Copy link

Choose a reason for hiding this comment

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

Hum I've not worked with Angular for a while, but why not use a useMemo for visibleNodes ?

This commit handles various feedbacks from reviewers on PR:
#613

Details:
- Fixes some FR translations
- Renames "visible nodes" as "matching nodes"
- Caches the matching nodes array
- Adds a confirmation modal when clicking the global checkbox
@jacomyal jacomyal changed the base branch from main to mrd/new-nodes-management-system November 13, 2025 11:56
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.

4 participants