eui icon indicating copy to clipboard operation
eui copied to clipboard

[DOCS] Convert examples to function components + hooks + Typescript

Open chandlerprall opened this issue 5 years ago • 11 comments

We've embraced function components and hooks in our src, but continue to copy&paste the examples' class component structure when creating new docs. This also impacts developers when they go to copy the example code, and need to convert it from class components.

New examples should avoid using class components, and existing ones should be converted.

chandlerprall avatar Mar 23 '20 15:03 chandlerprall

Thoughts on converting them to TS as well? (There have been a few times that I go to copy and paste and example only for it to have type errors which is kind of annoying...)

myasonik avatar Mar 23 '20 15:03 myasonik

@myasonik https://github.com/elastic/eui/issues/1799 discusses this a bit. I think preferably we'd have both.

snide avatar Mar 23 '20 15:03 snide

Can I work on this?

mridulgogia avatar Mar 27 '20 11:03 mridulgogia

Yes. Though I'd recommend doing one page at a time to make the reviews easier to track.

snide avatar Mar 27 '20 20:03 snide

@mridulgogia Are you working on it?

Marvin9 avatar Mar 29 '20 11:03 Marvin9

@Marvin9 yes

mridulgogia avatar Mar 29 '20 11:03 mridulgogia

@mridulgogia & @Marvin9 There a lots of files that will need to be converted. I'm sure there's a way for multiple people to work on this without duplicating the work.

cchaos avatar Mar 30 '20 15:03 cchaos

@cchaos agreed.

@mridulgogia I will start in reverse order.

Marvin9 avatar Mar 30 '20 15:03 Marvin9

I am done with most of the files and as you have asked to PRs a file one at a time

mridulgogia avatar Mar 30 '20 15:03 mridulgogia

Maybe a light grouping of files instead of one at a time then? Haha

cchaos avatar Mar 30 '20 15:03 cchaos

👋 Hi there - this issue hasn't had any activity in 6 months. If the EUI team has not explicitly expressed that this is something on our roadmap, it's unlikely that we'll pick this issue up. We would sincerely appreciate a PR/community contribution if this is something that matters to you! If not, and there is no further activity on this issue for another 6 months (i.e. it's stale for over a year), the issue will be auto-closed.

github-actions[bot] avatar Oct 15 '23 00:10 github-actions[bot]