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

docs: convert useListenFocusTriggers stories file to TS #2492

Conversation

LoayTarek5
Copy link
Contributor

@LoayTarek5 LoayTarek5 commented Oct 11, 2024

Here are the main changes made to convert the code to TypeScript:
Added type annotation for the text state: useState("-").
Specified the type for the ref: useRef(null).
Added type annotations for the event parameters in onFocusByMouse and onFocusByKeyboard: React.FocusEvent.
Added an empty interface RenderProps which can be extended later if needed.
Added as const to the Overview object to ensure type inference for its properties.
Resolves #2474

@LoayTarek5 LoayTarek5 requested a review from a team as a code owner October 11, 2024 12:25
@LoayTarek5
Copy link
Contributor Author

@LastExileUA @virtser @doronbrikman @jasonbahl
could some one look at it😃

Copy link
Member

@talkor talkor left a comment

Choose a reason for hiding this comment

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

@LoayTarek5 thank you for this PR! Looks like there are two similar files and the previous one is missing in this changeset (which means it's not deleted). Let's add the deletion of the old file, and keep only the tsx file here
Thanks!

LoayTarek5 and others added 3 commits October 13, 2024 19:15
…ListenFocusTriggers.stories.ts

delete the additional file
…ub.com:LoayTarek5/vibe into docs/useListenFocusTriggers-stories-file-to-TS
@LoayTarek5 LoayTarek5 requested a review from talkor October 13, 2024 16:35
@talkor
Copy link
Member

talkor commented Oct 15, 2024

@LoayTarek5 there is still the old file :(

…ListenFocusTriggers.stories.js

deletion the old file
Copy link
Member

@talkor talkor left a comment

Choose a reason for hiding this comment

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

Great @LoayTarek5 ! Just check out my 2 comments, probably unused code

@@ -35,4 +37,4 @@ export const Overview = {
},

name: "Overview"
};
} as const;
Copy link
Member

Choose a reason for hiding this comment

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

I don't think it's needed

@LoayTarek5 LoayTarek5 requested a review from talkor October 17, 2024 06:24
@talkor talkor self-assigned this Oct 20, 2024
Copy link
Member

@talkor talkor left a comment

Choose a reason for hiding this comment

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

Thank you @LoayTarek5 ! Looks good, please just run prettier on this file as the CI fails for the extra spaces in line 7
Thanks!

@talkor talkor removed their assignment Oct 20, 2024
run prettier
@YossiSaadi YossiSaadi merged commit d25deaf into mondaycom:master Nov 3, 2024
6 of 7 checks passed
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.

docs: convert useListenFocusTriggers stories file to TS
3 participants