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

Improve map/zone navigation #19740

Merged
merged 3 commits into from
Feb 27, 2024

Conversation

karwosts
Copy link
Contributor

@karwosts karwosts commented Feb 8, 2024

Proposed change

  • When editing zones from map, fix the back button to go back to map
  • When editing zones from map, don't show the Areas tab, which typically shares the zones page. It's not relevant to editing zones, seems a general distraction, and clicking on it interferes with the historyBack navigation.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

Comment on lines 227 to 229
.tabs=${this._searchParms.has("noTabs")
? configSections.areas.filter((page) => page.component === "zone")
: configSections.areas}
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we should do this... Is it that much of an distraction?

It is also weird that noTabs on the areas config page will give you the zone title 🙃

Copy link
Contributor Author

@karwosts karwosts Feb 8, 2024

Choose a reason for hiding this comment

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

No it's not that bad, could revert it if you prefer.

Just thought it made the interface a little cleaner when you're editing zones from the map, it just didn't seem like the tabs belonged there in that case. If user happens to click on Areas, then he can't use the back button to go back to the map anymore.

It is also weird that noTabs on the areas config page will give you the zone title

I don't understand how you got in this situation. If you're on the areas config page, isn't a different page being loaded that doesn't have this code, and this arg has no effect?

http://localhost:8123/config/areas/dashboard?noTabs=1

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the interest of moving this forward, I dropped the changes to tabs, so now this just simply implements the back button logic.

@bramkragten bramkragten merged commit fb3c94f into home-assistant:dev Feb 27, 2024
13 checks passed
@karwosts karwosts deleted the map-zone-navigation branch February 27, 2024 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Map pencil to Zones does not go back to Map when back button pressed
2 participants