MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    (2.1.0, API) Revising the Show/Hide mechanism

    Scheduled Pinned Locked Moved Upcoming Features
    14 Posts 5 Posters 14.1k Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • MichMichM Offline
      MichMich Admin
      last edited by

      Agee! I’ll make sure to add that to the documentation.

      1 Reply Last reply Reply Quote 0
      • MichMichM Offline
        MichMich Admin
        last edited by

        Method is implemented. See documentation:
        https://github.com/MichMich/MagicMirror/tree/develop/modules#thishidespeed-callback-options
        https://github.com/MichMich/MagicMirror/tree/develop/modules#thisshowspeed-callback-options
        https://github.com/MichMich/MagicMirror/tree/develop/modules#visibility-locking

        J 1 Reply Last reply Reply Quote 4
        • J Offline
          Jopyth Moderator @MichMich
          last edited by Jopyth

          @MichMich Did you have any concerns about making this an opt-out instead of an opt-in? I.e. make the default options {this.identifier} instead of {}. Or is there a specific reason against it? The overall concept seems reasonable, if we assume the meaning of the hide() method always was to “keep this module hidden until I want it to reappear”.

          I do not think anyone does something like hiding module A from module B and then purposely showing module A again from module C. This is the only way I think of, which would make the default option using the modules identifier weird.

          Helpful sticky: How to troubleshoot

          strawberry 3.141S 1 Reply Last reply Reply Quote 0
          • strawberry 3.141S Offline
            strawberry 3.141 Project Sponsor Module Developer @Jopyth
            last edited by

            @Jopyth one way would be hide a module with the scheduler and show it again with the remote control or voice or something else

            Please create a github issue if you need help, so I can keep track

            1 Reply Last reply Reply Quote 1
            • MichMichM Offline
              MichMich Admin
              last edited by

              @Jopyth: The problem is that there is no way to find out which module requested the hide method. Therefor I can’t use that identifier by default. This must be provided by the module itself.

              1 Reply Last reply Reply Quote 0
              • J Offline
                Jopyth Moderator
                last edited by

                Oh, I see. My this.identifier would have been the identifier of the module to be hidden.

                Helpful sticky: How to troubleshoot

                MichMichM 1 Reply Last reply Reply Quote 0
                • MichMichM Offline
                  MichMich Admin @Jopyth
                  last edited by

                  @Jopyth exactly. Wich wouldn’t make much sense.

                  1 Reply Last reply Reply Quote 0
                  • 1
                  • 2
                  • 1 / 2
                  • First post
                    Last post
                  Enjoying MagicMirror? Please consider a donation!
                  MagicMirror created by Michael Teeuw.
                  Forum managed by Sam, technical setup by Karsten.
                  This forum is using NodeBB as its core | Contributors
                  Contact | Privacy Policy