Skip to content

Multiple Emails UI and Integration#27379

Merged
juliusknorr merged 5 commits intomasterfrom
feat/26866/multiple-emails-ui
Jul 15, 2021
Merged

Multiple Emails UI and Integration#27379
juliusknorr merged 5 commits intomasterfrom
feat/26866/multiple-emails-ui

Conversation

@Pytal
Copy link
Member

@Pytal Pytal commented Jun 4, 2021

To Do

  • Rewrite php markup and functionality in Vue apps/settings/templates/settings/personal/persona.info.php
  • Pass initial state from server to client
  • Rewrite js functionality in Vue federationsettingsview.js
    • Save primary email address (with deletion)
    • Federation control
      • With reference to federationscopemenu.js and federationsettingsview.js
      • Override @nextcloud/vue component styles to match non-Vue federation controls
    • Password confirmation
    • Success/Error icon on save
    • Error handling
    • Verification
      • Looks like the verify functionality in apps/settings/js/settings/personalInfo.js line 157 isn't used anymore as it is only shown when both email is not empty and scope is public but scope is never public as found in lib/public/Accounts/IAccountManager.php
      • Not implementing at the moment as it seems unused?
  • Validation
    • Vanilla js validation (e.g. checkValidity())
  • Debounce API calls
  • Additional email functionality
    • Only allow adding an additional email input if all current inputs are valid
    • Add additional email
    • Delete additional email
    • Update additional email
    • Federation control for additional emails
    • Design updates from Jan
      • 3-dot menu on the right of each input field
        • One dropdown entry called "Delete email"
      • Add button with "+" and "Add" label, flush to the right
  • Create constants file (to be kept in sync with lib/public/Accounts/IAccountManager.php
  • Automaticaly set next additonal email as primary on deletion of primary email [UX]

🐞 Bugs

Note: The TODO comments are out-of-scope for this PR and will be addressed separately in future PRs

Contributes to #26866

@Pytal Pytal force-pushed the feat/26866/multiple-emails-ui branch from 6c1cab3 to 94803ca Compare June 4, 2021 17:30
@Pytal Pytal self-assigned this Jun 4, 2021
@Pytal Pytal added the 2. developing Work in progress label Jun 4, 2021
@Pytal Pytal added this to the Nextcloud 22 milestone Jun 4, 2021
@Pytal Pytal force-pushed the feat/26866/multiple-emails-ui branch 2 times, most recently from c1e2b05 to 9e6f35f Compare June 8, 2021 02:27
@Pytal Pytal changed the title Multiple Emails UI Multiple Emails UI & Integration Jun 8, 2021
@Pytal Pytal changed the title Multiple Emails UI & Integration Multiple Emails UI and Integration Jun 8, 2021
@Pytal Pytal force-pushed the feat/26866/multiple-emails-ui branch from 9e6f35f to 58c1e89 Compare June 8, 2021 14:32
@MichaIng MichaIng linked an issue Jun 8, 2021 that may be closed by this pull request
9 tasks
@Pytal Pytal force-pushed the feat/26866/multiple-emails-ui branch from 58c1e89 to 35c079a Compare June 9, 2021 00:54
@Pytal Pytal force-pushed the feat/26866/multiple-emails-ui branch 2 times, most recently from 9df74ae to 7c341c9 Compare June 9, 2021 17:08
@MorrisJobke MorrisJobke mentioned this pull request Jun 10, 2021
59 tasks
Copy link
Contributor

@artonge artonge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finally ready for review ! 😄

Copy link
Contributor

@artonge artonge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From a UX perspective, the current UX allows the user to not have a primary email address. That might not be desirable. But maybe I am missing context.

I would not allow the deletion of the primary email but I would allow setting an additional email address as primary, then the user can delete its now additional email addresses if he wants to.

Also, I would have put the "+ Add" button closer to the additional address fields.

But it looks nice overall :)

@skjnldsv
Copy link
Member

skjnldsv commented Jul 5, 2021

I would not allow the deletion of the primary email but I would allow setting an additional email address as primary, then the user can delete its now additional email addresses if he wants to.

The issue is that one might want to edit the primary.
So there is a fine line between preventing edition and removal.
I think we could add something to make sure to automatically set a secondary email as primary if it is empty

@Pytal
Copy link
Member Author

Pytal commented Jul 6, 2021

From a UX perspective, the current UX allows the user to not have a primary email address. That might not be desirable. But maybe I am missing context.

I would not allow the deletion of the primary email but I would allow setting an additional email address as primary, then the user can delete its now additional email addresses if he wants to.

Refined the primary email deletion UX by automatically setting the next additional email as the the primary email :) as suggested by @skjnldsv

Also, I would have put the "+ Add" button closer to the additional address fields.

I can definitely make some changes, could you elaborate on where you'd like the button? This was based on Jan's suggestions so @jancborchardt any more suggestions would be welcome :) current visual below for reference

image

@artonge

This comment has been minimized.

@Pytal

This comment has been minimized.

Copy link
Member

@juliusknorr juliusknorr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and code looks good 👍

@skjnldsv
Copy link
Member

Please rebase and LGTM 🚀

Pytal added 5 commits July 15, 2021 10:16
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Signed-off-by: Christopher Ng <chrng8@gmail.com>
@juliusknorr
Copy link
Member

Failure unrelated

@juliusknorr
Copy link
Member

/backport to stable22

@backportbot-nextcloud
Copy link

The backport to stable22 failed. Please do this backport manually.

@Pytal Pytal mentioned this pull request Jul 15, 2021
9 tasks
@skjnldsv
Copy link
Member

@Pytal can you backport this manually please? :)

@Pytal
Copy link
Member Author

Pytal commented Jul 15, 2021

@Pytal can you backport this manually please? :)

You bet ;)

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

Labels

4. to release Ready to be released and/or waiting for tests to finish enhancement feature: settings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants