User Story
As an extension developer, I want effective papi methods so that I can easily listen for bcv changes.
DescriptionIn papi we have methods like papi.webViews.onDidUpdateWebView and papi.scrollGroups.onDidUpdateScrRef. Those are very helpful for listening on scripture reference changes. However using them I discovered that I had to manually keep track of some things:
To react on scroll group changes I am listening to papi.webViews.onDidUpdateWebView. However I saw this firing a lot also when there was no ref change happening. Fine, I thought I could filter that. But as the method does not indicate WHAT the change was that cause it (e.g. a ref change or something else) I could not easily filter those changes. Also as there is no old value provided to compare, I had to maintain my own list again.
Implementation idea
enhance papi.webViews.onDidUpdateWebView to
allow filtering on type of change (e.g. ref change, layout change, ...)
provide the old value, so that custom filter will be made easy
Testing ideas
Be able to create an extension that listens to scroll group changes only without getting any other webview updates
User Story As an extension developer, I want effective papi methods so that I can easily listen for bcv changes.
Description In papi we have methods like
papi.webViews.onDidUpdateWebView
andpapi.scrollGroups.onDidUpdateScrRef
. Those are very helpful for listening on scripture reference changes. However using them I discovered that I had to manually keep track of some things:To react on scroll group changes I am listening to
papi.webViews.onDidUpdateWebView
. However I saw this firing a lot also when there was no ref change happening. Fine, I thought I could filter that. But as the method does not indicate WHAT the change was that cause it (e.g. a ref change or something else) I could not easily filter those changes. Also as there is no old value provided to compare, I had to maintain my own list again.Implementation idea enhance
papi.webViews.onDidUpdateWebView
toTesting ideas Be able to create an extension that listens to scroll group changes only without getting any other webview updates