Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[UI] Auto refresh/redirect experiment list/detail page when user selects a different namespace #3297
[UI] Auto refresh/redirect experiment list/detail page when user selects a different namespace #3297
Changes from 2 commits
15ef212
c62e667
6b2557c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
nit: not sure if this is just a common UI practice, feels a bit unreadable to me. Does it make sense to have a wrapper function with a more meaningful name?
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'm not sure what confused you. Do you mean this
expect(xxxSpy).toHaveBeenLastCalledWith(...some arguments)
?This is fairly common, but previous implementation has been listing arguments (even though they are just default values).
I think if we change signature of listExperiment api method to let it accept an object of arguments, then the verifications here will include argument names, it will be a lot more readable.
e.g. proposed change will look like
Above is a little more than what we need to do in this PR, so I will leave that to future. What do you think?
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.
Sorry, somehow my comment was placed right above the line that I wanted to comment on.
I meant
...LIST_EXPERIMENT_DEFAULTS.slice(0, 4)
wasn't very clear to me what it's trying to get with theslice
part. I was thinking maybe have a helper function to hide it away, something like:or maybe even better as:
Does it make sense? Just a nitpick. :)
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.
Thanks for the explanation!
I don't quite like introducing another function, to keep it simple, I will just add another constant. please take a look what I changed
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.
Yes, this looks good :)