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

allow custom module positions #3231

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

khassel
Copy link
Collaborator

@khassel khassel commented Oct 12, 2023

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

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.

@codecov-commenter
Copy link

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%.

❗ 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%) ⬆️
modules/default/calendar/calendar.js 0.00% <ø> (ø)
js/main.js 0.00% <0.00%> (ø)

... and 2 files with indirect coverage changes

@bugsounet
Copy link
Contributor

@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

@sdetweil
Copy link
Collaborator

sdetweil commented Jan 21, 2024

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

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

@khassel
Copy link
Collaborator Author

khassel commented Jan 22, 2024

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 ...

@KristjanESPERANTO
Copy link
Contributor

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 😅

@bugsounet
Copy link
Contributor

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

@khassel
Copy link
Collaborator Author

khassel commented Jan 22, 2024

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).

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.

None yet

5 participants