-
Notifications
You must be signed in to change notification settings - Fork 3
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
Save relevant device info when initially creating/adding a project #289
Comments
additional questions related to this:
Questions arising from the above:
|
Initially, yes. For others in the project to know who you are, the name needs to be written to a project core, so in the case above, the project creation / project add function needs a step to set the device name based on the "global" device info. In the future we might allow peers other than the device owner to set the name (and additional metadata). In this case we would not want to change the "global" device info - this would be a project specific name. There are UX questions around this though - would it cause confusion for users?
Yes, it should change the name for all projects known on the device (not just "active" ones). This needs to be done by writing the project device info.
There are use-cases for this, but we haven't figured out the UX yet, so we're just treating device name as one-per device, and hiding the fact that there is a separate record for each project. The main use-case that I have heard is when a project coordinator wants to name devices, rather than allowing users their own choice. One thing that this helps is being clear about which devices are part of the project - it stops a user renaming their project device name to the name of another device in order to "secretly" remain in the project.
Eventually, yes, For now it can be an internal API only, which is called from within |
Description
When creating a project instance via
MapeoManager
usingcreateProject()
oraddProject()
, the project instance should attempt to write to its deviceInfo store with information fromMapeoManager.getDeviceInfo()
. A couple of ideas for approaching:Pass the device info as a constructor param for
MapeoProject
, which is then used when instantiatingExpose a method on
MapeoProject
to add that info and then call it from the consumer after the instance is created. Maybe in the$member
namespace i.e.project.$member.add(deviceId, info)
. e.g.One potential advantage for 2 is that it could also be used by
MemberApi.invite()
, which lives in theMapeoProject
, We currently don't save the device info if the invite is accepted (currently only update the capabilities). Believe we still need #245 but once that's in place, we can update the implementation like so:if (response === InviteResponse_Decision.ACCEPT) { + await this.#add(deviceId, deviceInfo) // device info would come from rpc invite response await this.#capabilities.assignRole(deviceId, roleId) }
Tasks
The text was updated successfully, but these errors were encountered: