-
Notifications
You must be signed in to change notification settings - Fork 23
kv-explorer/adapt to new apis #1291
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
Conversation
|
🔎 A preview has been automatically published : https://clever-components-preview.cellar-c2.services.clever-cloud.com/kv-explorer/adapt-to-new-apis/index.html. This preview will be deleted once this PR is closed. |
roberttran-cc
left a comment
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.
LGTM!
The new code feels a lot better (I'll admit I did not check everything thoroughly).
6a4dc48 to
85a8996
Compare
florian-sanders-cc
left a comment
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 did not review thoroughly most of the refactoring commits but I have a small question about the delete button tabindex and some nitpicks.
Apart from that, LGTM, gg @pdesoyres-cc!
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.
👏 Wow, impressive work @pdesoyres-cc !!
General
- a few comments here and there, nothing serious
- praise: the way the code is structured in the smart + the 3
Kv*Ctrlmakes the code easier to read and hopefully to maintain later - praise: the abort controller usage with the semaphore is nice
- issue: the way you share just one
kvSharedSemaphoremeans having 2 KV explorers on the same page could be a problem. The instance of the semaphore should be unique per instance of the component but we won't really face this problem so not sure if we should "fix" it and when. I'll let you decided (maybe a small comment if we don't act). - note: I haven't tested but I was wondering about a given situation (see "Race condition investiation" below)
- issue: the way you share just one
Race condition investiation
- If we click on hash
Ain the list, the detail view uses theloadMoreof theKvScannerwith thefetchof theKvHashElementsScannerand ensures we use the AbortSignal via the semaphore - Then if we click on hash
Bin the list, if theAhash scan async call was still ongoing it gets cancelled before we try to scanB, no risk for race conditions here. - I was wondering what happens if we try to loadMore but on the same hash (or list, or set...)?
- It would mean "page 1" loading would get cancelled when we try to load "page 2".
- I think the UI and/or smart prevents this situation but I'm not sure
- Can you confirm this?
Loading error
I just realized this now but if the component fails to load the list on the first display of the page, we get a toast and the component stays in skeleton/loading state. We don't have any way to click on reload keys. I think I expected an "error" state where I can click on reload and no toast. This is fine for now as this won't happen that much and the user can do a full page reload.
We have a similar situation when the call to reload the keys fails. We get the toast, the list goes to skeleton/waiting and then empty with the No results matching the filter message and the number of keys still defined with the last value. Again here, I expected an "error" state where I can click on reload and no toast. Same as above, not a very important problem to tackle and it was already present before this PR so it can be tackled later.
85a8996 to
72fee0e
Compare
|
Thanks @hsablonniere for this deep review.
|
72fee0e to
9c698b2
Compare
hsablonniere
left a comment
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.
Well done @pdesoyres-cc !!!
- some adjustments on what we discussed IRL
- a small comment
9c698b2 to
042e58d
Compare
042e58d to
040431c
Compare
|
🔎 The preview has been automatically deleted. |
What this PR do ?
There are various enhancements:
filteringtypeHow to review
filteringstate typepreprodredis-http APIs