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

force non-empty profile name also on editing #2243

Open
r10s opened this issue Jul 20, 2024 · 4 comments
Open

force non-empty profile name also on editing #2243

r10s opened this issue Jul 20, 2024 · 4 comments

Comments

@r10s
Copy link
Member

r10s commented Jul 20, 2024

during onboarding, we enforce a profile name to be set.

for consistency, and as same reasons apply, we should not allow to clear the name later on editing.

there are old profiles where we did not have enforced a name on creation. we would enforce them now during editing, if eg. the user only wants to edit the "bio". however, that seems to be a minor, and also android does it that way since some time, without much complains or issues.

cmp deltachat/deltachat-android#3160, deltachat/deltachat-desktop#4042

@zeitschlag
Copy link
Collaborator

zeitschlag commented Jul 21, 2024

We use the TableView-based SelfProfileViewController on an navigation stack, so I see two reasonable ways to achieve this:

  1. Override navigationItem.backBarButtonItem and enable/disable based on the contentof nameCell. (Note to self: Check for Retain Cycles here due to onTextFieldChange) This way, the user wouldn't be able to cancel their name-change, but we'd be sure that they must set the name
  2. Use a Cancel-button on the left and a Save-button on the right and only persist name etc. when users press Save. This way, existing users without a name would still be able to use their blank name (which would interfere with this issue, I guess?). This is also the default when I want to override other peoples usernames. It has two buttons (Save/Cancel)

So I'd opt in for the first way. WDYT?

@r10s
Copy link
Member Author

r10s commented Jul 21, 2024

hm, are disabled "back" buttons a thing in ios? i cannot remember to have seen that somewhere.

so, indeed a bit tricky for a minor thing. a 3rd option is to leave things as is, and adapt android :) let's sleep it over :)

@r10s
Copy link
Member Author

r10s commented Jul 21, 2024

signal/whatsapp/telegram all go for cancel/done, partly delayed until things are really changed (eg. whatsapp shows a back button that changes to cancel/done on changes, not allowing empty profile name as well)

@r10s
Copy link
Member Author

r10s commented Jul 23, 2024

otoh, i am a cancel/done would make avatar selection harder - code wise, but also UI wise as that suddenly needs to be cancelable as well - and user need to remember to hit "done" another time.

might be okay, however, wondering if that all is worth the minor issue we try to fix here.

what about the following:

set the "placeholder" to the original name - and if the user "clears" the name, they'll notice that this is not possible as the original name is shown. when still hitting "okay", do not change the name if new name is empty. this will also result in a smart migration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants