platform-coop-toolkit / coop-map-directory-index

The Map/Directory/Index component of the Platform Cooperative Development Kit.
https://directory.platform.coop
BSD 3-Clause "New" or "Revised" License
1 stars 3 forks source link

Creating an individual profile ignores existing data #127

Closed greatislander closed 4 years ago

greatislander commented 4 years ago

Describe the bug

If a user already has some data in their profile but the profile is not published, they will not be shown existing data during the profile creation flow.

To Reproduce

Steps to reproduce the behavior:

  1. Create an individual profile.
  2. Navigate to 'My profiles'.
  3. Delete the individual profile.
  4. Click 'Create individual profile' and navigate through the profile creation flow.

Relationships (to organizations and social media profiles) are not displayed, leading to duplicates (e.g. two relationships to the same co-op); other content is not displayed, necessitating that it be entered again.

Expected behavior

Existing data and relationships should be shown while navigating through the flow. This would allow a user to unpublish their profile and restore it later if desired.

Additional Context

Not applicable.

greatislander commented 4 years ago

Related: https://github.com/platform-coop-toolkit/coop-map-directory-index/issues/103

@erictheise I'm not sure about #103 after having written this ticket. Since "deleting" a profile doesn't do anything except set User.has_profile to False, I think keeping the social networks would be expected. They should be shown when recreating the profile.

erictheise commented 4 years ago

Given that the language used in profile creation is

Are you sure you want to exit the profile editor and delete all of your information?

as a user I'd expect deletion to delete and not simply unpublish my data, @greatislander. I would expect that after deleting my profile the only individual data left in the system is my email address and password, the bare minimum to keep an account functioning. Perhaps there's a clearer distinction now between account info and profile info that's documented somewhere and I've missed it as it's developed; apologies for the noise if so.

greatislander commented 4 years ago

The other case here, @erictheise, is that many inactive accounts with data exist in the system. If you were to set a password and start a profile creation flow for, say, user ID 34, you would be prompted to enter the user's first and last name even though that data is already present. That's one case that definitely needs to be solved.

In terms of profile deletion, there's currently no implemented way to bail on the profile creation flow so that language is no longer present. Deleting your profile from "My profiles" unpublishes it but keeps the information, and I think there are cases to be made for having both options:

  1. Unpublish your profile (sets User.has_profile to False, leaves entered data intact).
  2. Delete your profile (removes all data and relationships except for email and password).
greatislander commented 4 years ago

In terms of profile deletion, there's currently no implemented way to bail on the profile creation flow so that language is no longer present.

I stand corrected. There's a button that displays a dialog with that language but the functionality was never implemented so it doesn't do anything.