Comments (10)
see
https://forum.magicmirror.builders/topic/18852/magicmirror-regions
from magicmirror.
yes, the mentioned PR causes your problems.
AFAIR this was implemented to prevent crashes so we have less support.
@rejas @sdetweil from my side we could add an additional parameter in config.js
to allow custom positions so that these (hopefully experienced) users don't have to fix this by changing our code.
from magicmirror.
@khassel yes prevent crashes but could be an optional property as u suggest. I also suggested code to do discovery, but could be trouble depending, on above
from magicmirror.
My vote would be to scan the index file for the regions when it does the check. It seems like this ability is already built-in somewhat to the codebase since it was able to use the custom regions before.
However, I always have to remember to replace the index file with my custom after an update, so having the alternative means to add these in via config or other means would also be good. Maybe a way to add a custom section similar to how you can do a custom CSS that gets injected into the index file automagically. That way if an update doesn't wipe out core manual updates.
from magicmirror.
before we we didn't validate the regions. but if it was wrong, there was a fatal error.. and MM didn't come up
we found a case with no module: and fixed that, and decided to validate the position names too.. this is what caught you..
I did write a sample bit of JS to extract the names from the index.html file.. and ad d them to the list to validate against.
if I can find it again..
from magicmirror.
const fs = require('fs')
const indexFile = 'index.html'
let lines = fs.readFileSync(indexFile).toString().split('\n')
let regionRegex = /"region ([^"]*)/i
lines.forEach(l =>{
let results=regionRegex.exec(l)
if(results && results.length>1){
console.log("region='"+results[1].replace(' ','_')+"'")
}
})
from magicmirror.
my above PR brings back the situation of v2.27.0
, so this would solve this issue but still no solution for the index.html
file.
We often had discussions about custom regions, but that was never implemented, e.g. #3231.
If we implement such a solution, it should be robust and not result in increased support.
from magicmirror.
well, your pr suspends checking. does not check new region names too.
from magicmirror.
as I said, brings back the situation of v2.27.0
, not more
from magicmirror.
I thought you would make the property for an array of position names, to add/replace the default ones vs a flag to not check
from magicmirror.
Related Issues (20)
- PR 2881 extended calendar to receive notifications from other modules, but code in wrong place
- [weather] openmeteo precipitationProbability not shown in forecast
- newsfeed enclosured picture feature HOT 6
- [weather] openmeteo hourly does not work into next day
- [weather] provider openmeteo showing nightly icons in forecast when current time is "nightly"
- Electron >= v30.x uses Node v20
- Compliments module special days config HOT 5
- OpenMeteo weather provider uses "apparent temperature" in forecast data instead of actual temperatures HOT 2
- Repeating calendar event shifted by 1 day when RRule is processed HOT 3
- Option to turn on/off monitor under certain conditions HOT 1
- [testing] local e2e-testing in docker container doesn't work anymore
- [updatenotification] use of this module creates pm2 daemon process(es) HOT 3
- fix e2e testcase startApplication() helper to accept run date/time like the electron helper with the same name does HOT 2
- [core] cleanup questions HOT 4
- H
- H HOT 1
- Multiple Instances of Node Helper running for a single module HOT 4
- [WARN] No /home/*user*/MagicMirror/js/../modules/MMM-Jast/MMM-Jast.js found for module: MMM-Jast HOT 2
- fix logging of systeminformation for raspberry pi HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from magicmirror.