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

Added user settings part 1 - setting SSH key and impersistent blocking toast notifications #1088

Merged
merged 3 commits into from
Dec 7, 2020

Conversation

bond95
Copy link
Contributor

@bond95 bond95 commented Aug 13, 2019

Main page for global settings:
image

Confirmation modal:
image

Main page for VM settings:
image

Save confirmation notification:
image

Error notification:
image

@lwrigh
Copy link

lwrigh commented Aug 13, 2019

It's looking good to me! One comment is that the context selector on the left should be top aligned with the top of the settings card, not the search bar. Here's the alignment I'm think of:
Search 1

There are also some future edits that we'll have to make after user testing but we can open another PR for those edits.

yodem
yodem previously approved these changes Aug 14, 2019
Copy link
Contributor

@yodem yodem left a comment

Choose a reason for hiding this comment

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

It looks great!!

@bond95
Copy link
Contributor Author

bond95 commented Aug 27, 2019

@lwrigh
image

@lwrigh
Copy link

lwrigh commented Aug 27, 2019

It's looking good! User settings usability testing brought up some issues that we'll have to make updates to. I think it would be better to hold off on merging it before we made those updates. @sgratch @bond95 @sjd78 @yodem What do you guys think?

@sjd78
Copy link
Member

sjd78 commented Sep 7, 2019

@bond95 - CI is failing on an i18n test that is checking to make sure all keys in the translations exist as English keys. In other words, existing keys were removed or renamed. Easiest fix is to remove the offending keys from the translation file. Or if the keys are a rename, and you're feeling nice, adjust the translation key names.

@lwrigh
Copy link

lwrigh commented Oct 16, 2019

@bond95 Is it ready for updated screenshots yet? Just saw that it's waiting for my review but I'm just waiting for updated screenshots of it. We can also do a demo of it so we can review the behavior when it's ready.

@bond95
Copy link
Contributor Author

bond95 commented Oct 18, 2019

@lwrigh
Moved global settings button to main panel:
image

Global user settings:
image

Saved settings:
image

VM settings:
image

Link to settings in console page:
image

Multiselect:
image
image

Multiselect settings:
image

Confirmation dialog:
image

@lwrigh
Copy link

lwrigh commented Oct 21, 2019

@bond95 Awesome this is looking great! My only comment is that I would make the dropdown and text fields a bit less wide. They could probably be half the width.

@bond95 bond95 force-pushed the user-settings branch 3 times, most recently from 6701940 to f606dc1 Compare October 21, 2019 14:17
@bond95
Copy link
Contributor Author

bond95 commented Oct 21, 2019

@lwrigh updated width of settings:
image

WDYT?

@lwrigh
Copy link

lwrigh commented Oct 22, 2019

@lwrigh updated width of settings:
image

WDYT?

The fields are still a bit too wide, I would recommend it be half the width so it looks like something like this:

Desktop HD

@bond95
Copy link
Contributor Author

bond95 commented Oct 22, 2019

@lwrigh
image
image

@lwrigh
Copy link

lwrigh commented Oct 23, 2019

@lwrigh
image
image

The dropdowns look good! Ah sorry if I wasn't communicating clearly, the text for the checkboxes should be on all one line and should only go to two lines when it gets closer to the edge of the card. Generally when it comes to sentences they should try to extend the width of the container but with components like the dropdowns the width is usually determined by the content.

@bond95
Copy link
Contributor Author

bond95 commented Oct 23, 2019

@lwrigh fixed:
image

@rszwajko
Copy link
Member

rszwajko commented Dec 1, 2020

Expected result for "do not disturb" enabled mode:
notifications shouldn't appear within the notification drawer

They seem to appear in Web Admin so I would keep them here too.

Expected result for "do not disturb" disabled mode:
notifications shouldn't be dismissed from the notification drawer even after refresh.

Fixed. Instead of auto-removing we now acknowledge old entries.

@sgratch
Copy link
Member

sgratch commented Dec 1, 2020

@rszwajko

1. The email field within "Account Settings" dialog is always empty even if email is set for the user.

OK. I'll remove it from this section.

Why removing and not fixing? Isn't it a bug?

2. Please update PR's name and description to reflect current content of: user settings for SSH key and local not persistent notifications disabling only.

Looking from the end user perspective I agree but this patch still contains a lot of framework code that will be used by server-side user settings (coming soon).

I know but we can't merge this PR (with a very very long conversation list :)) without specifying exactlly what's merged and what is the context of this PR. No one will understand/remember that from reading all long conversations.
You can change that to something like "added user setting 1st phase- SSH key and non persistent notification disabling only (includes base framework code for future/backend code" or something like that. Either on title or as the 1st comment.

@rszwajko rszwajko changed the title Added user settings Added user settings part 1 - setting SSH key and blocking toast notifications Dec 2, 2020
@rszwajko
Copy link
Member

rszwajko commented Dec 2, 2020

  1. The email field within "Account Settings" dialog is always empty even if email is set for the user.

OK. I'll remove it from this section.

Why removing and not fixing? Isn't it a bug?

User email is fetched using /users/<id> REST endpoint which is currently not working for standard users.

  1. Please update PR's name and description to reflect current content of: user settings for SSH key and local not persistent notifications disabling only.

Done. Please check the current PR title.

  1. Notifications settings: please consider adding to the tooltip "Notification settings applied here affect all notifications" a clarification that it includes affecting all VMs and Pools notifications. It seems obvious but maybe worth mentioning.

Done.

@sgratch
Copy link
Member

sgratch commented Dec 3, 2020

@rszwajko

Expected result for "do not disturb" disabled mode:
notifications shouldn't be dismissed from the notification drawer even after refresh.

Fixed. Instead of auto-removing we now acknowledge old entries.

+1
Note that there is a separate issue, not related to this PR, which prevents from keeping old entries: #1338

  1. Notifications settings: please consider adding to the tooltip "Notification settings applied here affect all notifications" a clarification that it includes affecting all VMs and Pools notifications. It seems obvious but maybe worth mentioning.

Done.

What I meant on my original comment is to emphasize the fact that all vms/pools are affected since you can't filter by vms/pools for now. So maybe just consider adding "all": ...(including all vms and pools notifications).

I had trouble finding the right phrase. Session duration is a shorter form of browser session duration (which seemed too long for me). The notifications settings are saved only in Redux store (not in local storage) so every page reload (new browser session) clears them. Server side session(login/logout) is different concept and is not impacted by page reload.

"until next login or hard refresh"

I'm not sure if hard refresh is clear enough - this implies that we have also a soft reset somewhere :)
until next login is self-explanatory but only partially correct (usually login involves page reload).

The problem is that session for web-ui terminology is referring to user session. Check for example the config value: https://zipur.ca/knowledgebase/stop-engine-webui-session-time-logging-out/
I still think that using "session duration" is very confusing so I suggest adding a tooltip that explains this 4th option. WDYT?

    Please update PR's name and description to reflect current content of: user settings for SSH key and local not persistent notifications disabling only.

Done. Please check the current PR title.

Great, thanks! Can you please just add "impersistent" to the "blocking toast notifications" part on title.

=====================
Other than that all LGTM.
If #1334 is not reviewed yet tomorrow then please rebase without it for now and we'll handle that later on.

@rszwajko rszwajko changed the title Added user settings part 1 - setting SSH key and blocking toast notifications Added user settings part 1 - setting SSH key and impersistent blocking toast notifications Dec 4, 2020
@rszwajko
Copy link
Member

rszwajko commented Dec 4, 2020

@sgratch

consider adding "all": ...(including all vms and pools notifications).

Done. Additionally, I've extended the tooltip to explain that the settings are not persisted. This is true for the entire section so section tooltip seems the best place

I still think that using "session duration" is very confusing so I suggest adding a tooltip that explains this 4th option.

I've changed this label to "until next page reload". This seems the most self explanatory term. It does sounds strange when you read it together with the dropdown label ("Do not disturb for until next page reload") but as confirmed with @sjd78 it's not that bad. Web Admin uses similar wording here ("until next Log in").

notifications_wording

@sgratch
Copy link
Member

sgratch commented Dec 6, 2020

@rszwajko
All LGTM now and ready to be finally merged except:

If #1334 is not reviewed yet tomorrow then please rebase without it for now and we'll handle that later on.

I would like a couple of eyes to review this (specifically Scott) before merging this part.

Copy link
Member

@sjd78 sjd78 left a comment

Choose a reason for hiding this comment

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

Changes look good to me.

@rszwajko
Copy link
Member

rszwajko commented Dec 7, 2020

Rebased on top of #1334 (version with improved logging)

CounterAlert:
1. onDismiss prop - callback fired when alert is closed
2. children prop - rendered below title
Summary:
1. Remove existing Options dialog
   a) move SSH Key to Account Settings
   b) continue using existing REST endpoint: users/${id}/sshpublickeys
2. support following (local) settings via Redux-store:
   a) showNotifications (do not disturb)
   b) notificationSnoozeDuration (do not disturb for)
3. add typing for user settings related entities
4. in Settings use data-driven 3-way diff for change detection.
   Change is detected by comparing current content of Redux store
   with user changes(draft values) and base values(store content
   before at the beginning of user settings updates)
Allow user to block system notifications via Account Settings:
1. each change to the snooze duration resets the snooze timer
2. notification settings are not persisted - page reload clears them.
3. only displaying is blocked - logs continue to be accumulated in the
   store (userMessages -> records)
@rszwajko
Copy link
Member

rszwajko commented Dec 7, 2020

Rebased on top of #1334 (after merge GH reported conflicts in this PR)

Copy link
Member

@sgratch sgratch left a comment

Choose a reason for hiding this comment

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

LGTM

@isaranova
Copy link

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: ON_QA status ON_QA (currently being tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants