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

Remove topology type selections from zones #5042

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

kwvanderlinde
Copy link
Collaborator

@kwvanderlinde kwvanderlinde commented Nov 11, 2024

Identify the Bug or Feature request

Closes #5014

Description of the Change

Individual zones no longer keep their own topology type selection. Instead this state is kept in AppStatePersisted and is reflected in the toolbar's topology type selector. There is no more bookkeeping required to keep the toolbar and the current zone's topology types in sync with each other.

The Zone.TopologyTypeSet class is also redundant now that Zone no longer has a field of that type to serialize. It has been removed in favour of Set<TopologyTypeSet> / EnumSet<TopologyTypeSet>.

Possible Drawbacks

None

Documentation Notes

N/A

Release Notes

  • Changed topology type selection so it is no longer dependent on the current map.

This change is Reviewable

@kwvanderlinde kwvanderlinde self-assigned this Nov 11, 2024
@kwvanderlinde kwvanderlinde added the feature Adding functionality that adds value label Nov 11, 2024
@kwvanderlinde kwvanderlinde marked this pull request as ready for review November 11, 2024 08:07
Everwhere else we use `Set<TopologyType>` as it is functionally equivalent. We keep the field around because persisted
`Zone`s still need to be able to read its contents.
`Zone` no longer needs to keep track of its own mode selection, freeing the application from having to keep the selector
in sync with the current `Zone`. This also makes the selector more self-contained, no longer depending on the global
state it used to need to keep the current `Zone` up to date. Operations that previously queried the zone for the current
mode selection now query the selector.
We don't need the null case anymore in `AppStatePersisted.setTopologyTypes()`, and we can make the output format
explicit rather than accepting whatever `toString()` throws at us.
@kwvanderlinde kwvanderlinde force-pushed the feature/5014-dissociate-topology-type-from-zone branch from 125dbd3 to 9a4f5e7 Compare November 12, 2024 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adding functionality that adds value
Projects
Status: Awaiting-Review
Development

Successfully merging this pull request may close these issues.

[Feature]: Dissociate topology type selection from the map
1 participant