-
Notifications
You must be signed in to change notification settings - Fork 82
✨ Student Review Component #2285
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
Conversation
…rmalinks, and refactor the given reviews template.
…dd review action transition, and remove debug output.
…/delete functionality, new API endpoints, and associated UI components.
…tandardize review form field names.
…omponent and update associated frontend logic
… successful review deletion.
…e` and `icon_size` for consistency.
Simplified the assignment of the is_editable property for reviews by replacing array_map with a foreach loop. Removed unused received_count variable and improved variable naming for clarity in pagination and review count handling.
Refines the initials() method to generate initials from the user's display name by extracting the first letter of each word, uppercasing them, and limiting the result to two characters. This ensures more accurate and consistent avatar initials.
Added student avatar and display name to review cards for non-editable reviews. Updated SCSS for student info styling and set user_avatar in reviews data.
Introduced a new review card component for displaying individual course reviews and created a reviews page template that utilizes this component. Minor formatting update was also made to the profile pages header component.
Appended a newline character at the end of review-card.php and reviews.php to follow POSIX standards and improve file formatting consistency.
Refactored the initials() method to directly use the sanitized and uppercased input, removing logic that extracted initials from a display name. This change assumes the input is already the desired initials.
Changed navigation elements from <a> tags to <button> elements in the profile pages header component for improved accessibility and semantic correctness.
Appends a newline character at the end of profile-pages-header.php to improve file formatting and comply with POSIX standards.
Replaced (int) casts with esc_attr for better output sanitization in StarRatingInput. Refactored reviews pagination to always render and added a class attribute for consistent styling.
|
Wait for approval from harun bhai. |
components/StarRatingInput.php
Outdated
| * | ||
| * @return self | ||
| */ | ||
| public function fieldName( string $name ): self { |
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.
Use snake_case
components/StarRatingInput.php
Outdated
| * | ||
| * @return self | ||
| */ | ||
| public function onChange( string $callback ): self { |
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.
Use snake_case
… and update help text escaping in InputField.
… and StarRatingInput components.
| use Tutor\Components\Constants\Size; | ||
| use Tutor\Components\Constants\Variant; | ||
|
|
||
| defined( 'ABSPATH' ) || exit; |
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.
Move this immediate after file comment
In this PR:
StarRatingInput,StartRatingcomponentsInputFieldcomponent bugfixButtoncomponent icon-only variant