Skip to content

Commit

Permalink
Core: fix auto-fixable lint + create re-exports
Browse files Browse the repository at this point in the history
Core: fix imports

Core: fix imports for templates

Core: fix/ignore eslint errors

Core: fix most of typescript issues

Core: fix most of extraneous TS errors (mostly redundant ts-expect-error)

Core: fix/ignore remaining extraneous errors

Core: fix broken renovation import

Core: fixed callOnce import

Core: fix TS lint errors

Core: fix component_registrator_callbacks reexport

Core: fixed missed Data reexport + silence Mock TS error

Core: fixed unwanted refactoring for renderer (using array methods on array-like objects)

Core: add missing template reexport

Core: fix artifacts of auto-replace

Core: Fix data and utils modules

Core: fix Error constructor

Core: fix viewport IIFE after lint changes and add it to lint ignore

Core: TEST - add lint ignore for all core, bring back changes, that seem significant to see how they impact test

Core: TEST - bring back non-significant cahanges to see if they impact tests

Core: fix tests for editors and core

Core: fix qunit part 2

Core: common default export + bring back executeAsyncMock 10 line

Core: fix textbox hanging test (blur)

Core: fix test Html editor - PopupModule mock window

Core: fix transitionExecutor + datebox knockout tests

Core: fix animation/fx tests

Core: fix animation/fx test part 2

Core: fix imageCreator exporter test

Core: fix defaultOption tests

Map - deprecate Bing provider (DevExpress#28127)

GridBaseOptions.columnFixing.texts.stickPosition -> GridBaseOptions.columnFixing.texts.stickyPosition (DevExpress#28133)

Co-authored-by: Roman Semenov

MultiView: improve swipe UX when some items are hidden (DevExpress#28128)

Fix CodeQL report errors (DevExpress#27874)

Selection: fix selection cache updating after selection change is canceled (DevExpress#28141)

Replace get-changed-files action with the shared one (DevExpress#28140)

MultiView: Add unit tests for keyboard navigation with hidden items (DevExpress#28137)

chore(deps): update dependency vite to v5 [security] (DevExpress#28147)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

chore(deps): update pnpm to v9.11.0 (DevExpress#28158)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

HtmlEditor: Get rid of showdown

Co-authored-by: marker dao ® <[email protected]>
Co-authored-by: Roman Semenov <[email protected]>

🎹 Pager: Create d.ts (DevExpress#28055)

Co-authored-by: alexlavrov <[email protected]>
Co-authored-by: ilyakhd <[email protected]>
Co-authored-by: Roman Semenov <[email protected]>

Pager - rename filename (DevExpress#28163)

HtmlEditor: Get rid of turndown

dxDiagram - fix T1251559, T1254101 (DevExpress#28168)

HtmlEditor: Remove markdown support

Map - add Azure provider in declarations (DevExpress#28126)

Chat: add empty view stories (DevExpress#28173)

Chat: Skip message rendering on send message (DevExpress#28170)

Co-authored-by: marker dao ® <[email protected]>

Refix "Storybook - fix project config (DevExpress#28085)" (DevExpress#28144)

Scheduler a11y: appointments does not have info about reccurence (DevExpress#28165)

Map - support Azure provider (DevExpress#28122)

Core: fix azure provider TS error

Core: fix m_svg to contain default export

Core: fix popup test

Core: fix regular popup tests

Core: Fix toolbar + loadIndicator

Core: Fix viz pieChart + rangeSelector

Core: fix desktopTooltip test

Core: fix ui-firefox

Core: Replace all imports Action, devices -> m_action, m_devices

Core:  domAdapter -> m_dom_adapter tests

Core: fix m_action export

Core: replace import support -> m_support

Core: dom -> m_dom;: common, type -> m_ only for helpers

Core: fix ui-firefox single test failures

Core: fix rowsView test

Core: fix pivotGrid async mocks

Core: fix pivotGrid dataSource.bundled

Core: dataSource bundled add missing inflector import

Core: internal support -> m_support

Core: use ts device in events to try to fix mobile tests

Core: remove unexpected ts-error

Core: replace dom->m_dom click event

Core: fix scrollable test (in mobileViewport)

Fix eslint rules and apply them to utils, templates, options and ignore errors

Core: modify eslint config, save core files

Core: fix metadata

Core: fix TS lint
  • Loading branch information
ivanblinov2k17 committed Oct 22, 2024
1 parent 5524478 commit 0402c07
Show file tree
Hide file tree
Showing 566 changed files with 11,756 additions and 8,562 deletions.
21 changes: 0 additions & 21 deletions .github/actions/get-changed-files/action.yml

This file was deleted.

9 changes: 4 additions & 5 deletions .github/workflows/demos_visual_tests_frameworks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,12 @@ jobs:
uses: actions/checkout@v4

- name: Get changed files
uses: ./.github/actions/get-changed-files
uses: DevExpress/github-actions/get-changed-files@v1
if: github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'force all tests')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
path: apps/demos/Demos
result: apps/demos/changed-files.json
gh-token: ${{ secrets.GITHUB_TOKEN }}
paths: 'apps/demos/Demos/**/*'
output: apps/demos/changed-files.json

- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand Down
1 change: 1 addition & 0 deletions apps/demos/configs/Angular/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const componentNames = [
'multi-view',
'nested',
'number-box',
'pagination',
'pie-chart',
'pivot-grid-field-chooser',
'pivot-grid',
Expand Down
4 changes: 2 additions & 2 deletions apps/react-storybook/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
"options": {
"script": "build"
},
"outputs": ["storybook-static"]
"outputs": ["{projectRoot}/storybook-static"]
},
"start": {
"executor": "nx:run-script",
"options": {
"script": "start"
},
"dependsOn": []
"dependsOn": ["^build"]
}
},
"tags": []
Expand Down
88 changes: 85 additions & 3 deletions apps/react-storybook/stories/chat/Chat.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState, useCallback } from 'react';
import React, { useState, useCallback, useEffect } from 'react';
import {Chat, ChatTypes} from 'devextreme-react/chat'
import type {Meta, StoryObj} from '@storybook/react';
import { firstAuthor, secondAuthor, initialMessages } from './data';
Expand Down Expand Up @@ -44,6 +44,7 @@ export const Overview: Story = {
[firstAuthor.name]: firstAuthor,
[secondAuthor.name]: secondAuthor,
},
defaultValue: firstAuthor.name,
},
hint: {
control: 'text',
Expand All @@ -65,8 +66,14 @@ export const Overview: Story = {
const [messages, setMessages] = useState(items);

const onMessageSend = useCallback(({ message }) => {
setMessages((prevMessages) => [...prevMessages, message]);
}, []);
const updatedMessages = [...messages, message];

setMessages(updatedMessages);
}, [messages]);

useEffect(() => {
setMessages(items);
}, [items]);

return (
<div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
Expand All @@ -90,6 +97,76 @@ export const Overview: Story = {
}
}

export const EmptyView: Story = {
args: {
items: [],
user: firstAuthor,
...commonArgs,
},
argTypes: {
user: {
control: 'select',
options: [firstAuthor.name, secondAuthor.name],
mapping: {
[firstAuthor.name]: firstAuthor,
[secondAuthor.name]: secondAuthor,
},
defaultValue: firstAuthor.name,
},
hint: {
control: 'text',
}
},
render: ({
width,
height,
disabled,
rtlEnabled,
user,
items,
onItemsChange,
visible,
hint,
activeStateEnabled,
hoverStateEnabled,
focusStateEnabled,
}) => {
const [messages, setMessages] = useState(items);

const onMessageSend = useCallback(({ message }) => {
const updatedMessages = [...messages, message];

setMessages(updatedMessages);
}, [messages]);

useEffect(() => {
console.log(2);
setMessages(items);
}, [items]);

return (
<div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<Chat
width={width}
height={height}
items={messages}
onItemsChange={onItemsChange}
disabled={disabled}
rtlEnabled={rtlEnabled}
user={user}
onMessageSend={onMessageSend}
visible={visible}
hint={hint}
activeStateEnabled={activeStateEnabled}
focusStateEnabled={focusStateEnabled}
hoverStateEnabled={hoverStateEnabled}
>
</Chat>
</div>
);
}
}

export const PopupIntegration: Story = {
args: {
items: initialMessages,
Expand All @@ -106,6 +183,7 @@ export const PopupIntegration: Story = {
[firstAuthor.name]: firstAuthor,
[secondAuthor.name]: secondAuthor,
},
defaultValue: firstAuthor.name,
},
hint: {
control: 'text',
Expand All @@ -130,6 +208,10 @@ export const PopupIntegration: Story = {
setMessages((prevMessages) => [...prevMessages, message]);
}, []);

useEffect(() => {
setMessages(items);
}, [items]);

return (
<Popup
width={300}
Expand Down
17 changes: 16 additions & 1 deletion apps/react-storybook/stories/chat/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ export const secondAuthor: ChatTypes.User = {
name: "Jane Smith"
};

const todayDate = new Date();

const date = new Date();
const yesterdayDate = date.setDate(date.getDate() - 1);

export const initialMessages: ChatTypes.Message[] = [
{
timestamp: "2024-10-01T10:15:30Z",
Expand Down Expand Up @@ -54,8 +59,18 @@ export const initialMessages: ChatTypes.Message[] = [
text: "I also want to get out into nature. Want to join me?"
},
{
timestamp: "2024-10-01T10:35:00Z",
timestamp: yesterdayDate,
author: secondAuthor,
text: "I'd love to! Just let me know when you're ready."
},
{
timestamp: todayDate,
author: firstAuthor,
text: "Great!"
},
{
timestamp: todayDate,
author: firstAuthor,
text: "Great! Looking forward to it!"
}
];
2 changes: 1 addition & 1 deletion e2e/bundlers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"parcel": "2.12.0",
"rimraf": "3.0.2",
"rollup": "3.29.5",
"vite": "3.2.11",
"vite": "5.1.8",
"webpack": "5.94.0",
"webpack-cli": "4.10.0",
"devextreme": "workspace:*"
Expand Down
2 changes: 1 addition & 1 deletion e2e/testcafe-devextreme/helpers/widgetTypings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export type WidgetName =
| 'dxPivotGridFieldChooser'
| 'dxDataGrid'
| 'dxTreeList'
| 'dxPager'
| 'dxPagination'
| 'dxRadioGroup'
| 'dxScheduler'
| 'dxTabs'
Expand Down
5 changes: 5 additions & 0 deletions e2e/testcafe-devextreme/tests/chat/messageList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ test('Messagelist appearance with scrollbar', async (t) => {
user: userSecond,
width: 400,
height: 600,
onMessageSend: (e) => {
const { component, message } = e;

component.renderMessage(message);
},
});
});

Expand Down
4 changes: 2 additions & 2 deletions e2e/testcafe-devextreme/tests/pager/accessibility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ fixture.disablePageReloads`Pager`
.page(url(__dirname, '../container.html'));

const options: Options<any> = {
totalCount: [50],
itemCount: [50],

displayMode: ['full', 'compact'],
infoText: [undefined, 'Total {2} items. Page {0} of {1}'],
Expand Down Expand Up @@ -52,7 +52,7 @@ const a11yCheckConfig = {
};

const configuration: Configuration = {
component: 'dxPager',
component: 'dxPagination',
a11yCheckConfig,
options,
created,
Expand Down
22 changes: 11 additions & 11 deletions e2e/testcafe-devextreme/tests/pager/baseProperties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ test('Pager width and height property', async (t) => {
.eql(null)
.expect(pager.element.getAttribute('height'))
.eql(null);
}).before(async () => createWidget('dxPager', {
}).before(async () => createWidget('dxPagination', {
width: 270,
height: '95px',
totalCount: 50,
itemCount: 50,
}));

test('Pager elementAttr property', async (t) => {
Expand All @@ -30,7 +30,7 @@ test('Pager elementAttr property', async (t) => {
.eql('some description')
.expect(pager.element.getAttribute('data-test'))
.eql('custom data');
}).before(async () => createWidget('dxPager', {
}).before(async () => createWidget('dxPagination', {
elementAttr: {
'aria-label': 'some description',
'data-test': 'custom data',
Expand All @@ -48,11 +48,11 @@ test('Pager hint, disabled and accessKey properties', async (t) => {
.eql('F')
.expect(pager.element.getAttribute('title'))
.eql('Best Pager');
}).before(async () => createWidget('dxPager', {
}).before(async () => createWidget('dxPagination', {
hint: 'Best Pager',
disabled: true,
accessKey: 'F',
totalCount: 50,
itemCount: 50,
}));

test('Pager tabindex and state properties', async (t) => {
Expand Down Expand Up @@ -80,8 +80,8 @@ test('Pager tabindex and state properties', async (t) => {
await t
.expect(pager.element.hasClass('dx-state-active'))
.ok();
}).before(async () => createWidget('dxPager', {
totalCount: 50,
}).before(async () => createWidget('dxPagination', {
itemCount: 50,
disabled: false,
width: '100%',
focusStateEnabled: true,
Expand All @@ -103,9 +103,9 @@ test('Pager focus method without focusStateEnabled', async (t) => {
await t
.expect(pager.getPageSize(0).element.focused)
.ok();
}).before(async () => createWidget('dxPager', {
}).before(async () => createWidget('dxPagination', {
focusStateEnabled: false,
totalCount: 50,
itemCount: 50,
}));

test('Pager focus method with focusStateEnabled', async (t) => {
Expand All @@ -121,7 +121,7 @@ test('Pager focus method with focusStateEnabled', async (t) => {
await t
.expect(pager.element.focused)
.ok();
}).before(async () => createWidget('dxPager', {
}).before(async () => createWidget('dxPagination', {
focusStateEnabled: true,
totalCount: 50,
itemCount: 50,
}));
16 changes: 8 additions & 8 deletions e2e/testcafe-devextreme/tests/pager/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ test('Pager visibile property', async (t) => {
await t
.expect(pager.element.hasClass('dx-state-invisible'))
.ok();
}).before(async () => createWidget('dxPager', {
totalCount: 50,
}).before(async () => createWidget('dxPagination', {
itemCount: 50,
visible: false,
}));

Expand All @@ -22,8 +22,8 @@ test('PageSize selector test', async (t) => {
.click(pager.getPageSize(1).element)
.expect(pager.option('pageCount'))
.eql(13);
}).before(async () => createWidget('dxPager', {
totalCount: 50,
}).before(async () => createWidget('dxPagination', {
itemCount: 50,
pageIndex: 2,
pageSize: 8, // pageCount: 7
allowedPageSizes: [2, 4, 8],
Expand All @@ -38,8 +38,8 @@ test('PageIndex test', async (t) => {
.click(pager.getNavPage('5').element)
.expect(pager.option('pageIndex'))
.eql(5);
}).before(async () => createWidget('dxPager', {
totalCount: 50,
}).before(async () => createWidget('dxPagination', {
itemCount: 50,
pageIndex: 1,
pageSize: 5, // pageCount: 10
}));
Expand All @@ -53,8 +53,8 @@ test('PageIndex correction test', async (t) => {
.click(pager.getPageSize(1).element)
.expect(pager.option('pageIndex'))
.eql(5);
}).before(async () => createWidget('dxPager', {
totalCount: 50,
}).before(async () => createWidget('dxPagination', {
itemCount: 50,
pageIndex: 10,
pageSize: 5, // pageCount: 10
}));
Loading

0 comments on commit 0402c07

Please sign in to comment.