Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#256 2025-02-17 18:34:30

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

Re: adi_matrix – Multi-article update tabs

Is it just me or do the pageby and navigation page links not work? If you open them in a new tab they function fine and show the next page of articles in the matrix, but left-clicking on them just bounces you to the top of the current page and doesn’t alter the URL.

Strange… maybe be some JS interfering somewhere and cancelling the default action or something. But I can’t see where it might be doing that. I swear it used to work.

Last edited by Bloke (2025-02-17 18:37:04)


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

#257 2025-02-17 19:07:47

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

Re: adi_matrix – Multi-article update tabs

Bloke wrote #339081:

Is it just me or do the pageby and navigation page links not work?

D’oh, fixed. Any link inside a container with class txp-navigation is treated as an async JavaScript event by the core textpattern.js, which the plugin doesn’t respond to (wrong plugin type for a start, and even if that’s changed, it’s not wired up for async app_mode).

Last edited by Bloke (2025-02-17 19:08:10)


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

#258 2025-02-17 19:09:17

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

Re: adi_matrix – Multi-article update tabs

Bloke wrote #339080:

I’d love to but I don’t know where it’s coming from!

I’m using glz_cf; it must be the culprit!

Offline

#259 2025-02-17 19:10:13

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

Re: adi_matrix – Multi-article update tabs

giz wrote #339083:

I’m using glz_cf; it must be the culprit!

Maybe, but I’m not using it and there’s still an enforced bunch of inline styles applied to textareas.


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

#260 2025-02-17 19:31:31

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

Re: adi_matrix – Multi-article update tabs

phiw13 wrote #339076:

@ Bloke

Okay, I’ve done all these, except for the aria-labelled-by because I’ll have to read up on how to do it properly. And of course, I’m not sure what to do about the hive dark mode, so that’s pending further discussion, possibly with a mind to changeing core behaviour somehow. Does it need a 3rd switch option? Light, Dark, and Follow System? Maybe ditch the light bulb and add it as a proper pref three-way radio?

Last edited by Bloke (2025-02-17 19:46:06)


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

#261 2025-02-17 19:59:21

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,187
Website GitHub

Re: adi_matrix – Multi-article update tabs

Bloke wrote #339084:

Maybe, but I’m not using it and there’s still an enforced bunch of inline styles applied to textareas.

I think that’s being set by the autosize.js script in Hive. It seems to set the break-word and overflow: hidden, which is also in that injected css.

Bloke wrote #339085:

I’m not sure what to do about the hive dark mode … Does it need a 3rd switch option? Light, Dark, and Follow System? Maybe ditch the light bulb and add it as a proper pref three-way radio?

Could be a good idea in general but maybe then as a cycling button. On another site I did for someone, I did implement a dark-mode / light-mode switch. The site owner posted a question about the site on another (here unnamed) forum, and got a proper dressing down for the ‘brazenness’ of it. Not all forums are as good-natured as this one.


TXP Builders – finely-crafted code, design and txp

Offline

#262 2025-02-17 20:02:48

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

Re: adi_matrix – Multi-article update tabs

jakob wrote #339086:

I think that’s being set by the autosize.js script in Hive. It seems to set the break-word and overflow: hidden, which is also in that injected css.

Ahaaaa. Thank you. Is there any way to turn that behavior off?


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

#263 2025-02-17 20:11:00

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,187
Website GitHub

Re: adi_matrix – Multi-article update tabs

Bloke wrote #339087:

Ahaaaa. Thank you. Is there any way to turn that behavior off?

It turns out you can by setting:

define('no_autosize', true);

in config.php.

However … the textarea is still that high because it’s defined by rows="5" in the textarea attributes (which I guess is where the js is getting the height from). If you set it to rows="3" in adi_matrix, you’ll find you don’t need to switch off autosize.js.


TXP Builders – finely-crafted code, design and txp

Offline

#264 2025-02-17 21:08:04

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

Re: adi_matrix – Multi-article update tabs

I might try and get rid of the rows and stuff altogether in the plugin. It should be up to themes to style, right?


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

#265 2025-02-18 02:17:07

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

Re: adi_matrix – Multi-article update tabs

Bloke wrote #339089:

I might try and get rid of the rows and stuff altogether in the plugin. It should be up to themes to style, right?

the cols and rows attributes, same as size or width and height for image and iframe, have basically a zero specificity so leaving them in won’t limit what a stylesheet can do.

That said, I don’t particularly object them having rows=3. Themes & custom.css can size those as they see fit.

By default, without cols and rows a textarea displays as something like 170px wide and 34px height in Safari , Firefox is a little bigger but with same aspect ratio – aprox. 2 lines tall (depends on font-size, and browser config). Demo here

jakob wrote #339088:

However … the textarea is still that high because it’s defined by rows="5" in the textarea attributes (which I guess is where the js is getting the height from). If you set it to rows="3" in adi_matrix, you’ll find you don’t need to switch off autosize.js.

You can turn off Hive autosize.js for specific textareas by including the class code on the textarea. The script is configured to explicitly ignore those1 – see the textearea on the Pages/Forms/Edit Plugins.

–^–

1 var e=document.querySelectorAll("textarea:not(.code)"); in the script. I had to look it up once to disable the Write panel growing textarea for a client.


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

Offline

#266 2025-02-18 02:24:58

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

Re: adi_matrix – Multi-article update tabs

Bloke wrote #339085:

Okay, I’ve done all these,

Thank you, I’ll test and enjoy later today.

And of course, I’m not sure what to do about the hive dark mode, so that’s pending further discussion, possibly with a mind to changeing core behaviour somehow. Does it need a 3rd switch option? Light, Dark, and Follow System? Maybe ditch the light bulb and add it as a proper pref three-way radio?

I don’t think you need to change Core behaviour, but Theme Hive behaviour. And I am uninterested in implementing such a switch in Sandspace.


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

Offline

#267 2025-02-18 06:52:11

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

Re: adi_matrix – Multi-article update tabs

A general usage question: Is the publisher role the only one to have permission to access the matrix_admin panel? My managing editor user does not / can not see that panel.
Related: If the above is correct and not a bug, then the newly added “edit” button on the matrix panel should not be visible to no-publisher roles.
Related to that “edit” button: use this pattern: (see Themes, Sections, users, etc panel, above the table).

<div class="txp-control-panel">
  <a class="txp-button" href="#">New theme</a>
</div>

Good work with the latest edits and changes, 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

#268 2025-02-18 10:19:36

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

Re: adi_matrix – Multi-article update tabs

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


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

#269 2025-02-18 10:27:35

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

Re: adi_matrix – Multi-article update tabs

phiw13 wrote #339091:

I don’t think you need to change Core behaviour, but Theme Hive behaviour.

Hmmm, without the concept of theme variable support in core, that’s going to be hard work.

Guess we have to live with it for now.


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

#270 2025-02-18 10:33:46

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

Re: adi_matrix – Multi-article update tabs

I added a tentative Prefs link to the admin panel as a shortcut. I’ve put it before the matrix selection dropdown for now. Putting it after the select list made it seem too much like it was a “Go” button for the select list. And putting it beneath the matrix near the Save button seems too much like a random place for it and made it feel like it was a ‘cancel’ button or something.

Any improvements welcome. Is a link better than a button, since it’s, well, a link?

I’ve also messed about with setting a code class on the Keywords textarea and removed the cols attribute. 3 rows now, too. Is that better?

Last edited by Bloke (2025-02-18 13:17:28)


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