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

NAS-129885 / 24.10 / Add customer designed login banner #10311

Merged
merged 9 commits into from
Jul 24, 2024
Merged

Conversation

denysbutenko
Copy link
Member

@denysbutenko denysbutenko commented Jul 11, 2024

Ready for testing. Unit tests in progress.

Note: Ensure you have the latest middleware

Demo:
image

@denysbutenko denysbutenko requested a review from a team as a code owner July 11, 2024 17:12
@denysbutenko denysbutenko requested review from RehanY147 and removed request for a team July 11, 2024 17:12
@bugclerk bugclerk changed the title Add customer designed login banner NAS-129885 / 24.10 / Add customer designed login banner Jul 11, 2024
@bugclerk
Copy link
Contributor

Copy link
Contributor

@RehanY147 RehanY147 left a comment

Choose a reason for hiding this comment

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

I am using the latest build. If I am not already logged in, the sign in page never shows up.

@denysbutenko
Copy link
Member Author

I am using the latest build. If I am not already logged in, the sign in page never shows up.

@RehanY147 have you seen any errors in console?

Copy link

codecov bot commented Jul 12, 2024

Codecov Report

Attention: Patch coverage is 79.51807% with 17 lines in your changes missing coverage. Please review.

Project coverage is 76.71%. Comparing base (27efed9) to head (62edca0).
Report is 11 commits behind head on master.

Files Patch % Lines
...vanced/access/access-form/access-form.component.ts 86.11% 5 Missing ⚠️
src/app/enums/system-state.enum.ts 0.00% 4 Missing ⚠️
...full-screen-dialog/full-screen-dialog.component.ts 0.00% 3 Missing ⚠️
src/app/views/sessions/signin/signin.component.ts 84.61% 2 Missing ⚠️
...rc/app/views/sessions/signin/store/signin.store.ts 84.61% 2 Missing ⚠️
src/app/modules/dialog/dialog.service.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10311      +/-   ##
==========================================
- Coverage   76.76%   76.71%   -0.05%     
==========================================
  Files        1597     1602       +5     
  Lines       54950    55097     +147     
  Branches     6487     6500      +13     
==========================================
+ Hits        42180    42268      +88     
- Misses      12770    12829      +59     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@denysbutenko denysbutenko requested a review from RehanY147 July 15, 2024 14:57
Copy link
Contributor

@RehanY147 RehanY147 left a comment

Choose a reason for hiding this comment

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

When the dialog shows up with the login banner, you can't click the "Continue" button if you click on the text part of it. You can click it on the empty part of the button only which is weird since the text is in the center and that's where the user is likely to click.

Also, I only see the login banner when I log out. When I first come to the UI with a page refresh, I don't see the login banner. See the video.

Screen.Recording.2024-07-17.at.4.45.33.AM.mov

# Conflicts:
#	src/assets/i18n/af.json
#	src/assets/i18n/ar.json
#	src/assets/i18n/ast.json
#	src/assets/i18n/az.json
#	src/assets/i18n/be.json
#	src/assets/i18n/bg.json
#	src/assets/i18n/bn.json
#	src/assets/i18n/br.json
#	src/assets/i18n/bs.json
#	src/assets/i18n/ca.json
#	src/assets/i18n/cs.json
#	src/assets/i18n/cy.json
#	src/assets/i18n/da.json
#	src/assets/i18n/de.json
#	src/assets/i18n/dsb.json
#	src/assets/i18n/el.json
#	src/assets/i18n/en-au.json
#	src/assets/i18n/en-gb.json
#	src/assets/i18n/en.json
#	src/assets/i18n/eo.json
#	src/assets/i18n/es-ar.json
#	src/assets/i18n/es-co.json
#	src/assets/i18n/es-mx.json
#	src/assets/i18n/es-ni.json
#	src/assets/i18n/es-ve.json
#	src/assets/i18n/es.json
#	src/assets/i18n/et.json
#	src/assets/i18n/eu.json
#	src/assets/i18n/fa.json
#	src/assets/i18n/fi.json
#	src/assets/i18n/fr.json
#	src/assets/i18n/fy.json
#	src/assets/i18n/ga.json
#	src/assets/i18n/gd.json
#	src/assets/i18n/gl.json
#	src/assets/i18n/he.json
#	src/assets/i18n/hi.json
#	src/assets/i18n/hr.json
#	src/assets/i18n/hsb.json
#	src/assets/i18n/hu.json
#	src/assets/i18n/ia.json
#	src/assets/i18n/id.json
#	src/assets/i18n/io.json
#	src/assets/i18n/is.json
#	src/assets/i18n/it.json
#	src/assets/i18n/ja.json
#	src/assets/i18n/ka.json
#	src/assets/i18n/kk.json
#	src/assets/i18n/km.json
#	src/assets/i18n/kn.json
#	src/assets/i18n/ko.json
#	src/assets/i18n/lb.json
#	src/assets/i18n/lt.json
#	src/assets/i18n/lv.json
#	src/assets/i18n/mk.json
#	src/assets/i18n/ml.json
#	src/assets/i18n/mn.json
#	src/assets/i18n/mr.json
#	src/assets/i18n/my.json
#	src/assets/i18n/nb.json
#	src/assets/i18n/ne.json
#	src/assets/i18n/nl.json
#	src/assets/i18n/nn.json
#	src/assets/i18n/os.json
#	src/assets/i18n/pa.json
#	src/assets/i18n/pl.json
#	src/assets/i18n/pt-br.json
#	src/assets/i18n/pt.json
#	src/assets/i18n/ro.json
#	src/assets/i18n/ru.json
#	src/assets/i18n/sk.json
#	src/assets/i18n/sl.json
#	src/assets/i18n/sq.json
#	src/assets/i18n/sr-latn.json
#	src/assets/i18n/sr.json
#	src/assets/i18n/strings.json
#	src/assets/i18n/sv.json
#	src/assets/i18n/sw.json
#	src/assets/i18n/ta.json
#	src/assets/i18n/te.json
#	src/assets/i18n/th.json
#	src/assets/i18n/tr.json
#	src/assets/i18n/tt.json
#	src/assets/i18n/udm.json
#	src/assets/i18n/uk.json
#	src/assets/i18n/vi.json
#	src/assets/i18n/zh-hans.json
#	src/assets/i18n/zh-hant.json
@denysbutenko
Copy link
Member Author

When the dialog shows up with the login banner, you can't click the "Continue" button if you click on the text part of it. You can click it on the empty part of the button only which is weird since the text is in the center and that's where the user is likely to click.

I tested it on Firefox 128, Chrome 126, and Safari, but I can't reproduce the problem on my end. Did you experience the same problem with other buttons?

Also, I only see the login banner when I log out. When I first come to the UI with a page refresh, I don't see the login banner. See the video.

Screen.Recording.2024-07-17.at.4.45.33.AM.mov

Okay fixed this case

@denysbutenko denysbutenko requested a review from RehanY147 July 17, 2024 15:37
Copy link
Contributor

@RehanY147 RehanY147 left a comment

Choose a reason for hiding this comment

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

I can consistently reproduce the button bug. It doesn't happen for me on other buttons. Only this one. @undsoft Can you review if you can get this error as well?

Copy link
Contributor

@RehanY147 RehanY147 left a comment

Choose a reason for hiding this comment

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

I can still reproduce the page refresh bug with the latest changes pulled in and on firfox up to date.

Screen.Recording.2024-07-18.at.4.30.12.AM.mov

@denysbutenko
Copy link
Member Author

I can still reproduce the page refresh bug with the latest changes pulled in and on firfox up to date.

Screen.Recording.2024-07-18.at.4.30.12.AM.mov

Ah, I see now. It is another case. Made changes for it.

Copy link
Contributor

@RehanY147 RehanY147 left a comment

Choose a reason for hiding this comment

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

The missing banner on refresh after logout bug has been resolved. I still see the unclickable text on the continue button issue. If you want, you can create a new ticket for this and link it here. I will approve this PR.

@denysbutenko
Copy link
Member Author

The missing banner on refresh after logout bug has been resolved. I still see the unclickable text on the continue button issue. If you want, you can create a new ticket for this and link it here. I will approve this PR.

Let's try to resolve it here. I assume it may be a z-index issue. In the past, we had a problem with password input overlapped popups. Can you check the selected element under the text button with Inspect Element? It may help to understand the root cause.

Kapture.2024-07-19.at.09.30.36.mp4

@denysbutenko denysbutenko requested a review from RehanY147 July 19, 2024 02:35
@undsoft undsoft removed their request for review July 19, 2024 14:17
Copy link
Contributor

@RehanY147 RehanY147 left a comment

Choose a reason for hiding this comment

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

There is a some sort of cdk layout on top of the button. That's stopping it from being clickable. I've also tested this in incognito to confirm that no extension or plugins are messing with the UI and I could reproduce it.

@RehanY147
Copy link
Contributor

Screen.Recording.2024-07-23.at.3.25.28.AM.mov

@denysbutenko
Copy link
Member Author

There is a some sort of cdk layout on top of the button. That's stopping it from being clickable. I've also tested this in incognito to confirm that no extension or plugins are messing with the UI and I could reproduce it.

Autofocus directive intercepts active element to input that enables autocomplete. I added two possible fixes:

  1. Increased z-index for full-screen dialog than input's autocomplete.
  2. Skip autofocus when full-screen dialog appears and restore on username input when dialog is closed.

@denysbutenko denysbutenko requested a review from RehanY147 July 23, 2024 03:32
Copy link
Contributor

@RehanY147 RehanY147 left a comment

Choose a reason for hiding this comment

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

Seems to be working OK now. No longer see the issues. Great work!

@denysbutenko denysbutenko merged commit ad2c2f4 into master Jul 24, 2024
10 checks passed
@denysbutenko denysbutenko deleted the NAS-129885 branch July 24, 2024 16:24
@bugclerk
Copy link
Contributor

This PR has been merged and conversations have been locked.
If you would like to discuss more about this issue please use our forums or raise a Jira ticket.

@truenas truenas locked as resolved and limited conversation to collaborators Jul 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants