-
-
Notifications
You must be signed in to change notification settings - Fork 279
approval flow loading text #1419
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
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
c92351b
adds startFlow and enfFlow methods
bergarces b7050ac
remove sinon
bergarces 4f206c1
jsdoc
bergarces 85ce842
Merge branch 'main' into start-end-approval-flows
bergarces 2718b30
Merge branch 'main' into start-end-approval-flows
bergarces f399d4c
prevent clear from removing approval flows
bergarces 3d2e622
Merge branch 'main' into start-end-approval-flows
bergarces 4371be8
loading text support
bergarces 37bdee8
Merge branch 'main' into approval-flow-loading-text
bergarces a0e1e8f
changes to setFlowLoadingText implementation
bergarces 614a619
refactor to avoid TS assertion
bergarces 16a81e0
fix tests
bergarces 34d3aa5
Merge branch 'main' into approval-flow-loading-text
bergarces 74a58db
Merge branch 'main' into approval-flow-loading-text
bergarces d367365
Merge branch 'main' into approval-flow-loading-text
bergarces File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
Anyone is of the opinion that
endFlowshould set the loading text back tonull? It might be inconvenient in the event of an approval flow within another approval flow, but I think that's going to be a very rare occurrence.On the other hand, not clearing it after a previous approval flow could cause some interesting bugs depending in which order approval flows happen.
An alternative to this would be to add a
loadingTextparameter when a flow starts and set it back to default if nothing is passed.And even though the ticket explicitly says not to, another alternative would be for the loading text to be linked to an approval flow.
Uh oh!
There was an error while loading. Please reload this page.
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 initially wanted to do it per flow but the issue is ownership. If a nested flow exists, is the parent flow loading text displayed as it was the initial flow and has more high level context, or is the child flow loading text shown as it's more specific and more aware of what is happening?
On reflection, perhaps there is a compromise where the loading text is per flow and so
setFlowLoadingTexthas aflowIdargument, and by default the nested flow text is displayed as it's most relevant to the current work, unless the parent flow wants to be stubborn and was started with an option such asoverrideNestedLoadingText?We could be extra thorough and also have a
ignoreNestedLoadingTextwhich simply ignores all nested text even when there is no parent text.Clearing the text on
endFlowwould then make sense, but not having default loading text to start with as we can't really know that until the first approval is requested.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.
So...
Without doing text by
flowId, we can't just clear the text atendFlow, as that would inadvertently clear the parent loading text.If we attach the flow to a specific
flowId, then it won't matter. We can even come up with ways of inheriting the parent text if one is not provided.Having said that, it's going to be difficult to predict what the functionality should exactly be if we don't have any use case for a nested approval flow.