openlab-at-city-tech / webworkqa

WeBWorK integration for WordPress and BuddyPress
GNU General Public License v2.0
4 stars 2 forks source link

Can't add alt text on mobile #122

Closed bree-z closed 6 years ago

bree-z commented 6 years ago

I can add images on mobile, but I can't add alt text. There's nowhere to add it when I upload and after I click the Insert button, I get the message "You must supply alt text..." but there's no alt text field to add it.

I'm using iPhone 7, iOS 11.3.1.

mobile_alttext

boonebgorges commented 6 years ago

Thanks for the report and screenshot. I believe I've fixed - please have a look.

bree-z commented 6 years ago

Thanks, Boone. Unfortunately image uploads seems to have broken. The 'Select Files' button isn't working on desktop or mobile. And when I try to drag and drop on desktop, it just opens the image file in my browser tab but doesn't upload it.

boonebgorges commented 6 years ago

Are we having fun yet? I have just pushed a fix.

bree-z commented 6 years ago

Thanks, Boone. Image uploads are working again, but I still can't alt text on mobile. I tried clearing my cache and still see the same thing.

img_7154

boonebgorges commented 6 years ago

Working for me on various mobile devices.

My suspicion is that you haven't really cleared your cache. It would be Applesque to have a "clear cache" button that doesn't really do what it advertises, "for the good of the user".

@moui72 Can you break the tie please?

moui72 commented 6 years ago

I'd like to but I'm not able to use the file selector. Probably it's a sticky cached file. I'll try again in a bit.

Android >7, chrome >66

bree-z commented 6 years ago

I tried again with no luck. :(

boonebgorges commented 6 years ago

Hm, not sure what to do. I can't fix something that I can't reproduce. Bree, do you have another device you could test with, to see if it's tied to your phone?

bree-z commented 6 years ago

I tested on an Android, and it worked, with a few glitches that may have been the fault of the phone. When I used an existing pic, it seemed OK, but didn't work if I took a new photo. Here's what happened:

Hopefully this helps!

imageuploadstep1

imageuploadstep2

boonebgorges commented 6 years ago

Hm. The fact that it worked after a phone restart helps to bolster the hypothesis that it's cache related.

The crash-on-screenshot is a phone issue, I guess. The neverending-spinner issue in your second photo is probably a network latency issue, though it's not possible to tell without debugging info (which I have no idea how to collect on an actual phone).

I've done some pretty extensive testing on an iOS device, so I'm fairly sure it's not specific to the platform. The evidence suggests that it's something specific to your device(s). Without corroborrating evidence from other users, I'm not sure whether we can break the tie.

In the current state, I'm unsure what to suggest. Obviously we don't want to launch with something that's broken for many/all users. But pulling it out at this point will be hard, as the new interface touches lots of things. Any thoughts or additional testing from the team would be welcome.

bree-z commented 6 years ago

Thanks, Boone. Sorry I couldn't add more certainty! I did try one last thing, which was to download Chrome on my Bulgarian iPhone and try with a fresh version of Chrome. I did this on my US iPhone (and tried to clear the cache twice) and it didn't work. And, on my Bulgarian phone it also didn't work. I still don't see any alt text fields.

Just wondering whether @moui72 @jennaspevack and @drdrew42 would mind helping out here? I've exhausted all my devices!

Many thanks!

Just to summarize, we want to be sure users can add alt text when uploading an image via mobile. It wasn't working properly, and Boone fixed it. It's working for him, but due to what appear to be caching issues I can't get it to work properly on either of my two iPhones. I was able to get it to work twice on an Android, with existing photos but not new photos. It's a crappy phone though so it might be a problem with the phone itself.

boonebgorges commented 6 years ago

Thanks, @bree-z. To be clear about "I still don't see any alt text fields":

What you should see - When you have selected an image - the box at the upper right is checked and it's highlighted in blue - the right-hand "drawer" that has image data (Title, Alt Text, etc) should appear.

What Bree sees - The image is selected, but the "drawer" does not appear. https://github.com/livinglab/webwork-for-wordpress/issues/122#issuecomment-393615779

boonebgorges commented 6 years ago

@bree-z One more thing - if you are able, you could try setting this up https://stackoverflow.com/questions/7242997/is-there-a-way-to-debug-javascript-in-the-iphone-ios-safari-browser to see if you detect any relevant JS errors.

drdrew42 commented 6 years ago

well, I'm not being properly redirected now when I use the "Ask for Help" button - I'm not getting a new tab, and I'm not being presented with the opportunity to ask a question... is "http://user:pass@openlabdev.org/webwork-playground/?webwork=1" the right URL still?

I'm also not getting the drawer when I upload a photo (either new photo or from the photos already on my phone...)

iPhone X :: iOS 11.3.1 (15E302)

boonebgorges commented 6 years ago

is "http://user:pass@openlabdev.org/webwork-playground/?webwork=1" the right URL still?

Yes, with the correct user and pass swapped in.

I'm also not getting the drawer when I upload a photo (either new photo or from the photos already on my phone...)

Can you please tell me exactly what you see, or provide a screenshot? After uploading, does it switch to the My Uploaded Files tab? When that happens, does the newly uploaded photo appear as "highlighted" (outlined in blue, with a check in the upper right)?

boonebgorges commented 6 years ago

All - I have added some debug alerts, so that you who are seeing a problem can help me narrow down what might be happening. You should see two alerts:

  1. When clicking Add Images for the first time on pageload, an alert should read located frameSelection
  2. You should see an alert adding visible class when an image is "highlighted", which happens in two instances: a. you manually click an already-uploaded image on My Uploaded Files, or b. you successfully complete a photo upload from your device (WP should auto-select the newly uploaded file

Please let me know if you see them both, and if not, the exact steps you took. (It could also be that you get a different result for 2a and 2b, which would also be helpful to know.)

drdrew42 commented 6 years ago

Okay, so steps followed:

I switched to the laptop, both photos were already there. I was able to add alt text and post them.;

drdrew42 commented 6 years ago

d9fec636-d0ab-4043-b4e2-77870ce36f68

Screenshot

drdrew42 commented 6 years ago

With the debug added, now I have successfully added alt-text when uploading a freshly-taken photo with my phone camera. The drawer appeared automatically after I closed the "adding visible class" popup.

boonebgorges commented 6 years ago

Thanks for the details, @drdrew42

With the debug added, now I have successfully added alt-text when uploading a freshly-taken photo with my phone camera. The drawer appeared automatically after I closed the "adding visible class" popup.

I did a small amount of rearranging when adding the debug code that might have resulted in the change. @bree-z could you please have (yet) another look?

bree-z commented 6 years ago

Just tested, and I still see the drawer and can add alt text!

boonebgorges commented 6 years ago

Thanks, @bree-z. I'm going to close this ticket in the hopes that we never have to think of it again.