-
Notifications
You must be signed in to change notification settings - Fork 61
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
refactor(coral): Replace hacky notification solution in ProfileDropdown #1824
Conversation
Signed-off-by: dotarjun <arjunsingh8112@gmail.com>
Signed-off-by: dotarjun <arjunsingh8112@gmail.com>
…matically Signed-off-by: dotarjun <arjunsingh8112@gmail.com>
Signed-off-by: dotarjun <arjunsingh8112@gmail.com>
Hey @dotarjun thanks a million for opening this PR! Just wanted to let you know that the Klaw teams experts and reviewers in this area are off today and tomorrow but will review it as soon as they are back :) Thanks a million! |
Thank you for the PR! Reviewing it now. Regarding this requirement of a PR:
This also applies to the title of the PR, as we squash all commits when merging to main, the title of the PR becomes the commit message ^^ |
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.
The feature works as expected, however the tests are failing: https://github.com/Aiven-Open/klaw/actions/runs/6371740002/job/17306861820?pr=1824#step:4:22
You may want to update the snapshots
pnpm jest --updateSnapshot
But I think there may be more tests failing.
Hi! I checked the tests - the mock for |
Signed-off-by: dotarjun <arjunsingh8112@gmail.com>
@programmiri I think I have fixed it now |
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.
Great job 🎉 I left two smoool comments :)
Signed-off-by: dotarjun <arjunsingh8112@gmail.com>
Signed-off-by: dotarjun <arjunsingh8112@gmail.com>
Signed-off-by: dotarjun <arjunsingh8112@gmail.com>
@dotarjun saw you updated the PR, looks great! The snapshot test still needs to be updated, as you can see, the pipeline is failing. This is based in the update of the design system and the change is correct, so you can run |
I get this error.
|
Signed-off-by: dotarjun <arjunsingh8112@gmail.com>
Signed-off-by: dotarjun <arjunsingh8112@gmail.com>
@dotarjun ah, sorry I didn't notice that sooner. In the mock for toast, you returning an object, but
I checked out your branch and tested it there with the array and for me, it works. Can you try that? Thanks for hanging in there 🙏 Also, your branch needs to be updated manually as it has a conflict. |
Signed-off-by: dotarjun <arjunsingh8112@gmail.com>
@dotarjun please fix the conflict so that the github actions can run ^^ |
9029733
to
ef8558d
Compare
The forced push was done as I accidentally pushed the changes I made for #1845 on this branch. I cherry picked the relevant commits to the correct branch and then removed the unnecessary commits by interactive rebase. Then I had to force push to remove the misleading commits on this branch. |
@dotarjun there are many CI failures regarding the TS compiler and tests, do you need assistance? |
@mathieu-anderson Yeah. I dont understand why. I think it's because of incorrectly resolving merge conflicts for |
@dotarjun If you suspect this is the case, I would try:
Then run |
@dotarjun you may also want to address the lst issue I pointed out on this PR: #1845 (comment) And then after it's merged you won't have to update |
Signed-off-by: dotarjun <arjunsingh8112@gmail.com>
Signed-off-by: dotarjun <arjunsingh8112@gmail.com>
🎉🎉 |
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.
Thank you!
function navigateToAngular(path: string) { | ||
window.location.assign(`${window.origin}${path}`); | ||
} | ||
|
||
function onDropdownClick(actionKey: string | number) { | ||
const [toast, dismiss] = useToastContext(); |
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.
Was there a reason to move this in the body of the onDropdownClick
function?
Because in this state, clicking Logout throws an error and does nothing, as hooks can only be called in the body of a component:
Screen.Recording.2023-10-24.at.15.36.43.mov
I think moving it back where it was before (under const authUser = useAuthContext();
) should fix the issue and still preserve the behaviour we want.
@dotarjun , I was going to merge but I found that there was still an oversight in the code ^^ #1824 (comment) |
Signed-off-by: dotarjun <arjunsingh8112@gmail.com>
…Context Signed-off-by: Mathieu Anderson <mathieu.anderson@aiven.io>
@dotarjun I hope you don't mind but I pushed a commit to fix the broken tests, as this is the last day of Hacktoberfest and it would be nice to merge this PR today ^^ |
@mathieu-anderson thanks a ton. I've been quite busy with some personal obligations. It's the festive season here in India so I've been busy with that. I'll be getting back to contributing soon 🚀 I really appreciate you covering up for me 😄 |
@dotarjun merged ^^ Thank you! |
Linked issue
Resolves: #1810
What kind of change does this PR introduce?
Please check if the PR fulfills these requirements