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 config component composition #27899

Conversation

VasilyStrelyaev
Copy link
Contributor

No description provided.

@VasilyStrelyaev VasilyStrelyaev self-assigned this Aug 13, 2024
@VasilyStrelyaev VasilyStrelyaev force-pushed the react-config-component-composition branch 2 times, most recently from a1a5c74 to e3f21d0 Compare August 13, 2024 12:27
@VasilyStrelyaev VasilyStrelyaev force-pushed the react-config-component-composition branch from 0360703 to b4602a5 Compare August 20, 2024 15:56
@VasilyStrelyaev VasilyStrelyaev marked this pull request as ready for review August 28, 2024 15:50
@VasilyStrelyaev VasilyStrelyaev force-pushed the react-config-component-composition branch 2 times, most recently from a3b1a61 to 2df6ce2 Compare August 29, 2024 12:41
@VasilyStrelyaev VasilyStrelyaev force-pushed the react-config-component-composition branch from a829759 to 652e4b9 Compare October 11, 2024 10:52
};

const Item = Object.assign<typeof _componentItem, NestedComponentMeta>(_componentItem, {
componentType: "option",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
componentType: "option",
componentKind: "option",

There is always mess with the word type in metadata, need to be careful when using it to avoid misunderstanding.

We're using TypeScript inspired word "kind" for such cases as this one.
A "type" is a TypeScript type and a "kind" is a specificator of a variation.

In this example Shape is a type (TypeScript-world type), and 'circle' | 'square' | 'triangle' is a kind (variation specificator)

type Shape =
  | { kind: "circle"; radius: number }
  | { kind: "square"; x: number }
  | { kind: "triangle"; x: number; y: number };

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can we please leave this rename to a follow-up PR to avoid the need to re-release generators right now?

packages/devextreme-react/src/core/component-base.tsx Outdated Show resolved Hide resolved
packages/devextreme-react/src/core/use-option-scanning.ts Outdated Show resolved Hide resolved
packages/devextreme-react/src/core/use-option-scanning.ts Outdated Show resolved Hide resolved
packages/devextreme-react/src/core/use-option-scanning.ts Outdated Show resolved Hide resolved
packages/devextreme-react/src/core/use-option-scanning.ts Outdated Show resolved Hide resolved
@IlyaKhD
Copy link
Contributor

IlyaKhD commented Oct 14, 2024

⚠️ components-base.ts should be refactored first, it's one function for 400 having serious problems with code coupling. At least added lines should be extracted in

@VasilyStrelyaev VasilyStrelyaev force-pushed the react-config-component-composition branch 2 times, most recently from 0edb1c0 to d2f8c81 Compare October 17, 2024 15:33
@VasilyStrelyaev VasilyStrelyaev force-pushed the react-config-component-composition branch from 82cad50 to 2c21d42 Compare October 22, 2024 09:58
@VasilyStrelyaev VasilyStrelyaev changed the title feat: config component composition feat: React config component composition Oct 25, 2024
@VasilyStrelyaev VasilyStrelyaev merged commit 7c8dee5 into DevExpress:24_2 Oct 25, 2024
278 checks passed
alexslavr added a commit to alexslavr/DevExtreme that referenced this pull request Oct 25, 2024
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