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

live view: remove disabled -OnBattery-specifc views from DOM #372

Merged
merged 1 commit into from
Aug 10, 2023

Conversation

schlimmchen
Copy link
Member

instead of hiding views, we can also avoid adding them to
the DOM. this has a couple of advantages:

* no HTTP request for data is sent and no websocket connection
  is established for disabled features.
* JavaScript that causes errors due to incomplete or incompatible
  data of features that are disabled anyways do not trigger the
  browser debugger.

I am working on changes to the Battery live view to accommodate the JK BMS values (and making it very generic for future battery interfaces) and I am stumbling on a couple of annoying problems. This is one of them.

instead of hiding views, we can also avoid adding them to the DOM. this
has a couple of advantages:

* no HTTP request for data is sent and no websocket connection is
  established for disabled features.
* JavaScript that causes errors due to incomplete or incompatible data
  of features that are disabled anyways do not trigger the browser
  debugger.
@helgeerbe helgeerbe merged commit b721416 into hoylabs:development Aug 10, 2023
8 checks passed
@schlimmchen schlimmchen deleted the prefer-v-if-over-v-show branch February 4, 2024 14:44
Copy link

github-actions bot commented Apr 4, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants