Skip to content

[EUI+] New IA #8547

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 8, 2025
Merged

[EUI+] New IA #8547

merged 9 commits into from
Apr 8, 2025

Conversation

ryankeairns
Copy link
Contributor

@ryankeairns ryankeairns commented Apr 3, 2025

Closes https://github.com/elastic/eui-private/issues/243

Summary

Overhaul of the IA. Notable changes include:

  • Separated out Getting Started; pulled in Theming and Utilities
  • As a result, Components are components
    • Changed groups and order
    • All collapsed by default
  • Flattened overall. Less clicking; richer right-side nav
    • Consolidated guidelines and patterns into component pages
    • Common page IA: Component, Usage, Guidelines, Props
    • Consolidated some patterns into Usage
  • Moved Writing into Content
  • A few design tweaks
    • Increased font size of sidebar links
    • Updated button style for Show source

QA

Remove or strikethrough items that do not apply to your PR.

General checklist

  • Browser QA
    • Checked in both light and dark modes
    • Checked in both MacOS and Windows high contrast modes
    • Checked in mobile
    • Checked in Chrome, Safari, Edge, and Firefox
    • Checked for accessibility including keyboard-only and screenreader modes
  • Docs site QA
  • Code quality checklist
  • Release checklist
    • A changelog entry exists and is marked appropriately.
    • If applicable, added the breaking change issue label (and filled out the breaking change checklist)
  • Designer checklist
    • If applicable, file an issue to update EUI's Figma library with any corresponding UI changes. (This is an internal repo, if you are external to Elastic, ask a maintainer to submit this request)

@ryankeairns ryankeairns added documentation Issues or PRs that only affect documentation - will not need changelog entries skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation) labels Apr 3, 2025
@ryankeairns ryankeairns force-pushed the rk/cant-believe-ia-the-whole-thing branch from 0ad1148 to 11b76a0 Compare April 3, 2025 23:13
@ryankeairns ryankeairns marked this pull request as ready for review April 4, 2025 13:35
@ryankeairns ryankeairns requested a review from a team as a code owner April 4, 2025 13:35
@ryankeairns
Copy link
Contributor Author

ryankeairns commented Apr 4, 2025

Organized a few more pages and tweaked some styles.
In particular, took a pass at the props table which felt like it was floating in space and used relatively large font sizing. It is now set to compressed and is wrapped in a panel ... plus a few other small tweaks.

I'll stop here while reviews are under way.

@acstll acstll mentioned this pull request Apr 7, 2025
1 task
@weronikaolejniczak weronikaolejniczak self-requested a review April 7, 2025 11:57
@weronikaolejniczak
Copy link
Contributor

@ryankeairns We should probably link this PR with: https://github.com/elastic/eui-private/issues/243 (and update its description, move to M1).

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.

Amazing job, @ryankeairns! I would say, let's just fix the conflicts and merge as is. All the comments I added are for us to fix in the future, not necessarily now. It's much better to merge imperfect than keep the PR open any longer.

Testing notes

Homepage links

There are broken links on the homepage now:

  • Highlights > All components button
  • Footer > Developers > Getting started
  • Footer > Developers > Tokens
  • Footer > Designers > Patterns

They don't use Docusaurus' Link component and therefore it's hard to keep track of them breaking. We should probably update them to use it or useBrokenLinks hook.

Utilities

I'd say the Utilities are much better suited in the "Components" section. They don't belong in "Getting Started" that should only scratch the surface. Currently, the developers are used to going to Components and seeing Utilities there. Additionally, although sometimes functions, the majority of the utilities are React components and hooks. I agree we could use some separation between UI components and utility components but we can do it on the same page. What do you think?

Sidebar font-size

Screenshot 2025-04-08 at 10 42 26

There's some font-size inconsistency in the sidebar. I think they should be of equal font-size (probably 14px). The bold text brings enough distinction between the pages vs folders.

Prop table

Maybe we could remove the last line in the prop table:

Screenshot 2025-04-08 at 11 21 43

I think it'd look a bit cleaner.

Relative URL links

I used \[([^\]]+)\]\((?!https:\/\/)(?![^\)]*\.mdx)[^\)]*\) regexp to find all Markdown links that are not https links and do not contain the .mdx file extension. These are:

  • packages/website/docs/components/overview.mdx links
  • packages/website/docs/components/display/beacon.mdx:13
  • packages/website/docs/getting_started/utilities/text_diff.mdx:70
  • packages/website/docs/getting_started/utilities/text_diff.mdx:298
  • packages/website/docs/data_visualization/types/metric_chart.mdx:20
  • packages/website/docs/components/forms/text/inline_edit.mdx icon button links

I fixed these but I think we either lost the changes or have to rebase onto main:

  • packages/website/docs/patterns/error_messages/overview.mdx links
  • packages/website/docs/patterns/error_messages/error_warning.mdx:27
  • packages/website/docs/patterns/error_messages/error_validation.mdx:36
  • packages/website/docs/patterns/error_messages/error_pages.mdx:44
  • packages/website/docs/patterns/error_messages/error_help_users_avoid_errors.mdx:139
  • packages/website/docs/patterns/save_buttons.mdx:28
  • packages/website/docs/patterns/error_messages/error_banners.mdx:25

If we don't use relative file paths, we cannot leverage the preloading, prefetching and broken link detection Docusaurus capabilities.

@@ -182,19 +198,23 @@ export const PropTable = ({
>
<header css={styles.header}>
{showTitle && (
<EuiTitle size="m">
Copy link
Contributor

Choose a reason for hiding this comment

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

sidenote:

The original value m is correct, it's just displayed incorrectly. I fixed this on #8557 using Docusaurus Heading component which also adds an anchor and the copy anchor link icon.

<PropTable definition={docgen.EuiModalFooter} />
### Confirming an action

Use a [Modal](#confirming-an-action) when you need to interrupt a user and ask them to confirm an action.
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:

We're redirecting to itself here. Is that on purpose?

@@ -1,12 +1,42 @@
---
slug: /display/badge
id: display_badge
sidebar_position: 1
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:

Are we putting Badge first on purpose? Other components follow alphabetical order.

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:

Not super crucial but the filename overview.mdx doesn't fit here because it's a subpage of the Buttons category. I'd say we can just name it button.mdx.

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:

The "Recommendations" page is the only subpage, so maybe we can merge it with introduction.mdx content and move to a single testing.mdx page?


**Keep these guidelines in mind:**

* Minimize the number of callouts per page.
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:

We should either consistently used * Text or - Text. I used and updated the content with the latter.

@@ -184,7 +177,7 @@ If the total results are unknown, you can make a best guess based on the context

* * *
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:

We don't use dividers on any other pages, so we should remove it.

## Component

:::tip
It is strongly encouraged to use **EuiBeacon** in conjunction with [**EuiTour**](./tour). Standalone, the beacon is a visual cue that may lack context.
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:

Sometimes, we seem to bold the component links. Do we want to do that? If so, we should think about whether we want to do it globally or locally like here. We can easily find all those links searching for [** and should be easy to search and replace as well.

@ryankeairns ryankeairns force-pushed the rk/cant-believe-ia-the-whole-thing branch from 3da2298 to aa3e4d5 Compare April 8, 2025 14:25
@kibanamachine
Copy link

Preview staging links for this PR:

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issues or PRs that only affect documentation - will not need changelog entries skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants