Add comprehensive DOM element creation capabilities#17
Merged
anikitenko merged 6 commits intomainfrom Oct 27, 2025
Merged
Conversation
- Add DOMTable class for creating HTML table structures (table, thead, tbody, tfoot, tr, th, td, caption) - Add DOMMedia class for creating media elements (img with accessibility support) - Add DOMSemantic class for semantic HTML5 elements (article, section, nav, header, footer, aside, main) - Enhance DOMNested class with ordered lists (ol) and definition lists (dl, dt, dd) - Enhance DOMInput class with select dropdowns (select, option, optgroup) - Add comprehensive test coverage for all new DOM classes - Add example plugin demonstrating all new DOM element capabilities - Update README.md with documentation of new features - Add CHANGELOG.md documenting all changes All new classes follow existing architecture patterns, include full JSDoc documentation, support custom styling via goober CSS-in-JS, and maintain backward compatibility. Co-Authored-By: onikiten@softserveinc.com <alexvwan@gmail.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Coverage report
Show new covered files 🐣
Show files with reduced coverage 🔻
Test suite run success383 tests passing in 28 suites. Report generated by 🧪jest coverage report action from 396e758 |
- Add custom attribute tests for all DOMTable methods - Add custom attribute tests for all DOMSemantic methods - Achieve 100% coverage for both classes - Overall test coverage now at 98.1% (up from 92.61%) - Total tests: 323 (up from 309) Co-Authored-By: onikiten@softserveinc.com <alexvwan@gmail.com>
…proxy/github.com/anikitenko/fdo-sdk into 001-more-dom-elements
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.
Add comprehensive DOM element creation capabilities
Summary
This PR implements spec-kit specification
001-more-dom-elements, adding extensive DOM element creation capabilities to the FDO SDK. The implementation includes:examples/dom_elements_plugin.tsAll new classes follow existing architecture patterns, include JSDoc documentation with @uiName tags, support CSS-in-JS styling via goober, and maintain backward compatibility.
Review & Testing Checklist for Human
Test select/option/optgroup HTML output in production - These elements had a critical bug where they were rendering as self-closing tags (
<select />). The fix manually constructs HTML strings insrc/DOMInput.ts:61-125. Verify the HTML output is valid for:Run the example plugin in actual FDO desktop application - The
examples/dom_elements_plugin.tshas NEVER been tested in a real runtime environment. Build it and verify:Verify HTML boolean attribute handling - Boolean attributes like "selected" should be omitted when false, not set to
selected="false". Check the generated HTML to ensure proper HTML5 compliance.Review the architectural approach in DOMInput - The class uses
super(true)for self-closing behavior but manually overrides it for select/option/optgroup. Verify this pattern is acceptable and won't cause confusion for future maintainers.Test edge cases:
Test Plan
Build verification:
Integration test: Import
examples/dom_elements_plugin.tsinto a real FDO application and verify:Manual HTML inspection: Generate HTML from each new method and validate it against W3C HTML5 spec, especially for:
Notes
super(true)constructor. Fixed by manually building HTML strings for these non-self-closing elements.