Git Product home page Git Product logo

Comments (10)

marcosps avatar marcosps commented on July 17, 2024

@matthiasclasen is this a good start point to contribute to portals?

from xdg-desktop-portal.

matthiasclasen avatar matthiasclasen commented on July 17, 2024

Sorry, didn't see this question. I don't know enough about contacts apis to say how easy it will be. But you shouldn't let that stop you

from xdg-desktop-portal.

mjog avatar mjog commented on July 17, 2024

From the GNOME side, it would be good to have a Folks backend that implements access via the portal, so apps already using Folks out of the box can keep on doing so unmodified when running sandboxed.

from xdg-desktop-portal.

mjog avatar mjog commented on July 17, 2024

Hmm, so some people running Geary are having issues with EDS version mismatches between the package and the host, and I think the correct fix for that would be to have this portal implemented. If there was as suggested a Folks backend for it, then it should start Just Working™ with such a portal installed. For KDE apps, I imagine an Akonadi client API backend could similarly be added?

For Geary, the minimum requirements would be as follows:

  • Represent contacts with VCard-like capabilities
  • Represent a photo for contacts
  • Search for a contact using some known details (email)
  • Lookup a contact with an opaque ID
  • Create a new contact using some known details (name, email)
  • Display a contact's details
  • Update a contact using some known details (favourite)
  • Signals for contacts added/modified/deleted
  • Performant for rapid/large number of lookups

The Create action would likely want to want to open the desktop's default contacts app (PIM) to allow the user to implicitly request permission to add the contact to their database - it's not saved until they click Create in the PIM. The Display action would similarly open the contact in the desktop's default PIM, so applications don't need to reinvent a complete contact viewer every time. I'm not sure how permissions for Update would be managed - can we assume once we have access to contacts we also have permission to update existing contacts?

The above assumes a single contacts database. Some apps like Contacts and Evo support multiple address books and so having a representation of these, as well as a way of listing/creating/getting the default/etc would also be needed.

I figure VCard despite being terrible is the least-common-denominator serialisation format and so should be used for contact transmission over the bus, but avatars could be sent as raw RGB (pixbuf?) data to avoid the Base64 encoding overhead, or maybe as a sandbox-accessible file handle?

@matthiasclasen Given EDS/Folks are not GTK APIs, would it still be fine to pull those deps in to xdg-desktop-portal-gtk? This wouldn't be a problem for KDE presumably, since the portal there seems KDE-specific and hence shouldn't have a problem depending on Akonadi.

@marcosps did you make a start on this yourself?

from xdg-desktop-portal.

marcosps avatar marcosps commented on July 17, 2024

@mjog unfortunately not, and right now I don't have time to invest in flatpak... So feel free to assign other developers to work on this task.

from xdg-desktop-portal.

matthiasclasen avatar matthiasclasen commented on July 17, 2024

I've been liberal in using gnome plumbing in the 'gtk' portal backends. They try to fall back where possible, but if they functionality can't be provided without gnome, then just not providing that portal is fine too.

from xdg-desktop-portal.

mjog avatar mjog commented on July 17, 2024

@marcosps okay, no problem.

@matthiasclasen Sounds good. Do you have any comments about the requirements above? Do they seem too expansive for a portal?

from xdg-desktop-portal.

matthiasclasen avatar matthiasclasen commented on July 17, 2024

"Display a contacts details" seems out of scope for a portal. I mean, the portal wll certainly display a contact in some form, so the user can make a decision on whether to allow the app to use it or not, but displaying it is a side-effect of accessing it, not a separate portal request.

"Signals for added/modified/deleted" implies a permanent connection, which can be done (see various "Session" things we have), but makes everything more complicated. I might leave that out at first.

from xdg-desktop-portal.

mjog avatar mjog commented on July 17, 2024

Okay, will keep that in mind, thanks!

from xdg-desktop-portal.

mjog avatar mjog commented on July 17, 2024

I've put up a RFC for a possible public API for the portal over at #413 - comments welcome!

from xdg-desktop-portal.

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.