Giter Site home page Giter Site logo

Comments (4)

kraftner avatar kraftner commented on September 15, 2024

@franz-josef-kaiser and me seem to agree that option 3, "outright refuse to upload the second avatar" is the way to go.

from wcm-avatar.

franz-josef-kaiser avatar franz-josef-kaiser commented on September 15, 2024

As discussed in @kraftner office yesterday:

  • Outright deleting an attachment if another one is present is unexpected behavior. To make this a viable option, the plugin also would need to prompt the user if they really want to do this and possibly offer an "undo" step. This would make the process much more complicated as the attachment post would need to go into trash, which then depends on the config settings and it might not be clear to the user that setting zero trash days or deactivating revisions will not allow an "undo" step. The chance that the user will learn this by "try, fail, blame plugin author, never read docs" is high and too risky. Also there would need to be additional UI elements, etc. making the code even more complex with little to gain.
  • Remove the link between avatar attachment and user from both ends: Currently the connection via IDs gets disconnected on only one end. @kraftner please clarify: the connection "attachment⇒user" stays, but the user only has a single meta entry, correct? If so, then this actually is expected behavior and correct. I remember that I did this to make history of previous avatars/ logos possible. Maybe I just thought about – I am not completely sure. We might want to consider leaving it "as is", but make this behavior consistent and optional. Read: add a filter to not delete attachments, add a ticket to allow the user to browse their history of previous avatars, like Gravatar allows to decide which avatar you want to use for which email-account. This should then go into a second issue.
  • Outright refuse to upload the second avatar: This is what we decided now and the focus of this issue should stay with this. It is unexpected if you upload two avatars that you see your old one in one tab, then reload and get presented a new one. Forcing the user to actively click the "trashbin"-icon in the upper right makes usage more clear. We might consider using the Pointers API to tell the user where they have to click. WP.SE answer from @Giuseppe-Mazzapica on this topic.

from wcm-avatar.

kraftner avatar kraftner commented on September 15, 2024

Concerning the second point:

the connection "attachment⇒user" stays, but the user only has a single meta entry

Yes.

from wcm-avatar.

franz-josef-kaiser avatar franz-josef-kaiser commented on September 15, 2024

Done with 30378c7 and c044b60

from wcm-avatar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.