* test: simplify test case
* update
* update
* update
* test: simplify style test case
* update
* update
* update
* update
* test: simplify style test case again
* update
* update
* update color to rgb
* feat(empty): add semantic customization support based on next branch
- Add classNames and styles props for semantic customization
- Support four semantic parts: root, image, description, footer
- Use advanced useMergeSemantic hook with type parameters
- Add SemanticClassNamesType and SemanticStylesType utility types
- Implement mergedProps pattern for conditional semantic logic
- Add comprehensive semantic demo with style-class example
- Add ConfigProvider-level test for Empty semantic customization
- Update API documentation in both English and Chinese
- Follow PR #54917 pattern for consistent semantic implementation
- Based on next branch with latest semantic infrastructure
* test: add snapshots for Empty semantic style-class demo
- Add snapshot for style-class.tsx demo in demo.test.ts.snap
- Add snapshot for style-class.tsx demo in demo-extend.test.ts.snap
- Snapshots include semantic classNames and styles verification:
* custom-empty-root with backgroundColor, padding, borderRadius
* custom-empty-image with filter grayscale
* custom-empty-description with color and fontWeight
* custom-empty-footer with marginTop
- Verify semantic customization is properly applied to DOM elements
- Complete test coverage for Empty component semantic features
* fix: improve Empty semantic implementation based on review feedback
- Add default semantic classNames for image, description, footer parts
- Update API documentation with detailed descriptions and function type support
- Follow FloatButton pattern for consistent semantic implementation
- Improve documentation clarity for classNames and styles props
- Support both object and function-based semantic customization
- Ensure proper semantic class application to DOM elements
* fix: address PR review feedback for Empty semantic implementation
- Remove ineffective React.useMemo for mergedProps, use simple object spread
- Add comprehensive function-based semantic tests in describe('semantic classNames/styles')
- Add ConfigProvider-level function-based semantic tests
- Enhance demo to showcase both object and function-based semantic customization
- Add interactive demo with Switch to demonstrate dynamic function-based styling
- Test function parameter passing and prop dependency handling
- Ensure complete test coverage for both object and function semantic patterns
Addresses gemini-code-assist bot feedback:
1. Fixed ineffective useMemo with props dependency
2. Added function-based semantic test coverage
3. Enhanced demo to show function-based capabilities
* refactor: align Empty semantic tests with FloatButton PR #54917 pattern
- Simplify semantic test cases to match FloatButton implementation
- Use more focused test structure with rerender pattern
- Add proper EmptyProps type import for type safety
- Follow exact naming convention from FloatButton tests:
* 'should apply dynamic classNames and styles from props function'
* 'should apply object classNames and styles'
- Remove overly complex test cases, keep essential functionality tests
- Ensure test structure matches established Ant Design patterns
Based on FloatButton semantic tests analysis from PR #54917
* docs: improve Empty semantic API documentation and remove ConfigProvider tests
- Update Chinese documentation for classNames and styles properties
- Use more concise and consistent descriptions matching Ant Design standards
- Update version from 5.23.0 to 6.0.0 for semantic API
- Add missing documentation for style-class demo in both languages
- Remove ConfigProvider-level Empty semantic tests as requested
- Keep semantic tests focused in Empty component test file only
Changes:
- components/empty/index.zh-CN.md: Improved API descriptions
- components/empty/demo/style-class.md: Added demo documentation
- components/config-provider/__tests__/style.test.tsx: Removed Empty tests
* refactor: clean up Empty semantic tests and demo
- Remove remaining Empty semantic tests from ConfigProvider test file
- Simplify style-class demo to basic implementation
- Remove demo documentation to keep it minimal
- Focus semantic tests in Empty component test file only
This ensures cleaner separation of concerns and avoids test duplication.
* fix: resolve Empty semantic classNames duplication and update documentation
* refactor: address Meet-student review feedback for Empty semantic demo
- Fix documentation: change 'buttons' to 'empty' in both Chinese and English
- Remove iframe attribute from demo documentation
- Simplify demo to show 4 different usage patterns without complex toggle logic
- Add comprehensive examples: object/function forms with external/inline definitions
- Fix TypeScript warnings and improve code clarity
* refactor: address Meet-student review feedback and optimize demo structure
- Remove version numbers from API documentation (classNames/styles)
- Simplify demo to show 4 separate examples for each semantic property
- Add comprehensive ConfigProvider tests for function-based semantic usage
- Optimize demo structure: separate objectClassNames, objectStyles, functionClassNames, functionStyles
- Each demo example focuses on single property for better clarity
* refactor(empty): Optimize the type definitions and style types in the Empty component demo.
* fix: ensure CSS-in-JS prefix classes are applied to Empty semantic elements
- Add manual prefix class application for image, description, and footer elements
- Remove emptyClassNames from useMergeSemantic to avoid duplication
- Ensure CSS-in-JS styles can properly target semantic elements
- Fix issue where custom prefixCls wouldn't work with CSS select
* test: Update snapshot
* refactor(components/empty): Remove unused merge property code
* Update components/empty/demo/style-class.md
Signed-off-by: 遇见同学 <1875694521@qq.com>
* Update components/empty/demo/style-class.md
Signed-off-by: 遇见同学 <1875694521@qq.com>
* refactor(empty): simplify style-class demo following pagination pattern
- Keep four essential objects: classNamesObject, classNamesFn, stylesObject, stylesFn
- Use same classNames across examples with sharedClassNames
- Differentiate styles based on props in stylesFn
- Reduce code from 115 to 68 lines (40% reduction)
- Add clear English comments for each object
- Update snapshots for new structure
- Follow pagination demo concise style
* test(empty): update snapshots after style-class demo refactor
- Update demo.test.ts.snap with new simplified structure
- Update demo-extend.test.ts.snap accordingly
- Snapshots now reflect the refactored demo with 4 examples
- All tests passing with updated snapshots
* refactor(empty): simplify style-class demo
- Remove classNamesObject and classNamesFn as suggested 'use style instead'
- Reduce to 2 examples as requested 'use two examples only'
- Keep Object styles and Function styles to demonstrate styles usage
- Update snapshots accordingly
---------
Signed-off-by: 遇见同学 <1875694521@qq.com>
Co-authored-by: lijianan <574980606@qq.com>
Co-authored-by: 遇见同学 <1875694521@qq.com>
* test: add accessibility test utilities
* refactor(tests): replace polling with Promise chain for axe test queue management
* test: add a11y test for components demo
* feat: add a11y test utils
* test: add a11y test for components demo
* test: add a11y test for components demo
* chore: remove unnecessary code
* feat: add polyfill for test environment
* test: add a11y test for components demo
* test: add a11y test for components demo
* chore: adjust code style