"Display on device" module setting doesn't work and doesn't make sense IMO
- Status
- Closed
- Subject
- "Display on device" module setting doesn't work and doesn't make sense IMO
- Version
- 26.x
27.x - Category
- Usability
- Developer Training
- Feature
- Admin Interface (UI)
Modules - Resolution status
- Fixed or Solved
- Submitted by
- Gary Cunningham-Lee
- Volunteered to solve
- Olivier Kango
- Lastmod by
- Josue Zirimwabagabo
- Rating
- Description
First, the simple problem: the module visibility preference "Display on device" doesn't seem to work. I tested setting a module to "Desktop" only and "Print" only and it still displayed on my laptop.
Second, I think the thinking behind this is faulty. I don't understand why a site administrator would want a module to only display to people using a desktop PC and not to laptop users. I'm joking there because I assume the thinking wasn't really about the device but about the display resolution. was that "desktop" means larger displays and laptop means displays smaller than larger ones, or some breakdown like that. But this doesn't really work. My laptop's recommended resolution is 2560 x 1440, which is more than a lot of desktop displays. Similarly there is a lot of overlap between Mobile (phones) and Tablet resolutions. And again, there is no logic, as far as I know, to differentiate between these in regard to module display except on the basis of screen size/resolution.
Maybe user agent strings could be used to control module display, as listed on https://deviceatlas.com/blog/list-of-user-agent-strings for example, but even here there is no distinction between desktop and laptop, and I don't know what the rationale would be for controlling this way other than related to display size.
I don't know what the method was for the Tiki site to identify what type of device was being used but I suggest the module option be changed to explicitly target screen sizes, which would use the standard practice of media queries and would also make sense from the admin point of view. Actually this would just put a gui on top of the Bootstrap display classes (https://getbootstrap.com/docs/5.3/utilities/display/#hiding-elements, https://getbootstrap.com/docs/5.3/utilities/display/#display-in-print), so should be an easy fix. Instead of listing Mobile, Tablet, Laptop, Desktop, and Print, the dropdown could list "Hidden on all, Hidden only on xs, Hidden only on sm, Hidden only on md, Hidden only on lg, Hidden only on xl, Hidden only on xxl, Visible on all, Visible only on xs, Visible only on sm, Visible only on md, Visible only on lg, Visible only on xl, and Visible only on xxl".
This is a longer list but corresponds to reality. A help block can give info about what the sizes mean. Similarly, there are Bootstrap classes for print display that can be incorporated into this. (In that connection, maybe there is no need for the Tiki-specific "display_on_print" class that seems to be redundant because of these Bootstrap classes.)
I suggest fixing this quickly or removing it and starting fresh because IMO it could give to new Tiki site admins the impression that we don't know what we're doing.
- Solution
- Workaround
- Importance
- 9
- Easy to solve?
- 6
- Priority
- 54
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
Accessing the Tiki instance that demonstrates this bugThe URL for the show2.tiki.org instance that demonstrates this bug is at: http://chibaguy-342-8595.show2.tiki.org. Note that if you get a popup asking for a username/password, please just enter "show" and "show". This is different from the initial login and password for a new Tiki which is "admin" and "admin".
For the install log, see http://chibaguy-342-8595.show2.tiki.org/info.txt
Note that if you see PHP errors or a Tiki claiming to be missing third party software, the instance creation is probably not finished. Please wait a couple minutes and reload.
SnapshotsSnapshots are database dumps of the configuration that developers can download for debugging. Once you have reproduced your bug on the show2.tiki.org instance, create a snapshot that can then be downloaded by developers for further investigation.
Snapshots can be accessed at: http://chibaguy-342-8595.show2.tiki.org/snapshots/. Note that if you get a popup asking for a username/password, please just enter "show" and "show".
Create new snapshot - Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is currently unavailableUnable to connect to show.tikiwiki.org. Please let us know of the problem so that we can do something about it. Thanks.
- Ticket ID
- 8595
- Created
- Monday 19 February, 2024 08:18:47 UTC
by Gary Cunningham-Lee - LastModif
- Monday 05 May, 2025 19:31:06 UTC