Skip to content
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

feat: React Skeleton #2403

Open
wants to merge 39 commits into
base: develop
Choose a base branch
from
Open

Conversation

shohag121
Copy link
Member

@shohag121 shohag121 commented Oct 17, 2024

All Submissions:

  • My code follow the WordPress' coding standards
  • My code satisfies feature requirements
  • My code is tested
  • My code passes the PHPCS tests
  • My code has proper inline documentation
  • I've included related pull request(s) (optional)
  • I've included developer documentation (optional)
  • I've added proper labels to this pull request

Changes proposed in this Pull Request:

Related Pull Request(s)

Closes

How to test the changes in this Pull Request:

  • Steps or issue link

Changelog entry

Title

Detailed Description of the pull request. What was previous behaviour
and what will be changed in this PR.

Before Changes

Describe the issue before changes with screenshots(s).

After Changes

Describe the issue after changes with screenshot(s).

Feature Video (optional)

Link of detailed video if this PR is for a feature.

PR Self Review Checklist:

  • Code is not following code style guidelines
  • Bad naming: make sure you would understand your code if you read it a few months from now.
  • KISS: Keep it simple, Sweetie (not stupid!).
  • DRY: Don't Repeat Yourself.
  • Code that is not readable: too many nested 'if's are a bad sign.
  • Performance issues
  • Complicated constructions that need refactoring or comments: code should almost always be self-explanatory.
  • Grammar errors.

FOR PR REVIEWER ONLY:

As a reviewer, your feedback should be focused on the idea, not the person. Seek to understand, be respectful, and focus on constructive dialog.

As a contributor, your responsibility is to learn from suggestions and iterate your pull request should it be needed based on feedback. Seek to collaborate and produce the best possible contribution to the greater whole.

  • Correct — Does the change do what it’s supposed to? ie: code 100% fulfilling the requirements?
  • Secure — Would a nefarious party find some way to exploit this change? ie: everything is sanitized/escaped appropriately for any SQL or XSS injection possibilities?
  • Readable — Will your future self be able to understand this change months down the road?
  • Elegant — Does the change fit aesthetically within the overall style and architecture?

Summary by CodeRabbit

Dokan Plugin Release Notes

New Features

  • Introduced a new Status Dashboard with dynamic, extensible page and tab management.
  • Added DataView Table component for flexible data presentation.
  • Implemented new React-based dashboard layout with routing capabilities.
  • Enhanced vendor navigation and menu management.
  • Added new utility functions for case transformations.
  • Introduced a SortableList component for drag-and-drop sorting of items.

Improvements

  • Updated asset and script management for React frontend.
  • Improved REST API endpoints for customers, countries, and continents.
  • Enhanced dashboard navigation and template overriding mechanisms.
  • Added support for responsive design with Tailwind CSS.
  • Expanded WordPress DataViews integration.

Technical Enhancements

  • Introduced modular component and hook systems.
  • Implemented comprehensive routing with React Router.
  • Added new service providers and dependency management.
  • Enhanced error handling and permission checking.
  • Improved integration with the @dnd-kit library for sortable lists.

Performance

  • Optimized script and style loading.
  • Improved viewport dimension tracking.
  • Streamlined dashboard rendering.

Compatibility

  • Updated WordPress and WooCommerce integration.
  • Maintained backwards compatibility with existing plugins.

This comment was marked as off-topic.

coderabbitai[bot]

This comment was marked as off-topic.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (1)
src/Layout/index.tsx (1)

46-69: LGTM: Layout component structure is well-designed and flexible.

The Layout component is well-structured and provides flexibility through conditional rendering of header and footer components. The use of SlotFillProvider is appropriate for WordPress plugin integration.

Consider using default prop values for better readability:

const Layout = ({
    children,
    route,
-   title = '',
+   title = '', // Consider moving this default to the prop definition
    headerComponent,
    footerComponent,
}: LayoutProps) => {
    // ...
}

This change doesn't affect functionality but can improve code readability.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between a2701f5 and 057a92f.

📒 Files selected for processing (4)
  • src/Dashboard/index.tsx (1 hunks)
  • src/Layout/Header.tsx (1 hunks)
  • src/Layout/index.tsx (1 hunks)
  • src/Routing/index.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/Dashboard/index.tsx
  • src/Layout/Header.tsx
  • src/Routing/index.tsx
🧰 Additional context used
🔇 Additional comments (6)
src/Layout/index.tsx (6)

1-9: LGTM: Imports are appropriate and comprehensive.

The imports cover all necessary dependencies for the component's functionality, including WordPress-specific elements and custom components.


14-22: LGTM: ThemeProvider implementation is correct and follows best practices.

The ThemeProvider component correctly manages the theme state and provides it to its children through the context. The use of useState for theme management is appropriate for this use case.


24-43: LGTM: Type definitions are comprehensive and enhance type safety.

The DokanRoute type and LayoutProps interface provide clear and comprehensive type definitions, which will improve code readability and catch potential type-related errors early in development.


72-74: LGTM: useTheme custom hook is correctly implemented.

The useTheme custom hook provides a convenient way to access the theme context in other components. Its implementation follows React hook conventions.


76-76: LGTM: Default export is correct.

The Layout component is correctly exported as the default export, following common React component export patterns.


1-76: Overall, the Layout component is well-implemented with room for minor improvements.

The new Layout component provides a flexible and type-safe structure for the application. It effectively integrates WordPress-specific components and implements theming capabilities. The code follows React best practices and is well-organized.

To further improve the code:

  1. Address the issue raised in the previous review comment regarding the default value for ThemeContext (lines 11-12).
  2. Implement the null check for route.id as suggested in the previous review comment (line 65).
  3. Consider moving the default value for the title prop to the prop definition for improved readability.

These changes will enhance the robustness and maintainability of the component.

To ensure that the Layout component is being used correctly throughout the project, you can run the following verification script:

This script will help identify where the Layout component and useTheme hook are being used, allowing you to verify that they are being implemented correctly across the project.

mralaminahamed and others added 2 commits October 21, 2024 13:47
This commit introduces a new REST API endpoint for searching customers
specific to a vendor's orders. Key changes include:

- Add new route `/dokan/v1/customers/search` in CustomersController
- Implement `search_customers` method with the following features:
  * Search customers by ID or term (name/email)
  * Limit results to customers who have ordered from the current vendor
  * Support excluding specific customer IDs
  * Limit results to 20 when search term is less than 3 characters
  * Apply `dokan_json_search_found_customers` filter for extensibility
- Add permission check to ensure only users with 'edit_shop_orders' capability can access
- Include detailed PHPDoc for the new filter

This feature allows vendors to efficiently search their customer base
through the REST API, mirroring the functionality of the existing AJAX action
while providing a standardized API interface.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (2)
src/Routing/index.tsx (2)

1-5: Remove unused imports to improve code cleanliness and performance.

The following imports are not used in this file and should be removed:

  • redirect
  • replace

Apply this diff to remove unused imports:

-import { useNavigate, useParams, useLocation, redirect, replace, useMatches, useNavigation,  } from 'react-router-dom';
+import { useNavigate, useParams, useLocation, useMatches, useNavigation } from 'react-router-dom';

7-41: LGTM! Minor formatting suggestion.

The withRouter higher-order component is well-implemented and provides a good abstraction for adding routing props to other components. It correctly handles both function and element components.

Consider removing extra spaces in the parameter destructuring for consistency:

-        let params   = useParams();
+        let params = useParams();
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 057a92f and 3d4d19c.

📒 Files selected for processing (2)
  • src/Dashboard/index.tsx (1 hunks)
  • src/Routing/index.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/Dashboard/index.tsx
🧰 Additional context used
🔇 Additional comments (2)
src/Routing/index.tsx (2)

70-70: LGTM! Default export is correct.

The default export of the getRoutes function is appropriate and follows good module design practices.


43-68: ⚠️ Potential issue

Address TypeScript errors and ensure consistent path prefixes.

  1. The paths in the route definitions are inconsistent. Some start with '/' while others don't. This can lead to unexpected routing behavior.

  2. The use of @ts-ignore suppresses TypeScript errors, which can hide potential issues. Instead, properly type the wp object.

To resolve these issues:

  1. Make the paths consistent by adding a leading '/' to all paths:
-            path: 'settings',
+            path: '/settings',
  1. Remove the @ts-ignore comment and properly type the wp object. You can declare the type for wp or extend the Window interface:
declare global {
  interface Window {
    wp: {
      hooks: {
        applyFilters: (filterName: string, value: any, ...args: any[]) => any;
      };
    };
  }
}

routes = window.wp.hooks.applyFilters('dokan-dashboard-routes', routes) as Array<DokanRoute>;

These changes will improve type safety and consistency in your routing logic.

coderabbitai[bot]

This comment was marked as off-topic.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (2)
src/Layout/Header.tsx (2)

7-18: LGTM: Well-structured and flexible component rendering.

The component's structure is well-organized and utilizes Tailwind CSS for responsive styling. The use of Slot components for extensibility is a great practice. The conditional rendering of the title and passing of the navigate function to the header actions slot are implemented correctly.

Consider adding an aria-label to the outer div to improve accessibility:

- <div className="flex items-center sm:flex-wrap md:flex-nowrap">
+ <div className="flex items-center sm:flex-wrap md:flex-nowrap" aria-label="Page header">

1-21: Overall: Excellent implementation of the Header component.

This Header component is well-implemented and aligns perfectly with the PR objectives of setting up a skeleton for the new vendor dashboard. It provides a flexible and extensible structure, utilizing WordPress components and React Router for navigation. The use of Slot components allows for easy customization, which is crucial for a dashboard layout.

The component follows React best practices, uses modern functional component syntax, and leverages Tailwind CSS for responsive styling. This implementation sets a solid foundation for further development of the dashboard layout.

As you continue developing the dashboard, consider the following:

  1. Implement unit tests for this component to ensure its behavior remains consistent as the project evolves.
  2. Document the usage of the Slot components to guide other developers on how to extend the header functionality.
  3. Consider creating a theme context if you plan to implement dark mode or other theme variations in the future.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between c295722 and 0b1ce02.

📒 Files selected for processing (1)
  • src/Layout/Header.tsx (1 hunks)
🧰 Additional context used
🔇 Additional comments (4)
src/Layout/Header.tsx (4)

1-2: LGTM: Imports are appropriate and necessary.

The imports of Slot from @wordpress/components and useNavigate from react-router-dom are well-chosen for the component's requirements. They align with the WordPress ecosystem and provide necessary routing functionality.


4-4: LGTM: Component definition is clear and follows best practices.

The Header component is well-defined as a functional component with a descriptive name. The use of default prop value for title is a good practice for handling optional props.


5-5: LGTM: Proper use of the useNavigate hook.

The useNavigate hook is correctly used and stored in a well-named constant. This setup will allow for programmatic navigation within the component.


21-21: LGTM: Appropriate default export.

The default export of the Header component is correct and follows common React component export patterns.

coderabbitai[bot]

This comment was marked as off-topic.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Outside diff range and nitpick comments (3)
src/Layout/index.tsx (1)

25-44: Add JSDoc documentation and improve type consistency.

The type definitions would benefit from documentation and consistent optionality.

+/**
+ * Represents a route configuration in the Dokan dashboard
+ */
 export type DokanRoute = {
+    /** Unique identifier for the route */
     id: string;
+    /** Display title for the route */
     title?: string;
-    icon?: JSX.Element | React.ReactNode;
+    /** Icon component to display (React.ReactNode includes JSX.Element) */
+    icon?: React.ReactNode;
-    element: JSX.Element | React.ReactNode;
+    /** Component to render for this route */
+    element: React.ReactNode;
     // ... rest of the type
 };

+/**
+ * Props for the Layout component
+ */
 interface LayoutProps {
     children: React.ReactNode;
     route: DokanRoute;
     title?: string;
-    headerComponent?: JSX.Element|React.ReactNode;
-    footerComponent?: JSX.Element|React.ReactNode;
+    headerComponent?: React.ReactNode;
+    footerComponent?: React.ReactNode;
 }
package.json (2)

64-64: Consider code-splitting for React Router.

The addition of react-router-dom is appropriate for dashboard navigation. However, ensure route-based code splitting is implemented to optimize initial load performance.

Recommendations:

  1. Use React.lazy() for route components
  2. Implement Suspense boundaries
  3. Consider implementing progressive loading for dashboard sections

Line range hint 25-64: Review bundle size impact.

The addition of multiple new dependencies could significantly increase the bundle size. Consider implementing appropriate optimization strategies.

Recommendations:

  1. Implement tree-shaking for all new dependencies
  2. Consider using dynamic imports for less frequently used components
  3. Monitor the bundle size impact using webpack-bundle-analyzer
  4. Implement chunking strategies to optimize loading performance
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between e59521e and e6bf1ec.

📒 Files selected for processing (2)
  • package.json (3 hunks)
  • src/Layout/index.tsx (1 hunks)
🔇 Additional comments (4)
src/Layout/index.tsx (1)

1-10: LGTM! Well-organized imports following WordPress conventions.

The imports are properly structured, using WordPress-specific packages where appropriate.

package.json (3)

57-63: Verify WordPress package versions compatibility.

The WordPress packages being added (@wordpress/components, @wordpress/data, etc.) are at different major versions (v28.x vs v4.x vs v7.x). This might lead to compatibility issues.

#!/bin/bash
# Check for potential version conflicts in WordPress packages
echo "Checking @wordpress/* package usage..."
rg -l "@wordpress" | xargs cat | rg "from '@wordpress/"

56-56: Verify @getdokan/dokan-ui compatibility.

The addition of @getdokan/dokan-ui (v1.0.14) is a significant change. Ensure it's compatible with the WordPress admin environment and follows the project's design system.

#!/bin/bash
# Check for potential UI component usage
echo "Checking dokan-ui component usage..."
rg -l "@getdokan/dokan-ui" | xargs cat | rg "from '@getdokan/dokan-ui"

25-26: Verify Tailwind CSS configuration to prevent style conflicts.

The addition of Tailwind CSS utilities (@tailwindcss/forms, @tailwindcss/typography, tailwindcss-scoped-preflight) is appropriate for a modern React dashboard. However, ensure proper scoping to prevent conflicts with WordPress admin styles.

Consider the following recommendations:

  1. Use tailwindcss-scoped-preflight to scope Tailwind's base styles
  2. Configure content paths in tailwind.config.js to minimize bundle size
  3. Add appropriate CSS cascade layers to manage style precedence

Also applies to: 39-39

src/Layout/index.tsx Outdated Show resolved Hide resolved
src/Layout/index.tsx Outdated Show resolved Hide resolved
src/Layout/index.tsx Outdated Show resolved Hide resolved
…er-api' into update/vendor-dashboard-structure

# Conflicts:
#	includes/REST/Manager.php
coderabbitai[bot]

This comment was marked as off-topic.

coderabbitai[bot]

This comment was marked as off-topic.

coderabbitai[bot]

This comment was marked as off-topic.

* update: Status elements and status page added

* update: Status elements dynamically render

* update: Vendor  Dashboard nave menu Status elements added

* refactor: exception added in set_children

* refactor: translation and custom element support added.

* refactor: removed unnecessary status element in page
coderabbitai[bot]

This comment was marked as off-topic.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (1)
src/Status/SettingsParser.tsx (1)

33-40: ⚠️ Potential issue

Improve type safety and null handling in the default case.

The current implementation has several issues:

  1. Uses @ts-ignore to bypass type checking
  2. Returns an empty fragment which is unnecessary
  3. Uses wp.hooks instead of wp namespace

Apply this fix:

         default:
-            // @ts-ignore
-            return wp.hooks.applyFilters(
+            const customElement = wp.hooks.applyFilters<React.ReactElement>(
                 'dokan_status_custom_element',
-                <></>,
+                null,
                 element
             );
+            return customElement || null;

Also, consider adding a type declaration for the WordPress filters:

declare global {
    interface Window {
        wp: {
            hooks: {
                applyFilters<T>(
                    hookName: string,
                    defaultValue: T | null,
                    ...args: any[]
                ): T | null;
            };
        };
    }
}
🧰 Tools
🪛 Biome (1.9.4)

[error] 37-37: Avoid using unnecessary Fragment.

A fragment is redundant if it contains only one child, or if it is the child of a html element, and is not a keyed fragment.

(lint/complexity/noUselessFragments)

🧹 Nitpick comments (1)
src/Status/SettingsParser.tsx (1)

12-13: Consider extracting props interface for better maintainability.

Since this is a parser component that might grow in complexity, consider extracting the props into a separate interface:

+interface SettingsParserProps {
+    element: StatusElement;
+}
+
-const SettingsParser = ( { element }: { element: StatusElement } ) => {
+const SettingsParser = ( { element }: SettingsParserProps ) => {
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bd36d1b and 047c91b.

📒 Files selected for processing (1)
  • src/Status/SettingsParser.tsx (1 hunks)
🧰 Additional context used
🪛 Biome (1.9.4)
src/Status/SettingsParser.tsx

[error] 37-37: Avoid using unnecessary Fragment.

A fragment is redundant if it contains only one child, or if it is the child of a html element, and is not a keyed fragment.

(lint/complexity/noUselessFragments)

⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: e2e tests (3, 3)
  • GitHub Check: e2e tests (2, 3)
  • GitHub Check: e2e tests (1, 3)
  • GitHub Check: api tests (1, 1)
🔇 Additional comments (2)
src/Status/SettingsParser.tsx (2)

1-11: Well-organized imports!

The imports are logically grouped and each imported component corresponds to a specific case in the switch statement.


14-32: Clean and consistent switch statement implementation!

The switch statement is well-structured with:

  • Consistent prop passing
  • Proper key usage for list rendering
  • Clear type-to-component mapping

@getdokan getdokan deleted a comment from coderabbitai bot Jan 15, 2025
coderabbitai[bot]

This comment was marked as off-topic.

@Aunshon
Copy link
Collaborator

Aunshon commented Jan 15, 2025

@mrabbani vai Need to update the feature-override readme.me doc.

@Aunshon Aunshon requested a review from mrabbani January 15, 2025 07:35
coderabbitai[bot]

This comment was marked as off-topic.

…2514)

* enhance: Handle vendor dashboard menu highlighter using react route.

* fix: remove useEffect when not used.

* enhance: update dashboard navigation list

* fix: phpcs stuff

* fix: prevent error for pathname.
@getdokan getdokan deleted a comment from coderabbitai bot Jan 17, 2025
@getdokan getdokan deleted a comment from coderabbitai bot Jan 17, 2025
@getdokan getdokan deleted a comment from coderabbitai bot Jan 17, 2025
@getdokan getdokan deleted a comment from coderabbitai bot Jan 17, 2025
@getdokan getdokan deleted a comment from coderabbitai bot Jan 17, 2025
@getdokan getdokan deleted a comment from coderabbitai bot Jan 17, 2025
@getdokan getdokan deleted a comment from coderabbitai bot Jan 17, 2025
Copy link
Member

@mrabbani mrabbani left a comment

Choose a reason for hiding this comment

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

Pls write the test cases for all REST and eligible methods.

use WP_REST_Request;
use WP_REST_Response;

class DokanDataContinentsController extends WC_REST_Data_Continents_Controller {
Copy link
Member

Choose a reason for hiding this comment

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

  • Pls refactor the class just by overriding the get_items_permissions_check and try to not override any other methods.
  • Must add the test case.

use WP_REST_Request;
use WP_REST_Response;

class DokanDataCountriesController extends WC_REST_Data_Countries_Controller {
Copy link
Member

Choose a reason for hiding this comment

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

Same as Continents controller.

Comment on lines +42 to +59
foreach ( $downloads as $download ) {
$product = dokan()->product->get( $download->product_id );
$download->product = [
'id' => $product->get_id(),
'name' => $product->get_name(),
'slug' => $product->get_slug(),
'link' => $product->get_permalink(),
];

/**
* @var $file \WC_Product_Download
*/
$file = $product->get_file( $download->download_id );
$download->file_data = $file->get_data();
$download->file_data['file_title'] = wc_get_filename_from_url( $product->get_file_download_path( $download->download_id ) );

$updated_response[] = $download;
}
Copy link
Member

Choose a reason for hiding this comment

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

Pls remove the N+1 query. Use query param post__in

$schema = parent::get_product_collection_params();

$schema['only_downloadable'] = [
'description' => __( 'If truthy value then only downloadable products will be returned', 'dokan' ),
Copy link
Member

Choose a reason for hiding this comment

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

Pls fix the text-domain

*
* @return array
*/
public function display_notice( array $notices ): array {
Copy link
Member

Choose a reason for hiding this comment

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

Pls show notice if dokan_is_dashboard_nav_dependency_resolved is used to prevent the React.

CC: @shohag121 vai

};

domReady( function () {
const rootElement = document.querySelector( '.dashboard-content-area' );
Copy link
Member

Choose a reason for hiding this comment

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

Pls use id instead of class.

// @ts-ignore
const dashBoardUrl = window.dokan?.urls?.dashboardUrl ?? '#';

return (
Copy link
Member

Choose a reason for hiding this comment

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

Need simple design for 404 status.

CC: @getdokan/product

import {Slot} from "@wordpress/components";

const Footer = () => {
return <><Slot name="dokan-footer-area" /></>;
Copy link
Member

Choose a reason for hiding this comment

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

Pls add developer docs


const Header = ( { title = '' } ) => {
const navigate = useNavigate();

Copy link
Member

Choose a reason for hiding this comment

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

  • Pls apply filter for title
  • Pls add developer docs

@@ -0,0 +1,72 @@
<?php
Copy link
Member

Choose a reason for hiding this comment

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

Pls use ID to render the react compoenent

@@ -9,6 +9,7 @@ const entryPoint = {
// Dokan tailwind css
'dokan-tailwind': './src/tailwind.css',

'frontend': './src/Dashboard/index.tsx',
Copy link
Member

Choose a reason for hiding this comment

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

Pls extract the entries to the separate file

secondary: {
DEFAULT:
'var(--dokan-button-secondary-text-color, var(--dokan-button-background-color))',
hover: 'var(--dokan-button-secondary-hover-text-color, var(--dokan-button-text-color))',
Copy link
Member

Choose a reason for hiding this comment

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

What will be the default color if the css variables are not declared/assigned.

CC: @shohag121 vai.

* feat: introduce dataviews from dokan free.

* feat: introduce dataviews from dokan free.

* revert: add dokan category comission js.

* update: remove category commission js updates.

* remove: revert component package js file.

* remove: dokan sidebar class from data view table.

* enhance: update dataviews doc.

* update: filter naming convension for dataviews property.

* remove: module federation node package from json file.

* remove: example dataviews table usage component.

* remove: example dataviews table usage component.

* update: button class name for color scheme customizer.

* update: split webpack entries, use change-case for namespace cases, handle responsive preview from base components.

* update: introduce utilities directory, make exporter from dokan free & add documentation for components, utilities.

* update: routing folder naming convesional stuff.

* update: add component and utilities accessor doc for dokan free.

* Add router param
add dataview table id

* fix: add file exists check before register components scripts.

* revert: remove default config from webpack entries.

* enhance: separate hooks & introduce @dokan/hooks.

* enhance: add documentation for hooks and update viewport file extension.

* remove: react components manual enqueue.

* update: variable name of component assets path.

---------

Co-authored-by: Aunshon <[email protected]>
coderabbitai[bot]

This comment was marked as off-topic.

* feat: introduce dataviews from dokan free.

* feat: introduce dataviews from dokan free.

* revert: add dokan category comission js.

* update: remove category commission js updates.

* remove: revert component package js file.

* remove: dokan sidebar class from data view table.

* enhance: update dataviews doc.

* update: filter naming convension for dataviews property.

* remove: module federation node package from json file.

* remove: example dataviews table usage component.

* remove: example dataviews table usage component.

* update: button class name for color scheme customizer.

* update: split webpack entries, use change-case for namespace cases, handle responsive preview from base components.

* update: introduce utilities directory, make exporter from dokan free & add documentation for components, utilities.

* update: routing folder naming convesional stuff.

* update: add component and utilities accessor doc for dokan free.

* Add router param
add dataview table id

* fix: add file exists check before register components scripts.

* revert: remove default config from webpack entries.

* enhance: Introduce dokan Draggable/Sortable list component.

* revert: remove viewport dimension hook.

---------

Co-authored-by: Aunshon <[email protected]>
coderabbitai[bot]

This comment was marked as off-topic.

*
* @return Table
*/
public static function table( string $id ): Table {
Copy link
Member

Choose a reason for hiding this comment

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

  • Pls use factory
  • Change the visibility to protected and remove the static so that it can only be used from the self & descendants.

CC: @shohag121 vai.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants