Commit Graph

15 Commits

Author SHA1 Message Date
James Yeung
ca773e02bd
test(module: layout): add test case for layout and sider (#3477) 2023-10-30 00:11:53 +08:00
agolub-s
8e60219b35
feat(module: datepicker): add mask to DatePickerBase for input value constraint (#3120)
* Add support multiple date formats for DatePickerBase

* Fix test

* Extend docs

* Fix merge

* Revert "Add support multiple date formats for DatePickerBase"

This reverts commit 9021dcdd

* Refactoring. Add mask property for DatePickerBase. For input value constraint.

* Some fixes

* Refactoring

* Add value converter for MaskInput

* Some fix

* fix Chinese

* Refactoring

* Fix tests

* Fix tests

* clean up

* Fix tests

* Pass mask to RangePicker

* Fix AvatarTests

* Fix merge

* Stage

* Stabilized tests

---------

Co-authored-by: James Yeung <shunjiey@hotmail.com>
2023-10-05 17:24:16 +08:00
James Yeung
7385f6a8a5
refactor(module: icon): fix two-tone icon state update & first rendering (#2666)
* refactor(module: icon): fix two-tone icon state update & first rendering

* refactor smell code

* fix test packages

* fix smell code
2022-09-04 10:51:32 +08:00
kooliokey
27b3e8ad5e
feat(module: breadcrumb): Add OnClick parameter to BreadcrumbItem, Add Tests, Remove unusable code (#2655)
* Add OnClick parameter to BreadcrumbItem. Add tests for Breadcrumb and BreadcrumbItem. Remove unused and unreachable code until needed at a later date. Documented parameters not in use, but left to avoid breaking the existing public API.

* Fix whitespace

* Update signature of OnClick for BreadcrumbItem to pass a Tuple<MouseEventArgs, BreadcrumbItem> giving access to the click arguments and the item clicked.

* Add ExludeFromCodeCoverage to POCO

* Update HTML markup for Breadcrumbs to match React Ant.Design (use nav, ol and li elements instead of div and spans only)

* fix naming

* fix error

* fix test

Co-authored-by: James Yeung <shunjiey@hotmail.com>
2022-09-04 02:33:10 +08:00
Andrzej Bakun
c099874086 fix(module: menu): Overlay bug fix & menu renering optimization (#1949)
* fix(module:overlay): submenu causing crash

* fix(module:overlay): submenu causing crash

* fix(module:menu): show missing chevron

mark top menu as selected on init
do not render non-active overlay submenus

* tests: common js mock extracted

nullable enabled for test project

* tests: menu

* fix(module:menu): incorrect behavior in layout
2021-09-16 22:46:45 +08:00
Andrzej Bakun
713eb6fd94 chore: test cs project to include test runner adapter (#1939)
test: add general overlay disposal method mock
2021-09-13 10:37:16 +08:00
Tony Yip
4b04f09832 perf: avoid memory leak issue of event listener (#1857)
* perf: avoid memory leak #1834

Avoid memory leak by remove the exclusive parameter and logic in the code block on AddEventListener method in DomEventService class.

The following are the components affected:
components/affix/Affix.razor.cs
components/anchor/Anchor.razor.cs
components/carousel/Carousel.razor.cs
components/core/Component/Overlay/Overlay.razor.cs
components/core/Component/Overlay/OverlayTrigger.razor.cs
components/core/JsInterop/DomEventService.cs
components/descriptions/Descriptions.razor.cs
components/dropdown/DropdownButton.cs
components/grid/Row.razor.cs
components/input/Input.cs
components/input/TextArea.razor.cs
components/layout/Sider.razor.cs
components/list/ListItem.razor.cs
components/select/Select.razor.cs
components/select/internal/SelectContent.razor.cs
components/slider/Slider.razor.cs
components/table/Table.razor.cs
components/tabs/Tabs.razor.cs

* fix override AddEventListener method in AntDesign.TestKit project

* add register/remove event listerner for exclusive use in DomEventService class

* move _dotNetObjects to DomEventListerner class/service, so that users not required to maintain it in each component.

* * move share/reuse dom event listerner methods to DomEventListerner class

* remove method 'AddEventListener' that no longer exists in DomEventService class in AntDesign.TestKit project

* * change the component referring to an IDomEventListerner interface instead of a concrete class,
  so that the component can be tested via a mock TestDomEventListerner.

* introduce DisposeShared and Dispose method in DomEventListerner to ease user remove callback from DomEventListerner

* register IDomEventListerner into DI container instead of create manually

* fix FormatKey

* fix FormatKey

* fix tests

* fix test

* fix test

Co-authored-by: James Yeung <shunjiey@hotmail.com>
2021-09-09 12:56:11 +08:00
Andrzej Bakun
29e3ce3583 refactor(interop): reorganization into classes and typescript tests (#1791)
* fix(module:interop): reorganization into classes

* comments clean-up

* Add typescript test project

* fix: sync with pull request #1765: support drag

* github test action fix attempt

* tests: jsinterop test mock fix

* codecov added to ts tests

* add generated split js to gitignore

* fix: coverage github action

Co-authored-by: James Yeung <shunjiey@hotmail.com>
2021-07-29 22:45:47 +08:00
anranruye
b8658549e6 Merge 0.8.2 to feature 2021-06-18 16:09:13 +08:00
Andrzej Bakun
2d693740c6 fix(module: input): fix & feat & docs & tests: Input general fixes (#1530)
* docs(module:input): api correction & comments

* fix(module:input): clear icon in sync with antD

* fix(module:input): add parameter bordered

* fix(module:textarea): add parameter ShowCounter

* fix(module:input): Focus with behaviors

* docs: add missing docs, rearrange order

* fix(module:search): update to match new standard look

doc(module:search): add API & demos

* fix(module:inputgroup): override style to remove whitespace\
docs: same as react

* fix(module:inputpassword): support custom icon
docs: same as react

* fix(module:input): add blur method
docs: add blur method

* fix(module:input): add readonly parameter

* tests

* fix

* fix(module:input): sequence correction

* Update components/core/Base/AntComponentBase.cs

Co-authored-by: James Yeung <shunjiey@hotmail.com>

* review fixes

* fix: clean-up

* tests: fix missing mock

* fix: focus

* fix(module:input): bind clear button to _inputValue

* tests: clear button show/hide

* tests: package update

Co-authored-by: James Yeung <shunjiey@hotmail.com>
2021-05-27 18:13:26 +08:00
James Yeung
bfb5e4f396 merge 0.8.1 to feature 2021-05-16 19:58:03 +08:00
Andrzej Bakun
2d36dd4081 feat:(module: form): edit context dynamic change (#1504)
* tests: project up to standards

* fix(module:form): allow EditContext change
2021-05-11 11:13:14 +08:00
Andrzej Bakun
555fdb9a43 fix(module: checkbox & switch): Checked parameter binding (#1394)
* fix(module:checkbox): allow binding to Checked parameter

* fix(module:switch): allow binding to Checked parameter

* fix(modules): checkbox & switch get AntInputBoolComponentBase class

* test(module:switch): add tests

* test(module:checkbox): add tests

* test(module:divider): simplify by using id:ignore

* docs(module:checkbox): bind example

* docs(module:switch): bind example

* fix(module:switch): add Control + docs + tests

* feat(module:checkboxgroup): add layout and mixed mode

* fix: review comments + tests

* fix(module:checkboxgroup): parameter name should be MixedMode

added more tests

* fix demo

* fix(module:checkboxgroup): allow toggling between modes

Co-authored-by: James Yeung <shunjiey@hotmail.com>
2021-04-25 01:04:21 +08:00
Andrzej Bakun
68966ef511 test(module: divider): divider tests (#1397)
Co-authored-by: James Yeung <shunjiey@hotmail.com>
2021-04-21 10:44:40 +08:00
Patrick
ba2c5e51d8 test: add TestKit for public tests (#1248)
* test: change folder structure and add new TestKit csproj for public testing of AntDesign-based applications

* docs: added CN and EN docs about TestKit

* fix doc translate

* change the directory structure

Co-authored-by: Patryk Grzelak <pgrzelak@mutate.app>
Co-authored-by: James Yeung <shunjiey@hotmail.com>
2021-04-04 21:37:06 +08:00