fasthtml icon indicating copy to clipboard operation
fasthtml copied to clipboard

[PR] Allow any Mapping children to specify attributes. fix #737

Open gazpachoking opened this issue 6 months ago • 1 comments

Related Issue #737

Proposed Changes

Dictionaries are allowed as a child of fasttags, which turns them into attributes. This change makes it so that any Mapping can be used for this, rather than just dicts. The purpose is to allow helpers to generate attributes that don't have to subclass the builtin dict.

Types of changes What types of changes does your code introduce? Put an x in all the boxes that apply:

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist Go over all the following points, and put an x in all the boxes that apply:

  • [x] My code follows the code style of this project.
  • [ ] My change requires a change to the documentation.
  • [ ] I have updated the documentation accordingly.
  • [x] I have added tests to cover my changes.
  • [x] All new and existing tests passed.
  • [x] I am aware that this is an nbdev project, and I have edited, cleaned, and synced the source notebooks instead of editing .py or .md files directly.

Additional Information Any additional information, configuration or data that might be necessary to reproduce the issue.

gazpachoking avatar May 24 '25 00:05 gazpachoking

Found 1 changed notebook. Review the changes at https://app.gitnotebooks.com/AnswerDotAI/fasthtml/pull/738

gitnotebooks[bot] avatar May 24 '25 00:05 gitnotebooks[bot]