-
Notifications
You must be signed in to change notification settings - Fork 45
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
WIP: Improve Reliability of Button Component Re-rendering #937
Closed
Conversation
This file contains 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
…o exist in a selector that might also not exist
…omponent doesn't continue to try to process any original HTML after the button component has rendered the first time
…generated markup; refactor out logic that only applies to existing HTML
… the amount of work HyperHTML has to do when determining what, if any, has changed.
…S errors from getting thrown when slotted components are sometimes removed / re-attached from the page
…y aren't defined. fixes some of the JS errors thrown by HyperHTML when attempting to re-render / diff components that aren't rendered to the Shadow DOM
…that get rendered inside of a form — forces the icon and button components inside to be rendered outside the Shadow DOM to better isolate and test to confirm HyperHTML domdiff errors are being addressed
sghoweri
pushed a commit
that referenced
this pull request
Nov 2, 2018
sghoweri
pushed a commit
that referenced
this pull request
Nov 13, 2018
18 tasks
Closing out -- superseded by #951 |
Merged
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.
Jira
http://vjira2:8080/browse/BDS-732
Summary
This PR includes several component rendering-related updates to proactively address some very specific HyperHTML-related domdiff library errors observed in Pattern Lab when heavily stress testing Bolt's component rendering / re-rendering behavior in a large variety of different situations and use cases.
Details
Added additional test examples of button and icon components used in dynamically injected cards with varying time delays, but used inside of
elements to force the inner components to not render to the Shadow DOMUpdates the Bolt Base component internal processing / setup work to fix one of the domdiff errors thrown when dynamically injected
<bolt-button>
s that are not rendered to the Shadow DOM are then moved around the page after initially renderingUpdates the HyperHTML base component renderer to not pass in any params to the HyperHTML
wire()
function which fixes another HyperHTML domdiff-related JavaScript error observedUpdates the Bolt button component's internal JS logic that's responsible for handling the initial button and link HTML that max exist when the component initially boots up.
This PR specifically updates this logic to only run once (before the component has rendered) to prevent an occasional error from getting thrown relating to inner DOM changes that HyperHTML isn't expected.
How to test
TBD -- this PR is the reference point being used for additional testing coverage being worked on