Skip to content
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

Fixes issues in the PR "Button widget data attributes" #7852

Conversation

saqimtiaz
Copy link
Contributor

@saqimtiaz saqimtiaz commented Nov 22, 2023

Fixes:

  • ensures that event attributes are excluded
  • add tests for event attribute exclusion
  • ensures that style. attributes are supported when no sourcePrefix is specified
  • adds tests for style. attributes for the element widget
  • extends fakedom to accurately assign style property of fake DOM node.
  • ensures that attribute order is respected and adds a test for this

Copy link

vercel bot commented Nov 22, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
tiddlywiki5 ✅ Ready (Inspect) Visit Preview Nov 22, 2023 10:13am

@saqimtiaz saqimtiaz marked this pull request as ready for review November 22, 2023 09:52
@saqimtiaz
Copy link
Contributor Author

@Jermolene when you get the opportunity some feedback would be appreciated. I discovered a lot of broken edge cases with the implementation in the original PR for which I have added tests.

@Jermolene
Copy link
Owner

Fantastic, thank you @saqimtiaz

@Jermolene Jermolene merged commit 5ce2601 into Jermolene:button-widget-data-attributes Nov 22, 2023
4 checks passed
Jermolene added a commit that referenced this pull request Nov 22, 2023
* Add data attribute support to button widget

* Fix typo

* Refactor ready for making mechanism more generic

* Apply more generic implementation to multiplate widgets

* Refactor to use existing widget.assignAttributes() method

* Fix typo

* Clarify docs

* Update docs

* Update select widget to support style.* attributes

* Remove obsolete comment

* Fixes refresh issues for checkbox and links widgets for data attributes (#7846)

* fix: refresh issues with checkbox and links widgets

* fix: indenting

* Feat: add support for data attributes to Draggable and Droppable widgets (#7845)

* Docs clarification

* docs: add style and data attributes to Draggable and Droppable widget docs (#7850)

* Refactors Select widget to directly create DOM node (#7848)

* fix: refactored SelectWidget to directly create DOM nodes

* fix: refactored SelectWidget to directly create DOM nodes

* fix: improve refresh handling for select widget

* Fixes issues in the PR "Button widget data attributes" (#7852)

* fix: fixed ordered attributes handling and improved tests to catch event attributes

* fix: clean up code from testing

* fix: more tests and refactoring

* fix: use lowercase when checking for event attribute prefix

* fix: use lowercase when checking for event attribute prefix

* fix: changed comment wording

* fix: minor refactoring

* refactor: for brevity

---------

Co-authored-by: Saq Imtiaz <saq.imtiaz@gmail.com>
munnox pushed a commit to munnox/TiddlyWiki5 that referenced this pull request Dec 24, 2023
* Add data attribute support to button widget

* Fix typo

* Refactor ready for making mechanism more generic

* Apply more generic implementation to multiplate widgets

* Refactor to use existing widget.assignAttributes() method

* Fix typo

* Clarify docs

* Update docs

* Update select widget to support style.* attributes

* Remove obsolete comment

* Fixes refresh issues for checkbox and links widgets for data attributes (Jermolene#7846)

* fix: refresh issues with checkbox and links widgets

* fix: indenting

* Feat: add support for data attributes to Draggable and Droppable widgets (Jermolene#7845)

* Docs clarification

* docs: add style and data attributes to Draggable and Droppable widget docs (Jermolene#7850)

* Refactors Select widget to directly create DOM node (Jermolene#7848)

* fix: refactored SelectWidget to directly create DOM nodes

* fix: refactored SelectWidget to directly create DOM nodes

* fix: improve refresh handling for select widget

* Fixes issues in the PR "Button widget data attributes" (Jermolene#7852)

* fix: fixed ordered attributes handling and improved tests to catch event attributes

* fix: clean up code from testing

* fix: more tests and refactoring

* fix: use lowercase when checking for event attribute prefix

* fix: use lowercase when checking for event attribute prefix

* fix: changed comment wording

* fix: minor refactoring

* refactor: for brevity

---------

Co-authored-by: Saq Imtiaz <saq.imtiaz@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants