-
Notifications
You must be signed in to change notification settings - Fork 82
Lesson comments implemented #2333
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
base: 4.0.0-dev
Are you sure you want to change the base?
Conversation
|
|
||
| $comment_id = 0; | ||
| $comment = Input::post( 'comment', '', Input::TYPE_KSES_POST ); | ||
| $lesson_id = Input::post( 'comment_post_ID', 0, Input::TYPE_INT ); |
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.
A validation check should be added for comment & the lesson_id.
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.
This function also used for load more in legacy mode. Cannot early return if comment and lesson_id not found.
Centralized comment and reply DOM ID prefixes and class names into constants to reduce duplication and improve maintainability. Updated all relevant DOM queries and element ID constructions to use these constants.
Adds logic to ensure the toast container is appended to the fullscreen element when the document enters fullscreen mode. This ensures toast notifications remain visible and correctly positioned during fullscreen transitions.
Introduce on_change and bind_active_value support to DropdownFilter. Adds protected properties ($on_change, $active_value) and fluent setters (on_change(), bind_active_value()). Integrates Alpine.js state into x-data to expose labels and counts, binds button label and count to Alpine variables when active_value is set, and conditionally renders option items as buttons that invoke the provided JS callback (or falls back to anchor links). Preserves existing search and count behavior while enabling reactive UI updates via Alpine and a JS change callback.
Replace buffered PHP template with string construction using sprintf. Subtitle is now conditionally built into $subtitle_html, attributes are injected via get_attributes_string(), and the resulting markup is stored in $this->component_string and returned. This simplifies rendering and removes reliance on output buffering while preserving escaping for title and subtitle.
Add editingId and replyingId to the lesson comments state and reset them after successful edit/reply. Rename typo'd handelEditComment to handleEditComment. Update comment template to replace showEditForm/showReplyForm with editingId/replyingId checks, adjust x-show/x-cloak and cancel handlers to clear IDs, and dispatch focus events when opening forms. These changes centralize which comment is being edited or replied to and fix form visibility/behavior and focus handling.
No description provided.