feat: CheckBoxBuilder and RadioButtonBuilder for component parity - #123
Open
ContextFound wants to merge 4 commits into
Open
feat: CheckBoxBuilder and RadioButtonBuilder for component parity#123ContextFound wants to merge 4 commits into
ContextFound wants to merge 4 commits into
Conversation
- Add custom stable serializer for widget tree comparison (test/utils/serializer.dart) - Add test helpers: pumpMarkdown, expectMarkdown, expectMarkdownContains (test/utils/test_helpers.dart) - Add inline element tests: bold, italic, strikethrough, underline, highlight, links - Add block element tests: headings, lists, code blocks, tables, checkboxes, radio buttons, blockquotes, horizontal rules, indentation - Add LaTeX tests: inline and block math expressions - Add image tests with dimension support - Add regression test folder structure for bug reproduction tests - Add test framework documentation (test/README.md) The serializer produces stable, comparable string output that avoids brittle widget equality checks. Tests verify both structural output and widget rendering. All 123 tests pass.
failing tests in /bugs to identify known bugs once fixed, move to /regression test/README outlining approach complex integration test added serializer fix to render internal text two known link rendering bugs identified, but currently skipped
- Introduced CheckBoxBuilder and RadioButtonBuilder types for custom rendering of checkboxes and radio buttons in GptMarkdown. - Updated GptMarkdownConfig to include new builder properties. - Modified CheckBoxMd and RadioButtonMd to utilize the new builders, allowing for flexible UI customization. - Added comprehensive tests to validate the functionality of the new builders and their integration with GptMarkdown.
- Added rawText property to GptMarkdownConfig to store the original markdown text for checkboxes and radio buttons. - Updated CheckBoxMd and RadioButtonMd to populate rawText before invoking custom builders. - Enhanced tests to verify.
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.
In a project, I wanted a custom handling of a rendered markdown checkbox to allow checking / unchecking logic, but there is currently no CheckBoxBuilder nor RadioButtonBuilder like there is for imageBuilder, linkBuilder, etc.
This PR implements the builders following the existing pattern used by other component builders.
Changes