Merged
Conversation
- Updated the `start` function to build a fresh component tree on each call and include the root element if it has a `data-component` attribute. - Added tests to verify parent-child relationships and ensure modifications to one component do not affect others. - Implemented tests to check for DOM changes between calls and scoped searches to provided element roots. - Enhanced existing tests to validate the integrity of the component structure and relationships.
- Introduced a new `Component` class to facilitate component initialization. - Updated the `start` function to support both root and component options. - Added tests for component class initialization, ensuring correct element association and root respect. - Enhanced existing tests to validate component behavior in various DOM structures.
- Modified the `start` function to accept an options object, allowing for better handling of the root element and component classes. - Updated tests to reflect the new function signature, ensuring that the root element is correctly passed and utilized in various scenarios. - Enhanced test coverage for component initialization and parent-child relationships in the DOM.
- Enhanced the `start` function to issue a console warning when a `data-component` attribute is found in the DOM without a corresponding class provided in the components array. - Updated tests to verify that the warning is triggered correctly when such a scenario occurs. - Adjusted existing tests to accommodate changes in the function's behavior regarding root element handling.
- Updated the function to improve the determination of component names, now focusing on a custom static field 'name' and providing a warning for classes that do not implement it. - Simplified the logic for matching components in the DOM, enhancing clarity and maintainability. - Adjusted the way matches are collected from the DOM to ensure accurate component initialization.
- Introduced `warnMissingStaticName` and `warnMissingComponentClass` functions to centralize warning logic in the `start` function. - Updated the `start` function to utilize these new warning functions, improving code clarity and maintainability. - Enhanced the handling of component class validation and DOM matching, ensuring better feedback for developers.
- Replaced the `warnMissingComponentClass` function with `warnMissingDomComponents` to streamline the warning process for components present in the DOM without corresponding classes. - Updated the `start` function to utilize the new warning function, improving clarity and maintainability. - Removed redundant logic for checking component classes, enhancing the overall efficiency of the component initialization process.
…tribute - Introduced a mechanism to generate unique component IDs for instances of components, ensuring each instance has a corresponding `data-component-id` attribute in the DOM. - Updated the `start` function to assign and set the generated component ID on the elements. - Added a new test to verify that component IDs are correctly assigned and mirrored in the `data-component-id` attribute, ensuring uniqueness across multiple instances.
- Introduced a new test to verify that components without name and element keys receive a sanitized node during initialization. - Updated the `start` function to attach a sanitized view of the node to the component instance, omitting sensitive keys. - Enhanced logging in the development HTML to include the sanitized node for better debugging.
- Simplified the HTML structure by removing unnecessary div wrappers around the display span elements in the greeting components. - Updated the component's JavaScript to improve the interaction logic, allowing the button to update the span with a greeting message based on the input value. - Enhanced console logging to provide better visibility of component instances during initialization.
- Introduced a new `ref` method in the `Component` class to facilitate element retrieval using `data-ref` attributes. - Created unit tests for the `Component.ref` method to ensure correct element matching within component roots and handle cases where references are missing. - Updated the HTML structure in the development environment to utilize `data-ref` attributes for improved component interaction.
…rn arrays for multiple elements matching `data-ref` attributes, improving flexibility in element retrieval.
…andle added components, ensuring proper initialization and connection of component instances.
…proved functionality
…t and improve clarity
…ility in component child retrieval
…elper for improved code reusability and clarity
…d consistency in naming conventions
…, and remove Babel configuration.
…test for clock count verification
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.
No description provided.