Skip to content

Comments

Collection.Base: convert to ES6 Class#28762

Merged
EugeniyKiyashko merged 1 commit intoDevExpress:25_1from
EugeniyKiyashko:25_1_move_collection_base_to_native_class
Jan 21, 2025
Merged

Collection.Base: convert to ES6 Class#28762
EugeniyKiyashko merged 1 commit intoDevExpress:25_1from
EugeniyKiyashko:25_1_move_collection_base_to_native_class

Conversation

@EugeniyKiyashko
Copy link
Contributor

No description provided.

@EugeniyKiyashko EugeniyKiyashko self-assigned this Jan 17, 2025
@EugeniyKiyashko EugeniyKiyashko marked this pull request as draft January 17, 2025 21:21
@EugeniyKiyashko EugeniyKiyashko force-pushed the 25_1_move_collection_base_to_native_class branch 8 times, most recently from 6f41c14 to a6e9edd Compare January 20, 2025 09:18
@EugeniyKiyashko EugeniyKiyashko force-pushed the 25_1_move_collection_base_to_native_class branch from a6e9edd to 7f560f0 Compare January 20, 2025 19:42
@EugeniyKiyashko EugeniyKiyashko requested review from a team, ksercs and pomahtri January 21, 2025 07:14
@EugeniyKiyashko EugeniyKiyashko marked this pull request as ready for review January 21, 2025 07:15
private readonly _feedbackHideTimeout = 400;
public _activeStateUnit!: string;

public _feedbackHideTimeout = 400;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why should it be public?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because _feedbackHideTimeout overrides inside the children

args: ItemRenderInfo<TItem>,
): ItemTemplate<TItem> {
const data = args.itemData;
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did u fix this error somewhere and ignored it in other places?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because I am not sure there will be no breaking changes in these places, I would prefer to deal with it separately

_isFocusTarget(element: Element | undefined): boolean {
const focusTargets = $(this._focusTarget()).toArray();
// @ts-expect-error ts-error
return focusTargets.includes(element);
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's fix error instead of muting

Suggested change
return focusTargets.includes(element);
return !!element && focusTargets.includes(element);

Copy link
Contributor Author

@EugeniyKiyashko EugeniyKiyashko Jan 21, 2025

Choose a reason for hiding this comment

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

I'll consider in the further PRs

}

_isFocusTarget(element: Element): boolean {
_isFocusTarget(element: Element | undefined): boolean {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: we can use shorter form

Suggested change
_isFocusTarget(element: Element | undefined): boolean {
_isFocusTarget(element?: Element): boolean {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll consider in the further PRs

@EugeniyKiyashko EugeniyKiyashko merged commit 9dce8d8 into DevExpress:25_1 Jan 21, 2025
287 checks passed
EugeniyKiyashko added a commit to EugeniyKiyashko/DevExtreme that referenced this pull request Jan 21, 2025
@EugeniyKiyashko EugeniyKiyashko deleted the 25_1_move_collection_base_to_native_class branch June 24, 2025 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants