Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2020-07-26 01:20:57

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Image tab - upload behaviour

Have been a bit out of touch with Textpattern for a while, so be gentle!

My query is about Image Tab behaviour when uploading a new image. In TXP 4.5 & 4.6 immediately after uploading an image, the Image Edit tab would be presented to the user.

In TXP 4.7 & 4.8 this is no longer the case. After uploading an image the user stays on the Image List tab (albeit with the new image ticked in the list).

Is this deliberate or am I missing something? When uploading an image I would really want to be in immediate edit mode to set alt text, caption etc. The 4.7/4.8 system forces an extra step into the process. Only when uploading multiple images does remaining on the Image List tab make sense to me.

Related to this … in the olden days I’d plugin-terfere with $step to force a reroute of tab behavour. But now in the modern-ajaxy age is there a callback to do something similar?

Offline

#2 2020-07-26 07:37:10

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,269
Website GitHub

Re: Image tab - upload behaviour

gomedia wrote #324853:

When uploading an image I would really want to be in immediate edit mode to set alt text, caption etc. The 4.7/4.8 system forces an extra step into the process. Only when uploading multiple images does remaining on the Image List tab make sense to me.

That is a very good point. Not sure how easy it is to divert to a different step on completion based on the number of files uploaded, due to the Ajax nature of the multi-upload process. Nor whether it produces inconsistent UX. The same could be true of the Files panel. Maybe Oleg has some thoughts here?

Related to this … in the olden days I’d plugin-terfere with $step to force a reroute of tab behavour. But now in the modern-ajaxy age is there a callback to do something similar?

In the specific case of uploads, you can meddle via JavaScript:

textpattern.Relay.register('uploadEnd', function(event) {
   /// Do some stuff
});

But I’m not entirely sure how you get at the number of files processed. There’s an uploadCount variable but I’m not clever enough to figure out how to access it.


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

#3 2020-07-26 08:22:20

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,078
Website

Re: Image tab - upload behaviour

gomedia wrote #324853:

Is this deliberate or am I missing something? When uploading an image I would really want to be in immediate edit mode to set alt text, caption etc. The 4.7/4.8 system forces an extra step into the process. Only when uploading multiple images does remaining on the Image List tab make sense to me.

Didn’t Oleg originally try something like that (one image -> go to edit panel, multiple images, stay in list view) ? Maybe it became to convoluted ? I could be wrong though, as it was quite a while ago.

that said, I am not sure it is a good idea, though, I suspect it might end up being confusing to the end-user.


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

Offline

#4 2020-07-26 08:29:00

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,269
Website GitHub

Re: Image tab - upload behaviour

phiw13 wrote #324861:

Didn’t Oleg originally try something like that (one image -> go to edit panel, multiple images, stay in list view) ?

I’m pretty sure we did try it, and it either didn’t work reliably or…

I suspect it might end up being confusing to the end-user.

… this.


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

#5 2020-07-26 08:46:21

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

Re: Image tab - upload behaviour

Yes, this change is related to multiple images upload. I’m sure we have discussed it and have not found a better consensus.

Plugin-terfering should be easy, but I need to check the code to recall the details. Uploaded files ids are stored in JS textpattern.Relay.data.fileid object, fwiw.

Offline

#6 2020-07-26 09:42:09

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

Re: Image tab - upload behaviour

Here is a basic (Admin+AJAX) plugin:

script_js(<<<EOS
    textpattern.Relay.register('uploadEnd', function(event) {
        if (textpattern.Relay.data.fileid.length == 1) {
            window.location = 'index.php?event=image&step=image_edit&id='+textpattern.Relay.data.fileid[0];
        }
    });
EOS
, false, array('image'));

Offline

#7 2020-07-27 03:14:59

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: Image tab - upload behaviour

Bloke, phiw13, etc – thank you for the replies.

… it might end up being confusing to the end-user.

Don’t see why it would be, after all we were quite happy with the old behaviour … or so I thought. Maybe I’m just set in my ways.

etc – a very tasty code morsel, most satisfying, & much appreciated!

Offline

#8 2020-07-27 07:12:47

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,078
Website

Re: Image tab - upload behaviour

gomedia wrote #324882:

Bloke, phiw13, etc – thank you for the replies.

Don’t see why it would be, after all we were quite happy with the old behaviour … or so I thought. Maybe I’m just set in my ways.

it is a “now you see it, now you don’t” issue, in that you have a very different behaviour / process depending on the number of files. In the old day, you did not have that problem of course, only one file at a time was / could be uploaded.

Last edited by phiw13 (2020-07-27 07:14:00)


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

Offline

#9 2020-07-27 13:41:49

maverick
Member
From: Southeastern Michigan, USA
Registered: 2005-01-14
Posts: 976
Website

Re: Image tab - upload behaviour

Perhaps in regards to UX and expectations, is there an alternative where the editing options for a single file upload are in the upload interface itself?

Frankly, that would be even smoother and intuitive to my thinking. I click on the upload, select my file, and all the various editing options I would have in Textpattern’s edit screen are available right then and there. I set them and then click upload. I move on.

If I am doing multiple files, then upon selecting the 2nd image the editing feature goes away, or alternately perhaps it remains and allows the entire batch upload to receive the same settings.

Just thinking aloud.

edit

– and thinking further, realizing my ignorance. I had had stepped back from website stuff for a bit. Since then I’ve not done anything with images. So I’ve not used the multi-edit feature since the dev versions. Maybe what I described is how it already works these days. If so, I apologize for my ignorance.

I am still working on getting my sites up to the latest/greatest version. I had just tried updating one of my rather old installs that broke when Dreamhost upgraded their php, and in the process borked the install entirely. So I’m still a bit behind on being able to test how things are currently looking/working.

Last edited by maverick (2020-07-27 14:19:30)

Offline

#10 2020-07-27 16:16:38

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,269
Website GitHub

Re: Image tab - upload behaviour

maverick wrote #324907:

is there an alternative where the editing options for a single file upload are in the upload interface itself?

Only the category at present, which means you can bulk-assign the category at upload.

click on the upload, select my file, and all the various editing options I would have in Textpattern’s edit screen are available right then and there. I set them and then click upload.

If it weren’t for screen real estate restrictions, this might work. Not sure how to lay it out, but if you have ideas here, by all means share them.

If I am doing multiple files, then upon selecting the 2nd image the editing feature goes away, or alternately perhaps it remains and allows the entire batch upload to receive the same settings.

Since you can drag/drop images and files onto their upload buttons, and if you’re multi-selecting images we don’t know how many you’ve picked until you hit ‘Select’ there’s no way we can determine this as you select files. But we could do it afterwards.

Further, I’m not sure how many times you upload a bunch of images that require the same alt text and caption, but I can’t say I’ve ever done it. If I’m missing a use case, please enlighten me.

I did have a conversation (somewhere… here? … GitHub…?) with phiw13 or Kjeld about more sensible defaults when uploading images. Can’t for the life of me remember what we decided, but I think it was something to do with the creation date being read from the file’s datestamp instead of defaulting to ‘now’. Uhhh, maybe. Or reading other standard metadata (if there is any such thing?) and setting defaults to save you having to type stuff again if your images are already pre-processed in Lightroom 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

#11 2020-07-27 19:50:45

maverick
Member
From: Southeastern Michigan, USA
Registered: 2005-01-14
Posts: 976
Website

Re: Image tab - upload behaviour

Bloke wrote #324915:

If it weren’t for screen real estate restrictions, this might work. Not sure how to lay it out, but if you have ideas here, by all means share them.

Valid point. Unfortunately I cannot say I do. I do almost all my work on a laptop or desktop, so I need the reminder there are those uploading images from their phone/tablet. I know there are – I just forget to take that into consideration sometimes.

we don’t know how many you’ve picked until you hit ‘Select’

Ah. Got it. I thought perhaps that as images were added there might be some sort of event triggered you could use.

I’m not sure how many times you upload a bunch of images that require the same alt text and caption.

I was just throwing the multi-edit out as a brainstorm – not really thinking use case. I suppose there might be for someone – seems like there always is. For me, the few times I upload in bulk, being able to edit image size, tags (when they come), ownership, perhaps associate with a custom field (when they come), etc. would be more of a use case. It has been more related to activity pictures for organizations going into a photo gallery.

Offline

#12 2020-07-28 08:49:32

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,269
Website GitHub

Re: Image tab - upload behaviour

maverick wrote #324917:

I thought perhaps that as images were added there might be some sort of event triggered you could use.

If you add one at a time, there probably is.

being able to edit image size, tags (when they come), ownership, perhaps associate with a custom field (when they come), etc. would be more of a use case.

Yes, in the case of tags and custom fields (not author changes – they must be done in multi-edit) it would be handy to pre-select them before upload. So we do need to think about this when the time comes.

activity pictures for organizations going into a photo gallery.

There are plugins out there to help with gallery management. The low-key approach is com_article_image which, while not official yet, is darn handy for adding images directly to articles on the Write panel via drag/drop (or from your already-uploaded images).

You could also give smd_imagery a spin. It’s a slightly bigger brother to com_article_image that still needs a bit of work, but it allows you to fetch images by category from your Images panel and add them directly to the Article Image field or Body/Excerpt fields via templates.

It’s handy for gallery management because you can visit any article and ask it to ‘load’ the images from your body text into the popup panel, you can rearrange them (drag/drop), remove some, add some, and then push the gallery back into the body at the cursor location.

There’s also smd_meta_image which can create images and articles automatically from image metadata stored in IPTC information. So if you’re serious about cataloguing your images in a program like Lightroom, you can just drag a bunch of images in and ask it to parse the metadata to build content on your behalf.

You can map any incoming field to any image/article Txp field and even build your own combo fields if you wish to combine or split data from the incoming images.


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

Board footer

Powered by FluxBB