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

Add support for merging all networks in the layer selector #1688

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

csillag
Copy link
Contributor

@csillag csillag commented Jan 14, 2025

This depends on #1686.

This PR adds support for merging all networks in the layer selector,
so that instead of a hierarchical menu, we get a flat one.

On the Pontus-X instance, using this feature, instead of this:

image

and this:

image

We can have this:

image

Please note that you only want to activate this if you don't have
layers that are named the same on multiple networks.

(If you do, you can override names using the spacialScopeNames
config option in config.ts.)


Merging this PR doesn't change behavior, unless to turn the mergeNetworksInLayerSelector
flag from false to true.

Now we can hide different layers on different networks.
Include the name of the network for all layer menu items,
therefore eliminating the dependency of the layer menu
on the network menu.

The goal is that in the future, we can show the layer menu items
in other arrangements, not strictly following the separation
of the different networks.

Also, clean up internal architecture a naming a little bit.

There should be no functionality change.
Copy link

github-actions bot commented Jan 14, 2025

Deployed to Cloudflare Pages

Latest commit: 3455e6333cfb4b6bd0a937ba3dca900c7fe6ed3f
Status:✅ Deploy successful!
Preview URL: https://6b092d03.oasis-explorer.pages.dev
Alias: https://pr-1688.oasis-explorer.pages.dev

Please note that this only make sense if you don't have
layers that are named the same on multiple networks.

(If you do, you can override names using the spacialScopeNames
config option in config.ts.)
@csillag csillag force-pushed the csillag/support-flattened-layer-menu branch from 10c551a to 3455e63 Compare January 14, 2025 09:21
@csillag csillag marked this pull request as ready for review January 14, 2025 09:21
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.

1 participant