Skip to content

Conversation

@sazedul-haque
Copy link
Collaborator

No description provided.

Introduces new 'passed' and 'failed' keys to the translation array for consistency with other status keys. Also aligns array key formatting for improved readability.
Updated SCSS to include styles for .tutor-badge-passed and .tutor-badge-failed. Added a 'classes' method to Badge.php to allow setting additional CSS classes, and ensured extra classes are merged and sanitized in the rendered output.
Moved border and radius styles to a new .tutor-table-bordered class in SCSS and updated the demo table wrapper to use this class. Improved table header and cell styling for better consistency and appearance.
Introduced new SCSS utility files for transform and transition properties, including classes for transform origin, scale, rotate, translate, skew, transform style, backface visibility, transition property, duration, delay, and basic animation. Updated the utilities index to forward the new modules.
Introduces the ability to set a user object or ID for the Avatar component, automatically handling profile photo and initials generation. Adds support for custom alt text and updates rendering to improve accessibility and layout.
Introduces caching via TutorCache for user avatar data to improve performance. Avatar data (src, type, initials, alt) is now stored and retrieved from cache, reducing repeated database and meta queries.
Updated calendar component to pass MouseEvent to onClickDate and related handlers. This allows fallback date selection using event target when selected dates are missing, improving robustness of range selection.
Introduced a search filter to assignment queries by adding a LIKE condition on post_title when a search term is provided. This allows filtering assignments by title in relevant database queries.
Introduced PLACEMENT_BOTTOM_START and PLACEMENT_BOTTOM_END constants for placement options in DateFilter. Updated default placement to use the new constant and improved code clarity in usage examples. Adjusted button and icon sizes for better UI consistency.
Introduces a clear button to the DateFilter component, allowing users to reset date selections. The calendar component now listens for a custom 'tutor-calendar:clear' event to clear selected dates and update the UI accordingly.
Updated the calendar component to handle clicks in 'multiple-ranged' selection mode. Now, if two dates are selected but the first is empty, clicking a date sets both start and end to the clicked date. Also updated the onClickDate handler to pass the MouseEvent.
Replaces single date filtering with start and end date range filtering using a prepared SQL statement for improved flexibility and security.
@sazedul-haque sazedul-haque added the 4.0.0 Tutor v4.w0w label Jan 6, 2026
Introduces a check icon that appears with opacity transition on the active calendar preset button. Updates SCSS for layout, responsiveness, and button styling, and modifies the TypeScript template to include the icon element.
if ( $this->count( $filter_data ) ) {
extract( $filter_data );//phpcs:ignore

if ( ! empty( $search_filter ) ) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$search_filter is not passed by `$filter_data

$date_filter = tutor_get_formated_date( 'Y-m-d', $date_filter );
$date_query = " AND DATE(post_date) = '{$date_filter}'";
if ( ! empty( $start_date ) && ! empty( $end_date ) ) {
$start_date = tutor_get_formated_date( 'Y-m-d', $start_date );
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

/**
* User object or ID.
*
* @since 4.0.0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep new line after @SInCE tag

/**
* Avatar alt text.
*
* @since 4.0.0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

}

$user_id = is_object( $user ) ? $user->ID : (int) $user;
$cache_key = 'tutor_avatar_component_user_data_' . $user_id;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to use tutor prefix. It's not mess with other.

Use

$cache_key  = "avatar_component_user_data_{$user_id}";

TutorCache::set( $cache_key, $data );

// Apply to current instance.
if ( $data['src'] ) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's always true, because $data has src key

*
* @return $this
*/
public function classes( $classes ) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need this method, We can pass class by attr or attrs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4.0.0 Tutor v4.w0w

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants