Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Active On, Status No
In the latest commits I’ve rejigged the Plugina panel column order:
- Name
- Version/Modified
- Status
- Author/URL
- Description
- Load order
- Manage actions
Still thinking about the status field. If we retain the toggle wording, we could have any of these options:
- Active: Yes/No
- Status: On/Off
- Status: Active/Inactive [requires new common string “Inactive”]
- Status: Enabled/Disabled [requires new common strings “Enabled” and “Disabled”]
- Something else…?
It’s still confusing to document, and wholly illogical, that to turn a plugin off you have to click ‘Enabled’ or ‘Active’ or ‘Yes’ or ‘On’ :| But without that, we’re into visuals of some kind like sliders or toggles or checkboxes that need to be distinguished from the multi-edit boxes. Nothing is ideal. Further opinions welcome.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Active On, Status No
Bloke wrote #334786:
In the latest commits I’ve rejigged the Plugina panel column order:
Refreshes, the localrepo…refreshes page… look much better, with the more important info upfront. Thanks.
Still thinking about the status field. If we retain the toggle wording, we could have any of these options:
Status: On/Off seems more clear to me, and is in many languages shortish.
It’s still confusing to document, and wholly illogical, that to turn a plugin off you have to click ‘Enabled’ or ‘Active’ or ‘Yes’ or ‘On’ :| But without that, we’re into visuals of some kind like sliders or toggles or checkboxes that need to be distinguished from the multi-edit boxes. Nothing is ideal. Further opinions welcome.
What about a set of radio buttons? That would remove lots of the ambiguity. Granted it takes up some more space. Some theme might want to style it like a toggle thingie (I am no fan of that).
–^–
BTW, whith all your refigging regarding plugin upgrades. That won’t interfere with the ability for the user to manually edit the plugin?
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: Active On, Status No
phiw13 wrote #334787:
Status: On/Off seems more clear to me, and is in many languages shortish.
It’s my preferred option. Might go with that and see what happens.
What about a set of radio buttons?
That could work. As long as we retain the one-click nature of toggling the plugin on and off onclick, that might work quite nicely.
BTW, whith all your refigging regarding plugin upgrades. That won’t interfere with the ability for the user to manually edit the plugin?
Not at all. If you change the local plugin code, the only thing you’ll see is ‘Modified’ added to the Version column. The upgrade is only validated on compatible version number differences.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Active On, Status No
Bloke wrote #334790:
[…] the only thing you’ll see is ‘Modified’ added to the Version column. The upgrade is only validated on compatible version number differences.
Ok, I understand. One thing though: I modified a plugin. But I don’t see any ‘Modified’ label added. Just me ?
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: Active On, Status No
phiw13 wrote #334791:
I modified a plugin. But I don’t see any ‘Modified’ label added. Just me ?
Curious. I just went into one of my installed plugins via the Plugins panel, added a random space to the plugin source code and hit Save. The ‘Modified’ warning appeared alongside the version tag immediately. Hmmm.
Oddly, though, if I go in and remove the same space, the Modified warning doesn’t go away. Further, there appears to be no way to restore a plugin to its original state. I’m sure we used to have a multi-edit option or something that allowed plugins to be rolled back to the old version stored in the DB’s code_restore
column.
We could maybe add that as a hyperlink on the ‘Modified’ text but it’s perhaps a bit too easy then to roll back by mistake. Maybe multi-edit is better. There’s an ‘Update from drive’ option but I assume that’s primarily for pulling code in if you’re editing it outside of Textpattern for version control reasons.
Last edited by Bloke (2023-02-27 09:42:11)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Active On, Status No
Yes, curious. This testing was all with plugins that were installed (some modified) before the latest round of changes. Tomorrow I’ll test on another install and install some plugin first, then modify it.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Online
Re: Active On, Status No
I must have screwed something up then somehow. But the code for detecting changes hasn’t been touched. Just moved a few lines further. 🤔
Incidentally, the code for detecting changes is a simple md5. When a plugin is installed, the restore version is cached in the DB and an md5 of it is stored in a separate column. Each time you view the panel, the real code column is run through MySQL’s MD5 function and compared to the md5 stored in the DB.
What’s odd is I can open a plugin in the Txp admin side and hit save without making any changes and the MD5 function calculates a different value to the one stored, so the Modified appears. Maybe saving strips off trailing spaces, or changes line endings or something.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Active On, Status No
From this GH commit :
Slight issue: plugins that have Options and upgrades available leave a gap where the Options should go. Toggle only alters visiblity, not display so the space doesn’t collapse.
Question: is there any reason why this particular toggle is set to visibility:hidden
when the plugin is inactive? Setting to display:none
would solve the issue above, and I don’t see any reason why not doing it.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: Active On, Status No
I think display: none would be preferable. Just didn’t want to alter it in case it broke anything else. Plus the JavaScript handler would probably need tweaking.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Active On, Status No
Bloke wrote #334818:
I think display: none would be preferable. Just didn’t want to alter it in case it broke anything else. Plus the JavaScript handler would probably need tweaking.
display: none
then!
Why would the JS handler need tweaking? the visibility or display is controlled in the stylesheet, the JS just adds or removes the .active
class on the row.
tr .manage span, tr .plugin-prefs {
visibility: hidden;
}
tr.active .manage span, tr.active .plugin-prefs {
visibility: visible;
}
I don’t think the 1st selector (.manage
) is ever used. This could be simplified…
tr:not(.active) .plugin-prefs { display: none; }
Last edited by phiw13 (2023-02-28 01:52:20)
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: Active On, Status No
Thank you, that seems to work a treat. Committed.
I haven’t pushed it to Phil’s main repo because I don’t have write access, and haven’t got a GitHub-based clone of it so can’t make a PR right now. I’ve opened an issue instead and added the diff patch there.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline