Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#271 2025-02-18 19:13:05

giz
Plugin Author
From: New Zealand
Registered: 2004-07-26
Posts: 432
Website GitHub Twitter

Re: adi_matrix – Multi-article update tabs

Thanks, Bloke. I’ll poke it on my test site (which includes Hive 4.9 as an option)…

(I think link is better than button in this context – a button does stuff to the page, a link goes elsewhere).

In my efforts I’ve omitted the Dark/Light mode button as I find it redundant/cluttering; this functionality is better left to the user’s OS settings. How do others feel? Controlling Light/Dark mode is typically trivial in css — but there is a caveat; if plugin-injected css includes colour styling, there’s a good chance Light/Dark mode will break.

I did some digging on my textarea style attributes in a matrix: <textarea name="article_35[keywords]" cols="18" rows="5" class="mceNoEditor" style="overflow: hidden; overflow-wrap: break-word; resize: none; text-align: start; height: 135px;"></textarea>. Maybe .mceNoEditor offers an insight to how/where the injection is occurring?

Using 3 rows for textareas in a matrix works without any fuss :) On the other hand, Date and Time fields will always struggle to be compact, no matter the context. Sighs.

Last edited by giz (2025-02-18 19:13:33)

Offline

#272 2025-02-18 21:18:38

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,427
Website GitHub

Re: adi_matrix – Multi-article update tabs

giz wrote #339097:

(I think link is better than button in this context – a button does stuff to the page, a link goes elsewhere).

I concur so I’ll probably flip it to a link and stick it at the end of the matrix select dropdown.

In my efforts I’ve omitted the Dark/Light mode button as I find it redundant/cluttering; this functionality is better left to the user’s OS settings.

I think it’s reasonable to assume that if someone has set their operating system to auto-switch or always be dark or light, that apps track that setting likewise. However, I’ve seen many apps that offer the options of 1: Light, 2: Dark, 3: Follow system in their settings. i.e. very few at the app level have a dedicated switch to automatically track daylight hours, they just leave it to the system to pass that info along.

That gives users a good combination of options because they can override the OS light/dark mode that’s currently in force if they really don’t like the way a particular app has implemented their theme. But as you say, unless the app is careful in how it handles the rules, it can lead to weirdness like we have in this plugin where part of the UI follows the system while other parts take the app’s visual mode into account.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#273 2025-02-19 00:01:19

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,631
Website

Re: adi_matrix – Multi-article update tabs

giz wrote #339097:

In my efforts I’ve omitted the Dark/Light mode button as I find it redundant/cluttering; this functionality is better left to the user’s OS settings. How do others feel? Controlling Light/Dark mode is typically trivial in css — but there is a caveat; if plugin-injected css includes colour styling, there’s a good chance Light/Dark mode will break.

That is why I suggested the use of a basic set of core custom properties(/textpattern/textpattern.css) but that still seems to break in Hive somehow.

Personally I much prefer the choice to be left to the OS, e.g if the user choice is “light mode”, use that and vice versa. If the user prefers has made the choice of automatically tracking day/night, respect that. It seems very strange to me to have your OS set to “dark mode” (“dimming”) but then to prefer a UI for a specific app to be display in light mode (back to “blinding”).

My biggest complain about 1Blocker is the app UI set to always dark. (and I have a horrible time trying to read anything in it. Luckily the application is very good at what it is designed to do, and accessing the app UI is something that I only need once every in a while).

I did some digging on my textarea style attributes in a matrix: <textarea name="article_35[keywords]" cols="18" rows="5" class="mceNoEditor" style="overflow: hidden; overflow-wrap: break-word; resize: none; text-align: start; height: 135px;"></textarea>. Maybe .mceNoEditor offers an insight to how/where the injection is occurring?

As noted above, that is Hive autosize.js. That inline style should be gone now that those textarea have .code class added.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#274 2025-02-19 00:10:05

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,427
Website GitHub

Re: adi_matrix – Multi-article update tabs

Haha, yeah, I have apps like that. Unusable in one mode or the other. You have kind of justified the reason for having an app-specific override, exactly like I posited: if an app like 1Blocker has a shoddy implementation of one particular mode, you could choose to override it so you at least have a chance to use it at all times of day. If they’d provided a switch.

But I agree that it is (and should be) an exception, as 99% of the time, apps should be well-designed enough that following the system mode works. Set and forget.

I wouldn’t lose any sleep if our lightbulb switch vanished in Hive, and Txp properly followed the system mode by default.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#275 2025-02-19 00:13:40

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,631
Website

Re: adi_matrix – Multi-article update tabs

Bloke wrote #339093:

Oops, thank you. Yes, matrix admin is publisher only. Patched.

That is a little unfortunate… I would expect a managing editor to be allowed (as in, that is a person busy with the day-to day managing)

Bloke wrote #339098:

I concur so I’ll probably flip it to a link and stick it at the end of the matrix select dropdown.

As is at time of writing, first in flow is a little odd (main action on that panel is creating / managing matrices). Placing it after the select widget seen better. Possibly add some spacing between select combo and link-button? If the select combo comes first, set some margin-end on the <select />: #matrix_id { margin-inline-end: var(--txp-spacing, 1em); }.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#276 2025-02-19 00:16:16

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,631
Website

Re: adi_matrix – Multi-article update tabs

Bloke wrote #339100:

Haha, despite not seeing a need for deviating from the OS setting, you have justified the reason for having an app-specific override, exactly like I posited: if an app like 1Blocker has a shoddy implementation of one particular mode, you could choose to override it so you at least have a chance to use it at all times of day. If they’d provided a switch.

No I see it as a bug that should be fixed, and I have reported it to the developers (“we’ll consider it”; and then they lost 1 star in the Appstore rating). If you consider that your app should override default OS behaviour, included that as an option.

Last edited by phiw13 (2025-02-19 00:18:34)


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#277 2025-02-19 00:17:06

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,427
Website GitHub

Re: adi_matrix – Multi-article update tabs

Definitely. Apps should work in both modes. I did edit my post above but it crossed with your reply, sorry.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#278 2025-02-19 00:19:24

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,427
Website GitHub

Re: adi_matrix – Multi-article update tabs

phiw13 wrote #339101:

That is a little unfortunate… I would expect a managing editor to be allowed.

It’s one line of code change. If you think it has value to open it up to both, that’s fine by me.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#279 2025-02-19 01:08:42

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,427
Website GitHub

Re: adi_matrix – Multi-article update tabs

Bloke wrote #339104:

It’s one line of code change. If you think it has value to open it up to both, that’s fine by me.

Done. As is the Prefs link.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#280 2025-02-19 02:15:21

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,631
Website

Re: adi_matrix – Multi-article update tabs

Bloke wrote #339106:

Done. As is the Prefs link.

Thank you 🙏.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#281 2025-02-19 16:10:56

giz
Plugin Author
From: New Zealand
Registered: 2004-07-26
Posts: 432
Website GitHub Twitter

Re: adi_matrix – Multi-article update tabs

phiw13 wrote #339099:

As noted above, that is Hive autosize.js. That inline style should be gone now that those textarea have .code class added.

autosize.js isn’t used on my test site, even if Hive is selected as the active theme.

Last edited by giz (2025-02-19 16:11:58)

Offline

#282 2025-02-20 15:58:14

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,427
Website GitHub

Re: adi_matrix – Multi-article update tabs

giz wrote #339108:

autosize.js isn’t used on my test site, even if Hive is selected as the active theme.

Well if it isn’t autosize.js then something must be interfering and adding the inline styles, because the plugin doesn’t do it. The style rules on my test site were identical to the ones you posted, and they went away after the addition of the code class to the container.

It is annoying we need to specify code for a box that doesn’t contain code, but needs must.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#283 2025-02-20 16:07:01

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,427
Website GitHub

Re: adi_matrix – Multi-article update tabs

In the meantime, are you all happy enough that I can bundle this up as an actual release, or would you rather I wait a bit, while we see if there are any more plugin style rules we can eliminate?

Also, does it work okay with glz_cf and TinyMCE (both new installs and upgrades)? I haven’t tested either, just left it as it was in the original plugin.

The styling of the first column in the dark mode color when light mode in Hive is switched on is annoying, but if there’s really no sane workaround, we’ll have to live with it for now.

Last edited by Bloke (2025-02-20 16:09:02)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#284 2025-02-20 22:33:38

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,631
Website

Re: adi_matrix – Multi-article update tabs

Bloke wrote #339114:

It is annoying we need to specify code for a box that doesn’t contain code, but needs must.

Idea: Hive autosize.js includes / adds a second class to the override: no-autosize that can be used for exactly the purpose we need here. That class does nothing otherwise (at theme Hive level). A plugin could use it for additional styling if so wishes

Bloke wrote #339115:

In the meantime, are you all happy enough that I can bundle this up as an actual release, or would you rather I wait a bit, while we see if there are any more plugin style rules we can eliminate?

Also, does it work okay with glz_cf and TinyMCE (both new installs and upgrades)? I haven’t tested either, just left it as it was in the original plugin.

I think it is solid so far. I’ll see if (if) I have some time later today to have a look at glz_cf.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#285 2025-02-20 22:36:47

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,427
Website GitHub

Re: adi_matrix – Multi-article update tabs

phiw13 wrote #339118:

idea: Hive autosize.js includes / adds a second class to the override: no-autosize that can be used for exactly the purpose we need here.

Good shout. That sounds better and more logical than code. I’ll try that. Thank you.

I’ll see if (if) I have some time later today to have a look at glz_cf.

And thank you again. No rush, honest.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB