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
feat: add UI trigger for query progress #30
feat: add UI trigger for query progress #30
Changes from 4 commits
e7259f1
06e808f
dbf2b93
26be2d0
c9a4e5f
bc1e1b0
3ebfbaf
e24af99
56f358c
d483695
ebf354d
aeab4dd
b70654c
aeb935e
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.
unrelated to this PR but thought I get your feedback on this function.
when i refactored this a little I kept intact like the returning of a boolean but it returns false because the rxjs operator
takeWhile
needs to get the false value to stop polling.but it's confusing to read do you think it's worth to rename this function? or shift the logic so that in the utils function it negates the value here? Because return false when
SUCCESS
from onPollingSuccess could get confusing.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.
It could be confusing at first, but I think it's generally derivable that the usage is to return
false
to halt polling andtrue
to continue. There isn't anything inherently "keep polling"-like abouttrue
orfalse
.If we want to make it more clear I think the way to go would be to refactor the polling util to rely on a polling state enum, and return values like
Polling.DONE
,Polling.CONTINUE
,Polling.ERROR
. Could even make it more sophisticated with the specific statuses, having things likeTIMEOUT
orABORT
.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.
Not sure if it's obvious by me introducing
JobState
to begin with, but I'm a big fan of using state machines and strong typing (i.e. lots of enums) to keep track of program state and handle errors.