Implement lazy evaluation of attachTo.element#1930
Merged
RobbieTheWagner merged 39 commits intomasterfrom Jun 2, 2022
Merged
Conversation
added 12 commits
May 31, 2022 08:49
Co-authored-by: Robert Wagner <rwwagner90@gmail.com>
Co-authored-by: Robert Wagner <rwwagner90@gmail.com>
test/unit/step.spec.js
Outdated
| const result1 = step1._getResolvedAttachToOptions(); | ||
| const result2 = step1._getResolvedAttachToOptions(); | ||
| expect(result1).not.toBeNull(); | ||
| expect(result1).toBe(result2); |
Member
There was a problem hiding this comment.
I think here we may need to have the element function return something that we change. Then make sure the options are the same still. I think the idea is not calling it twice in a row but calling it twice at various times, when different elements may be on the screen etc.
remove debugger Co-authored-by: Robert Wagner <rwwagner90@gmail.com>
Co-authored-by: Robert Wagner <rwwagner90@gmail.com>
Co-authored-by: Robert Wagner <rwwagner90@gmail.com>
Co-authored-by: Robert Wagner <rwwagner90@gmail.com>
This was referenced Jun 2, 2022
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Internal review for #1187 to evaluate lazy attachment of
attachTo.elementChanges:
Step.isCentered()shouldCenterStepparseAttachTobinding with multiple elementsResponse to Considerations:
1. Should we get rid of
Step.isCenteredand isshouldCenterStepan appropriate alternative?Step.isCenteredinternally approved for removalisCenteredshouldCenterStepto maintain the ability to evaluate the resolved attachTo options will not destroy the feature for any users that are currently or will want to use it in the futureshouldCenterStepmaintains and improves uponStep.isCenteredgeneral.spec.jsto cover reasonable range of potential forms of resolved attachTo optionsshouldCenterStepwas modified to handlenullandundefinedresults2. Should
Step._getResolvedAttachToOptionsthrow an Error if accessed before attachTo evaluation?_show_showshould dynamic elements be added and removed per step optionsStep._getResolvedAttachToOptionsthrow an error if accessed before theattachToevaluationsetupTooltipwill call this method to also determine a tooltip target, but as mentioned above this is a risk if we are concerned about surrounding steps while on the current step and that we callsetupTooltippurely3. Is lazy attachment potentially a breaking change?
4. Would this qualify as a major release?
Step.isCentered(removal done)._scrollToshould only be used after._showfor accurate behaviorattachTocan be accepted as long as the above considerations are approved