-
Notifications
You must be signed in to change notification settings - Fork 7
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
fix: Alert unmount and overlay #378
Conversation
|
||
&.fixed-position { | ||
position: fixed !important; | ||
right: 15%; | ||
bottom: 50%; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ref={alertDiv} | ||
className={`new-hathor-alert alert alert-${type} alert-dismissible fade`} | ||
role="alert" | ||
style={{ display: 'flex', flexDirection: 'row' }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to avoid this style
from the previous implementation, but the fade animations just wouldn't work without it. Decided to leave this cleanup to a future refactor.
19d4e8f
to
bc594ae
Compare
if (alertDiv?.current) { | ||
alertDiv.current.classList.remove('show'); | ||
} | ||
}, duration); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't have this duration
parameter here, if I'm not wrong. The diffs are a bit confusing but it seems like you should be receiving it as a parameter in the showAlertComponent
also.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is actually declare inside the show()
function, so it shares the duration
parameter.
The diff visualizarion is confusing, since some of the methods were obsolete and were removed, but you can see it more clearly on the file itself.
During some tests where many components were being clicked in short sequence, the
NewHathorAlert
component could break by being unable to manipulate the dom correctly: the expected element would already be unmounted when the timer finished.Also, the alert container for fixed positioning, used in the Navigation search, was overlaying the screen elements, preventing clicks on the application elements.
Acceptance Criteria
Security Checklist