MagicMirror icon indicating copy to clipboard operation
MagicMirror copied to clipboard

allow custom module positions

Open khassel opened this issue 2 years ago • 8 comments

I'm not sure if this should be merged but I tested this because of these discussions:

  • https://github.com/MichMich/MagicMirror/issues/3212
  • https://forum.magicmirror.builders/topic/18069/multiple-modules-in-a-region/17

With this PR you can

  • define own module positions as html in config.js, key is modulePositions
  • define own css styles in a new file in the css directory, the name of this file is specified in config.js, key is modulePositionsCss

So let me know whether we should offer this or not (no problem for me if not). This PR could be a basis for that.

khassel avatar Oct 12 '23 21:10 khassel

Codecov Report

Merging #3231 (baf4528) into develop (66b29ec) will increase coverage by 0.10%. Report is 1 commits behind head on develop. The diff coverage is 41.66%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

@@             Coverage Diff             @@
##           develop    #3231      +/-   ##
===========================================
+ Coverage    25.19%   25.30%   +0.10%     
===========================================
  Files           54       54              
  Lines        11933    11943      +10     
===========================================
+ Hits          3007     3022      +15     
+ Misses        8926     8921       -5     
Files Coverage Δ
js/defaults.js 100.00% <100.00%> (ø)
js/server_functions.js 89.39% <100.00%> (+0.16%) :arrow_up:
modules/default/calendar/calendar.js 0.00% <ø> (ø)
js/main.js 0.00% <0.00%> (ø)

... and 2 files with indirect coverage changes

codecov-commenter avatar Oct 12 '23 21:10 codecov-commenter

@khassel

and do you think about change module position when MM² is running ? some users ask to me this feature when whey use some "pages" 3rd party modules

sample using with an pages module

  • page 1: weather in top_right // clock in top_left // ...
  • page 2 : weather in top_left // clock in top_right // ...

Actually they have to use multi-instance of a module with hide // show feature

bugsounet avatar Jan 21 '24 10:01 bugsounet

there is a module that does this now in 3rd party list

https://github.com/Toreke/MMM-Dynamic-Modules

sdetweil avatar Jan 21 '24 13:01 sdetweil

I already forgot this PR ...

and do you think about change module position when MM² is running ?

not before your comment ...

This PR was only meant for discussing custom module positions, the implementation is a little ugly, not sure if this should go live ...

khassel avatar Jan 22 '24 18:01 khassel

I think it would be nice if we could give the users more flexibility with this option. I might prefer a more elegant solution. But I can't think of one at the moment 😅

KristjanESPERANTO avatar Jan 22 '24 18:01 KristjanESPERANTO

the problem is that I tell myself... I would have tried to code it but I'm recoding on one of my modules (and it's giving me a headache...)

When I've done it...why don't I start coding it. (this might be interesting) We still have a lot of time ahead of us :p

Note: sometimes it would be good to have a TODO file :p

bugsounet avatar Jan 22 '24 18:01 bugsounet

Note: sometimes it would be good to have a TODO file :p

I think we should do this with issues, there is already #3212 but I can create a new one for this feature (and assign it to you if you want).

khassel avatar Jan 22 '24 18:01 khassel

I submitted #3518 which reads index.html to get the defined regions for this run

sdetweil avatar Aug 20 '24 22:08 sdetweil