Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected image upload locations #12

Open
manton opened this issue Sep 12, 2022 · 6 comments
Open

Unexpected image upload locations #12

manton opened this issue Sep 12, 2022 · 6 comments
Labels
enhancement New feature or request

Comments

@manton
Copy link
Contributor

manton commented Sep 12, 2022

This is a weird edge case I discovered and highlights a difference between the old Micro.blog app and new app. The old app would attach images to a post in the UI but not actually upload the images until the user clicked Post. The new app uploads the images right away as they are attached.

This creates 2 potential problems:

  • If you attach an image, but then go into the settings screen and change to a different blog, when you post, the image URLs will be pointing to a different domain name.
  • If you remove an attached image, it still leaves the image on the server. Less of a big deal but maybe something we should clean up.

These aren't show-stoppers but I think we should discuss and fine-tune this behavior so that it doesn't cause any confusion.

@vincentritter
Copy link
Collaborator

Interesting. This actually came across from Gluon and it's how its been doing it for a while now...

It was like this so you don't have to wait for the post to upload the images, and for a missing feature in this app right now, the ability to inline the images where you want (basically taking the URL of where it was uploaded).

Two solutions:

  • Keep as is. Make sure when the blog is switched to also re-upload the images and also make sure to delete the ones from the last blog (or if deleted). Here we can also then inline the images with extra actions.
  • Remove uploading before actually posting and when you press post it will post everything in the background, immediately closing the post dialog. If there are any errors, we can bring back the post with an error.

I'm keen to go for number one here, for now.

Having this as is, is exactly as Gluon does at the moment and to date had no complaints about it or confusion.

@manton
Copy link
Contributor Author

manton commented Sep 12, 2022

I'm good with starting with 1. You probably haven't heard anything about it because almost everyone just have a single blog… My account is a little unique in that I have a dozen blogs and actually do switch between them pretty often, especially when testing.

@vincentritter
Copy link
Collaborator

Should have used Gluon - it's a good app (was) 🤣

@manton
Copy link
Contributor Author

manton commented Sep 12, 2022

Haha. I did use it sometimes, but I guess not enough! 🙂

And to be clear, this can wait a while… I'm good with things as-is for the beta.

@vincentritter
Copy link
Collaborator

vincentritter commented Sep 12, 2022

Cool. So I'll look at point 1 for now (but not with urgency). We can revisit this and perhaps look at point 2 which might make a nicer experience and we can bring across the same sort of loading indicator, as it posts, on the web.

@vincentritter
Copy link
Collaborator

Following up to this as I've made changes in the "share extension" part of the app that allows image uploads to happen after you press the Post button, which means they won't upload straight away when still composing the post.

Specific code can be found in /stores/models/posting.js and you can see various checks for App.is_share_extension which allows us to skip image uploading, for example here, here and here.

We can look at using this in the main app also after some testing.

I'm pretty happy with the way it works in the share extension.

Would love to have something similar, in the app, to the way "Publishing post" on the Web shows. For example, pressing "Post" will close the post modal, display a nice loading indicator similar to the website (in the corner, or the actual new post button), then either disappear/bring back the button and show a quick message it was all uploaded, or throw an error and bring back the posting screen.

@vincentritter vincentritter added the enhancement New feature or request label Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants