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

[EUI+] Reorganize Forms category #8184

Merged
merged 30 commits into from
Feb 18, 2025

Conversation

cee-chen
Copy link
Contributor

@cee-chen cee-chen commented Nov 23, 2024

Summary

#8163

I was crunched for time, so sadly the git commit history on this PR is something of a tragedy. Apologies! Feel free to chop up/take and use this PR for whatever you want. I categorized the various form controls into sections based primarily on usage type:

Overall sections:

Screenshot 2024-12-13 at 6 45 48 PM

Individual subcategories:

Selection components overview

The biggest thing I really wanted to add to this PR (other than shuffling pages around) was to convert #7049 into an actual page on our docs site instead of needing a separate wiki for it:

And I think this PR succeeds fairly well at that! 🤞 (although there are some TODO comments in the mdx file that I did not have time to improve on)

QA

General checklist

N/A, docs changes only

@cee-chen cee-chen added documentation Issues or PRs that only affect documentation - will not need changelog entries skip-changelog labels Nov 23, 2024
@cee-chen cee-chen mentioned this pull request Dec 13, 2024
12 tasks
@cee-chen cee-chen changed the title [EUI+] Reorganize Forms category (WIP) [EUI+] Reorganize Forms category Dec 13, 2024
@cee-chen cee-chen marked this pull request as ready for review December 14, 2024 02:52
@cee-chen cee-chen requested a review from a team as a code owner December 14, 2024 02:52
@weronikaolejniczak weronikaolejniczak linked an issue Jan 27, 2025 that may be closed by this pull request
12 tasks
- Remove top level link/doc and add more sublevel items

- give described form group its own page

- move compressed forms to this section

- remove "in a popover" example from form rows - compressed forms already have this example and explicitly state non-compressed forms should not be used in popovers

- remove guideline CTA to its own page??
I gave up on git history, sorry :|||
- was previously at the top of a single page with basic controls, will need to spread it out a bit more now

- there are more components that can take EuiFormRow (and some that can't), we probably need to audit which at some point. this is not meant to be a perfect solution
- they fit under the general layout guideline text, so might as well move them here?
+ add a demo for nativate invalidation checking
+ remove various callouts/links to it - in theory now that the components are grouped together, it should be easy to decide which to use

- (opinionated, feel free to revert) remove images of various components, not sure how useful it is on the actual docs site
…o its own section

+ move EuiFormFieldset to the label section (feels like that's where it makes more sense)
@weronikaolejniczak
Copy link
Contributor

weronikaolejniczak commented Feb 11, 2025

@tkajtoch @mgadewoll @acstll I'd appreciate your review and let me know what you think about the changes, maybe you have some more suggestions 🙏🏻

@mgadewoll I had a conflict in color picker docs, I was able to boil the changes down to this PR. Could you take a look whether I resolved the conflicts correctly and all is as expected?

Testing notes

I was:

  • judging the logical order of subcategories and pages,
  • comparing content between the old docs and the new docs,
  • testing redirections on each page,
  • comparing examples and previews visually (in case there are visual regressions),
  • checking the prop list, if all components are considered,
  • checking whether the content was not duplicated or removed.

Form layouts ✅

  • Forms > Form layouts > Described form groups
Screenshot

Screenshot 2025-02-11 at 12 00 55

EuiTextBlock doesn't redirect anywhere.

Form validation ✅

Text controls ✅

  • Forms > Text controls > Inline edit > Customizing read and edit modes
Screenshot

Screenshot 2025-02-11 at 12 13 07

All of these redirections do not work as expected.

Numeric controls ❌

  • Forms > Numeric controls > Range sliders > Props
Screenshot

Screenshot 2025-02-11 at 12 17 44

The EuiInputPopover redirects to homepage.

Selection controls ❌

  • Main page
Screenshot

Screenshot 2025-02-11 at 12 46 15

I feel this alert from the old docs belongs on the main "Selection controls" page.

  • Forms > Selection controls > Multiple selections
Screenshot

Screenshot 2025-02-11 at 12 30 46

The EuiComboBox redirection is not working as expected.

  • Category structure

I feel that the structure for checkboxes and radios is not logical. They are packed in the main page, and as a subpage there's "Switches" (although originally, they're all on the same page. Additionally, I don't see the need for distinguishing this subcategory of "Checkboxes and Radios", and how Switches fall into that (they're neither Checkbox or Radio).

I would suggest to put all the pages on the same level.

Screenshot

Screenshot 2025-02-11 at 12 35 25

  • Forms > Selection controls > Checkboxes and radios > Switches
Screenshot

Screenshot 2025-02-11 at 12 36 12

The guidelines tab and EuiFormRow redirections don't work.

  • Forms > Selection controls > Basic select
Screenshot

Screenshot 2025-02-11 at 12 37 27

The EuiRadioGroup redirection doesn't work.

  • Forms > Selection controls > Super select
Screenshot

Screenshot 2025-02-11 at 12 38 27

etc... -> etc.

  • > Props
Screenshot

Screenshot 2025-02-11 at 12 39 17

The EuiInputPopover redirection doesn't work.

  • Forms > Selection controls > Combo box

There's quite a lot of headers on the same level. I think some can be grouped into higher level, e.g. "Selection" headers.

Screenshot

Screenshot 2025-02-11 at 12 41 57

Additionally, some content is missing from the old docs, like the alert and:

If you're unsure of which selection component to use, see EUI's in-depth guide to selection components(external, opens in a new tab or window) for more information.

Screenshot

Screenshot 2025-02-11 at 12 47 43

This alert seems repetitive? We could say this about all controls, right? Not ComboBox specifically.

  • > Truncation
Screenshot

Screenshot 2025-02-11 at 12 40 29

The EuiTextTruncate redirection doesn't work. (The whole Utilities section is missing, it will be added on: #8190)

  • Forms > Selection controls > Selectable

The redirections: EuiComboBox, EuiFilterGroup and EuiTextTruncate don't work.

(The whole Utilities section is missing, it will be added on: #8190)

Search and filter controls ✅

  • Forms > Search and filter controls > Filter group
Screenshot

Screenshot 2025-02-11 at 12 53 52

The EuiSelectable redirection doesn't work.

Date and time controls ❌

  • Main page
Screenshot

Screenshot 2025-02-11 at 13 01 21

Feels to me like EuiDatePicker belongs to a subpage of "Date and time controls", alongside "Date picker range".

  • Forms > Date and time controls
Screenshot

Screenshot 2025-02-11 at 12 59 30

This section seems to belong in EuiDatePickerRange instead. Also, not sure why it belongs under "Locale"?

  • Forms > Date and time controls > Super date picker > Elastic pattern with KQL
Screenshot

Screenshot 2025-02-11 at 13 03 32

The EuiSearchBar redirection doesn't work.

Other controls ✅

  • Forms > Other controls > Color palette picker
Screenshot

Screenshot 2025-02-11 at 13 06 57

The EuiColorPalettePicker redirection doesn't work.

@weronikaolejniczak
Copy link
Contributor

weronikaolejniczak commented Feb 11, 2025

There are few issues I left, either I don't know how to fix it or I believe it should not be fixed on this PR:

  • EuiInputPopover redirection - the link is in the JSDoc (packages/eui/src/components/form/range/types.ts) which I would break by updating it to the new docs structure (/docs/layout/popover#popover-attached-to-input-element). Probably should be done after we release or we create a redirection when /#/layout/popover#popover-attached-to-input-element is visited on the new page? This way we preserve inbound links.
  • Structural decisions for "checkboxes and radios", "date picker" and pages content like moving the alert to the main "Selection controls" page.

Those are decisions I don't feel confident making on my own.

Copy link
Contributor

@mgadewoll mgadewoll left a comment

Choose a reason for hiding this comment

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

I checked the forms docs: The new structure works well and from what I can tell almost all content is there (just missing latest changes to color picker docs for appended titles)

⚠️ But I did find a lot of links that didn't work as expected. From what I can tell, any absolute link (e.g. like /docs/... or /#/) does not work in the PR environment as we are on different sub directories.
I guess we might want to update to relative paths to ensure links work in any environment 🤔

List of links I found for forms:

@weronikaolejniczak
Copy link
Contributor

buildkite test this

@weronikaolejniczak
Copy link
Contributor

@mgadewoll Docs deployed, the latest color palette picker changes are there:

Screenshot 2025-02-13 at 17 00 09

Could you take a look again, compare to this PR? Thanks!

@weronikaolejniczak
Copy link
Contributor

@acstll @mgadewoll I updated all links in the Forms category:

To find all Markdown links I used this regexp: \[([^\]]+)\]\(([^)]+)\) and filtered by the forms folder.

Screenshot 2025-02-17 at 12 19 45

Additionally, I added a section about the links to README.md (to document our decision; ADR would be an overkill). I'll merge the latest changes because I have merged another EUI+ PR and I'll trigger the build on this one.

I'd like to ask you to do a quick sanity check, pretty please 🙏🏻

@weronikaolejniczak
Copy link
Contributor

buildkite test this

@kibanamachine
Copy link

Preview staging links for this PR:

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @weronikaolejniczak

Copy link
Contributor

@mgadewoll mgadewoll left a comment

Choose a reason for hiding this comment

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

🚢 🐈‍⬛ Thanks for the updates!
The changes look good to me and the links in forms work as expected 🎉

@weronikaolejniczak weronikaolejniczak merged commit f884faa into elastic:main Feb 18, 2025
5 checks passed
This was referenced Mar 6, 2025
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[EUI+] Reorganise the document pages
6 participants