-
Notifications
You must be signed in to change notification settings - Fork 17
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
Port eager components off of XSLT #1856
Open
philipcaisip
wants to merge
11
commits into
hermione
Choose a base branch
from
feature/eager
base: hermione
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
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
Not fully ready at this stage. Still need to ensure ids in tests are well-formed and exists, otherwise it will not reach the ajax trigger fire and the test will timeout and fail. Really just a checkpoint commit.
Previously thought that the container element should be the one being passed to containerload register, but that is wrong. Its the content (another element in the container) that is getting eager loaded/ registered.
Previously getting rendered inside the attributes of the parent component, which is invalid.
"wc-ajax-eager" elements are now used to mark eager containers. Currently they are simple divs that sit as a child of the eager containers, with that container's id as its inner html. This is how ids are fed into the ajax register. Currently, since the ids are given as text inside the div, users can actually see that container id for the few seconds that the ajax load is happening. This should be fixed in a future commit.
Gets rid of problem with storing id in the inner html where users can briefly see the id of the container before the ajax load happens. Tests (both js and java) need to be changed still to reflect all changes so far.
Previous xslt did not render the contents of eager panels. This is a problem for the current implementation since the html custom element that acts as a marker for eager panels is a child element of that panel. That code is commented out for now; will have to ask best way to deal with that/whether that check is necessary. Other eager containers seem to be working fine with new implementation EXCEPT for figures and sections. Will have to investigate.
Eager panels, figures, and sections all had a problem where the xslt would not copy their child wc-ajax-eager element. This led to them not getting loaded properly since that custom html component can't run its registration scripts on page load. That's fixed now through some xslt changes. Java and js unit tests still need to be redone to properly test the new implementations.
Some unit tests fail with the new html custom element code. In particular, anything that does an XSD schema check in the unit test fails when it sees the new html element that it doesn't expect. Those schema checks are commented out since we wanna move away from all that eventually anyways.
Things like changing * imports to individual modules and removing unused imports. Probably got introduced in the background by IDE.
Quality Gate passedIssues Measures |
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.
Registration for any component that can be eager (i.e. submenu, tab, collapsible, figure, panel, section) now done with a HTML custom element called
wc-ajax-eager
instead of XSLT.