-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
Support Zag collections #110
Support Zag collections #110
Conversation
Reviewer's Guide by SourceryThis PR adds support for Zag collections by introducing a new parsing mechanism for collection data attributes in the ZagHook JavaScript module. The implementation extends the existing context building functionality to include collection data alongside options and listeners. Class diagram for ZagHook.js with collection supportclassDiagram
class ZagHook {
+parseOptions()
+parseListeners()
+parseCollection()
+context()
}
note for ZagHook "parseCollection is a new method added to support Zag collections"
ZagHook : parseCollection() returns collection
ZagHook : context() includes collection
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @selenil - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider removing the debug console.log statement for 'listeners' before finalizing this PR
- The error handling could be more robust - consider adding proper error reporting/handling mechanisms beyond console.error
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Hi @selenil could you share the benefit of passing collection as a separated attribute vs passing in option? |
I think that for complex collections, where a user may want to convert the label and value of any item, it would be cleaner to parse them separately instead of providing another option. |
Currently, all options are passing via a single attribute instead of multiple attribute. In my opinion, it's not a big deal |
You're right, it would be better to pass all options through the |
Summary by Sourcery
New Features: