-
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
Open
b-l-i-n-d
wants to merge
48
commits into
4.0.0-dev
Choose a base branch
from
v4-reviews
base: 4.0.0-dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…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.
sazedul-haque
requested changes
Jan 5, 2026
…e` and `icon_size` for consistency.
…nd remove redundant data conversion.
…f `id` and `review_content`.
sazedul-haque
requested changes
Jan 6, 2026
harunollyo
requested changes
Jan 7, 2026
Updated StarRating and StarRatingInput components for improved logic and code consistency, including default field name, icon size constant, and safer value checks. Refactored the dashboard reviews template to streamline variable naming, update template loading, and improve pagination logic.
Both StarRating and StarRatingInput now assign the rendered output to a component_string property before returning it. This allows access to the rendered string elsewhere in the component lifecycle if needed.
Introduces an $error property and an error() setter method to the InputField component, allowing error messages to be set and displayed. Updates usage example in the docblock to demonstrate the new error() method.
Replaced anchor tags with the Tutor Button component for the back and close actions in the account header. This improves consistency and leverages the component-based approach for buttons.
Merged the logic for displaying received and given reviews into a single template (reviews.php) and removed the now-redundant given-reviews.php. Updated the reviews page to dynamically handle both instructor and user reviews, streamline pagination, and improve the empty state handling.
Actions and edit form for reviews are now conditionally rendered based on a new 'is_editable' property. Also updated review content sanitization and changed form mode to 'onChange' for edit mode.
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.
harunollyo
requested changes
Jan 9, 2026
harunollyo
requested changes
Jan 9, 2026
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In this PR:
StarRatingInput,StartRatingcomponentsInputFieldcomponent bugfixButtoncomponent icon-only variant