Skip to content

Add options to disable MultiModal StopPlace and Group of StopPlaces creation#1710

Open
solita-topip wants to merge 2 commits into
entur:masterfrom
tmfg:feature/config-disable-multimodal-and-group-of-stopplaces
Open

Add options to disable MultiModal StopPlace and Group of StopPlaces creation#1710
solita-topip wants to merge 2 commits into
entur:masterfrom
tmfg:feature/config-disable-multimodal-and-group-of-stopplaces

Conversation

@solita-topip
Copy link
Copy Markdown
Contributor

Summary

Add two new optional config flags to ModalityConfig to hide UI features (MultiModal StopPlace creation and Group of StopPlaces creation): disableMultiModalStopPlaceCreation and disableGroupOfStopPlacesCreation. When set to true, the respective creation buttons are disabled and hidden from the UI. Default behavior is unchanged when the flags are unset.

Issue

No issue created — small UI config change.

Motivation: Some deployments do not support MultiModal stop places or Group of Stop Places. Previously there was no way to hide these creation options from the UI, leading to confusion for end users.

How the code works: Two new boolean flags are added to ModalityConfig. The UI checks these flags and conditionally renders/hides the relevant creation buttons.

Technical approach: Purely additive config flags with no effect when unset — no breaking changes.

Unit tests

  • No unit tests added as the change is limited to UI config-driven conditional rendering.
  • Manual verification done by setting each flag to true and confirming the respective buttons are hidden in the UI.
  • No performance impact expected.

Documentation

  • The new config options disableMultiModalStopPlaceCreation and disableGroupOfStopPlacesCreation are self-documenting by name.
  • Added inline comments where the flags are consumed in the UI.

@a-limyr a-limyr self-requested a review April 29, 2026 07:49
</MenuItem>
<MenuItem onClick={() => this.handleNewStop(true)}>
<MenuItem
disabled={multiModalStopPlaceCreationDisabled}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Only issue I have is that this menu item is disabled (grayed out), but all the other places multimodal (and group of stop places) are hidden. Maybe this should be hidden as well?

@a-limyr
Copy link
Copy Markdown
Contributor

a-limyr commented May 4, 2026

I assigned this to you @solita-sabinaf. Hope that is ok.

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.

3 participants