Skip to content

chore(website): restructure docs folder (2 of 2) #8594

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

Merged
merged 9 commits into from
Apr 15, 2025

Conversation

acstll
Copy link
Contributor

@acstll acstll commented Apr 15, 2025

Summary

Resolves #8583

Resolves #8576
Resolves #8573

(how do you make this "resolves" one line?)

Following up on #8547 and https://github.com/elastic/eui-private/discussions/282

Scope

Part 2 of #8588, second and last batch of changes to make it easier/faster to review.

The affected folders inside website/docs are:

  • components
  • utilities (moved out of getting-started)

Changes

  • put Utilities in main menu (thank you @tkajtoch) 🆕
  • eliminate "Category pages" from Components > Forms 🆕
  • rename content folders and files to use kebab-case e.g. gettings_started/getting-started/, color_mode.mdxcolor-mode.mdx
  • rename some overview.mdx files to index.mdx to avoid needed to set the slug explicitly e.g. content/overview.mdx with slug: /contentcontent/index.md
  • remove slug and id fields from front matter, leaving that task to Docusaurus' defaults
    • update link.id field in _category_.yml with default id, e.g. id: content_writingid: content/writing/guidelines
  • adjust sidebar_position and title fields where needed
  • update Markdown links according to new folder/file names

QA

Visit the affected parts of the site and check:

  • Navigating the site works as expected
  • URLs are correct, according to the changes

Important

Pay special attention to Forms, there are no more "Category pages", toggles are plain toggles

Staging links:

@acstll acstll added skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation) New EUI site labels Apr 15, 2025
@acstll acstll self-assigned this Apr 15, 2025
@acstll acstll changed the title chore(website): restructure docs folder (1 of 2) chore(website): restructure docs folder (2 of 2) Apr 15, 2025
@acstll acstll force-pushed the chore/docs-post-ai-2 branch from 8a675d1 to 5e27a7a Compare April 15, 2025 08:57
@acstll acstll marked this pull request as ready for review April 15, 2025 09:21
@acstll acstll requested a review from a team as a code owner April 15, 2025 09:21
@weronikaolejniczak weronikaolejniczak self-requested a review April 15, 2025 09:24
Copy link
Contributor

@weronikaolejniczak weronikaolejniczak left a comment

Choose a reason for hiding this comment

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

This PR is of high prio and it's amazing you've done it in such a short amount of time! For the future, it'd be great to break it down into smaller PRs or more granular commits because I have to admit, it's hard reviewing and testing everything at once. Once you see the number of files growing, it's best to cut it short.

Great job! 🎉

Testing notes

Designers > Icons redirection is broken:

Screenshot 2025-04-15 at 12 05 16

Redirects to https://eui.elastic.co/pr_8594/new-docs/docs/display/icons, should be https://eui.elastic.co/pr_8594/new-docs/docs/components/display/icons/ instead.

All the highlights links are broken:

Screenshot 2025-04-15 at 12 05 32

They redirect to e.g. https://eui.elastic.co/pr_8594/new-docs/docs/layout/flex, should be https://eui.elastic.co/pr_8594/new-docs/docs/components/layout/flex/.

I didn't notice this change before but Code used to be in Editors and Syntax, and now there's only one element there, "Markdown". Do you think we should move it back, leave it as is?

Screenshot 2025-04-15 at 12 34 02

@@ -1,10 +1,7 @@
---
slug: /containers/accordion
Copy link
Contributor

Choose a reason for hiding this comment

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

non-blocking suggestion:

Personally, I'd prefer to remove the front matter altogether and keep using the h1 Markdown heading. We'd leverage plain Markdown syntax over MDX syntax which is more approachable. Is there a reason why we're moving it to the front matter?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thinking about it more I also prefer the plain markdown syntax

Is there a reason why we're moving it to the front matter?

we were using both and I thought we could make it consistent, then chose the front matter one because it renders with theme/DocItem/Content and also thought it looked better 🤷

I say we follow your suggestion and change this back to plain Markdown

@@ -1,12 +1,10 @@
---
slug: /display/icons
id: display_icons_overview
title: Icon
Copy link
Contributor

Choose a reason for hiding this comment

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

non-blocking suggestion:

Maybe we could keep it simple and always name it "Icon" or "Icons"? Whichever is fine.

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 think Icons 🤔

EUI offers a wide variety of components. This section is organized topically with individual pages containing live example, usage recommendations, guidelines, and props.

The adjacent [patterns](../patterns/) section provies additional guidance for handling use cases that cross multiple components.
The adjacent [patterns](../patterns/index.mdx) section provies additional guidance for handling use cases that cross multiple components.
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
The adjacent [patterns](../patterns/index.mdx) section provies additional guidance for handling use cases that cross multiple components.
The adjacent [patterns](../patterns/index.mdx) section provides additional guidance for handling use cases that cross multiple components.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thank you!

Copy link
Contributor

Choose a reason for hiding this comment

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

doubt:

Should this be index.mdx instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, it should! good catch 🙏

- **EuiPageTemplate.BottomBar** extends [EuiBottomBar](../../containers/bottom_bar.mdx)
- **EuiPageTemplate.EmptyPrompt** extends [EuiEmptyPrompt](../../display/empty_prompt/index.mdx)
- **EuiPageTemplate.BottomBar** extends [EuiBottomBar](../../containers/bottom-bar.mdx)
- **EuiPageTemplate.EmptyPrompt** extends [EuiEmptyPrompt](../../display/empty-prompt/index.mdx)
Copy link
Contributor

@weronikaolejniczak weronikaolejniczak Apr 15, 2025

Choose a reason for hiding this comment

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

outside the scope:

Could we fix the formatting in the Demo underneath? Also, there seems to be something breaking syntax highlighting right after this demo. Feel free to skip.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will fix 💅

@weronikaolejniczak
Copy link
Contributor

@acstll Let's remember to link #8576 and #8573 as well.

@acstll
Copy link
Contributor Author

acstll commented Apr 15, 2025

thanks a lot @weronikaolejniczak for the great (and super fast as well!) review

broken links are fixed (7e3d878)

I didn't notice this change before but Code used to be in Editors and Syntax, and now there's only one element there, "Markdown". Do you think we should move it back, leave it as is?

@ryankeairns changed this in #8547 (I'd leave it as is)

I'll fix the h1s in a bit and re-request 🌞

@acstll
Copy link
Contributor Author

acstll commented Apr 15, 2025

h1s fixed here aee3e66 😅

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @acstll

@kibanamachine
Copy link

Preview staging links for this PR:

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @acstll

Copy link
Contributor

@weronikaolejniczak weronikaolejniczak left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for tackling this, @acstll 💪🏻

@acstll acstll merged commit e327dbb into elastic:main Apr 15, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New EUI site skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation)
Projects
None yet
4 participants