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

(simatec) Resposive Design added #2248

Merged
merged 3 commits into from
Oct 23, 2024
Merged

Conversation

simatec
Copy link
Contributor

@simatec simatec commented Oct 21, 2024

No description provided.

@asgothian
Copy link
Collaborator

asgothian commented Oct 21, 2024

Testing... please wait :)

Configuration interface looks good (index_m.html).
Tab does not look good (see images below)
Screenshot 2024-10-21 at 21 27 08

Screenshot 2024-10-21 at 21 29 34

Also tested on iPad and Iphone with similar issues.

There is a sweet spot on very small desktop displays where the rendering is kind of ok, but overall, I would request changes on the tab situation.
Screenshot 2024-10-21 at 21 31 02

@simatec
Copy link
Contributor Author

simatec commented Oct 21, 2024

OK i fix this. My test was without devices

@simatec
Copy link
Contributor Author

simatec commented Oct 21, 2024

Can you take some full screenshots of the problems?
Preferably the following variants from the developer console:

  1. desktop
  2. ipad mini
  3. Iphone 12 Pro

@asgothian
Copy link
Collaborator

I will see what I can do.

@simatec
Copy link
Contributor Author

simatec commented Oct 21, 2024

Here on my Dev-iob

Tab Desktop:
image

Tab Ipad Mini
image

Tab Iphone Pro 12
image

Config Desktop
image

Config IPad Mini
image

Config IPhone Pro 12
image

@asgothian
Copy link
Collaborator

Screenshot from Firefox with
Screenshot 2024-10-21 at 21 45 38

Iphone 11 Pro
Screenshot 2024-10-21 at 21 44 58
Screenshot 2024-10-21 at 21 45 57

iPhone 12 pro
Screenshot 2024-10-21 at 21 46 31

Screenshot 2024-10-21 at 21 46 50

IPad

Screenshot 2024-10-21 at 21 47 19 Screenshot 2024-10-21 at 21 47 36 Screenshot 2024-10-21 at 21 47 51

IPad Mini
Screenshot 2024-10-21 at 21 49 09
Screenshot 2024-10-21 at 21 49 26
Screenshot 2024-10-21 at 21 49 43

Full HD
Screenshot 2024-10-21 at 21 50 49

@simatec
Copy link
Contributor Author

simatec commented Oct 21, 2024

Which Admin version are you running? The changes are only available as of 7.2.6

@asgothian
Copy link
Collaborator

7.1.5 here. The changes do need to be functional on 7.1.5 too, else we have to shelve them until 7.2.6 goes into stable.

@simatec
Copy link
Contributor Author

simatec commented Oct 21, 2024

Yes, the changes are only available from Admin v7.2.6. This is in the Latest. So you could also go to the Latest.

But it's your decision... I'll take another look at the devices.

@asgothian
Copy link
Collaborator

thanks for all the help. I really appreciate it.

I'll discuss it with @arteck, and we either pull it to the current GitHub version or make a branch on the official repo which we can then merge in later, so you won't have to deal with it either way.

A.

@simatec
Copy link
Contributor Author

simatec commented Oct 21, 2024

Can you test it with Admin v7.2.6 and give me feedback? So that I know what still needs to be adjusted.

I don't currently have another Zigbee stick. Mine only runs productively

@asgothian
Copy link
Collaborator

asgothian commented Oct 21, 2024 via email

@simatec
Copy link
Contributor Author

simatec commented Oct 22, 2024

Thanks for the test... Except for Devices, it looks pretty good I think. I'll think about how I can simulate the devices without a stick.
Do you have any idea how I can create any virtual devices for the test?

@asgothian
Copy link
Collaborator

asgothian commented Oct 22, 2024

As long as you have a coordinator you can use to start the adapter, there are two possible paths for you - one with patching admin.js, the other without.

In theory, you should be able to just copy in the shepherd.db from your live system, and start the adapter with the checkbox "Den Start des Adapters mit inkonsistenter Konfiguration erzwingen(nicht empfohlen)." checked. It will generate all the devices listed in the database, but not be able to communicate with any.

with patching admin and without copying any files: patch admin.js in one place:

  • patch showDevices (line 500ff): insert the following code at the top of the function, right after the definition of html
    let dev = {};
    dev.common = {}
    dev.common.name = 'TG1';
    dev.common.type = 'group';
    dev._id='abc';

html += getGroupCard(dev);
html += getGroupCard(dev); 
html += getGroupCard(dev); 
html += getGroupCard(dev); 
html += getGroupCard(dev); 
html += getGroupCard(dev); 

Without being able to start the adapter I see no chance to test this.

Getting virtual devices is easy enough - getting them to show with the adapter not running is not so easy, unfortunately. I am not sure how that would be done.

PS: I did another test. If you patch the showDevices function in the given manner, you can actually get the devices to show even if you just start the adapter with no Koordinator and no valid configuration. For this to work, you need a second patch: in the function getDevices, (line 755 ff) you need to also call showDevices if the sendTo returns an error.

@asgothian
Copy link
Collaborator

asgothian commented Oct 22, 2024

Sorry for the piecemeal information. I made a number of tests, and had an inconsistent environment in the meantime. Best option for testing is a patched admin.js:

patch show Devices (line 500ff) to include

    let dev = {};
    dev.common = {}
    dev.common.name = 'TG1';
    dev.common.type = 'group';
    dev._id='abc';

html += getGroupCard(dev);
html += getGroupCard(dev); 
html += getGroupCard(dev); 
html += getGroupCard(dev); 
html += getGroupCard(dev); 
html += getGroupCard(dev); 


and getDevices (line 755+)
to be

function getDevices() {
    getCoordinatorInfo();
    sendTo(namespace, 'getDevices', {}, function (msg) {
        if (msg) {
            if (msg.error) {
                showMessage(msg.error, _('Error'));
                showDevices();
            } else {
                devices = msg;
                showDevices();
                getExclude();
                getBinding();
            }
        }
    });
}

this should give you 6 devices loo
Screenshot 2024-10-22 at 12 19 28
king like this:

@simatec
Copy link
Contributor Author

simatec commented Oct 22, 2024

I have fixed the problems... Please check if it works for you.

@asgothian asgothian merged commit a08be0d into ioBroker:master Oct 23, 2024
4 of 11 checks passed
@asgothian
Copy link
Collaborator

It works now - merged

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.

2 participants