-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat: support iframeless design and add init function for initializing maidr #637
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This pull request enhances the initialization of MAIDR by adding optional element-specific initialization with a new id parameter and improved handling of elements with the maidr-data attribute.
- Added an optional id parameter to the init() function to initialize specific elements.
- Implemented unique id generation for elements missing an id and prevented duplicate maidr entries.
- Updated the DOMContentLoaded event listener to call the new init() function.
Reviewed Changes
File | Description |
---|---|
src/js/init.js | Refactored initialization to support iframeless design and element-specific initialization, including id handling improvements. |
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This PR improves the initialization process for MAIDR, particularly in iframeless environments such as Jupyter Notebook, by adding an optional id parameter to the init() function and enhancing ID management. It also updates modal classes in constants.js to use a consistent "maidr-modal" naming convention.
- Added an optional id parameter to init() with element-specific initialization and duplicate check.
- Improved ID generation and handling in the init function.
- Updated modal class names to "maidr-modal" in constants.js.
Reviewed Changes
File | Description |
---|---|
src/js/init.js | Refactored initialization by adding the init() function with id support, improved ID assignment, and duplicate detection. |
src/js/constants.js | Renamed modal classes from "modal" to "maidr-modal" for a consistent design. |
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
# [2.30.0](v2.29.1...v2.30.0) (2025-02-28) ### Features * support iframeless design and add init function for initializing maidr ([#637](#637)) ([64c9467](64c9467))
🎉 This PR is included in version 2.30.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Pull Request
Description
This pull request fixes an issue where MAIDR was not initializing properly in environments like Jupyter Notebook when an iframe wasn’t used. The primary update improves the initialization functionality in init.js to support element-specific initialization and enhances ID handling.
Related Issues
Changes Made
Checklist
ManualTestingProcess.md
, and all tests related to this pull request pass.Additional Notes
Note that it is very crucial that this PR is merged and deployed before any changes on PyMaidr are made live.