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

Layout::Flex - Component documentation #2764

Open
wants to merge 13 commits into
base: flex-component-implementation
Choose a base branch
from

Conversation

didoo
Copy link
Contributor

@didoo didoo commented Mar 12, 2025

📌 Summary

This is the documentation counterpart of the Flex component implementation done in #2751

👉 👉 👉 Preview: https://hds-website-git-flex-component-documentation-hashicorp.vercel.app/layouts/flex

🔗 External links

Jira ticket: https://hashicorp.atlassian.net/browse/HDS-4646


👀 Component checklist

💬 Please consider using conventional comments when reviewing this PR.

Copy link

vercel bot commented Mar 12, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
hds-showcase ✅ Ready (Inspect) Visit Preview Mar 19, 2025 10:53am
hds-website ✅ Ready (Inspect) Visit Preview Mar 19, 2025 10:53am

@hashibot-hds hashibot-hds added the docs-website Content updates to the documentation website label Mar 12, 2025
@didoo didoo force-pushed the flex-component-documentation branch from 0ca7362 to 310e63c Compare March 12, 2025 16:09
@didoo didoo force-pushed the flex-component-documentation branch from 310e63c to eabe3d8 Compare March 13, 2025 09:34
@didoo didoo force-pushed the flex-component-documentation branch from eabe3d8 to af5fdbf Compare March 13, 2025 16:24
@didoo didoo force-pushed the flex-component-documentation branch from 04bae74 to 8a58a97 Compare March 14, 2025 12:55
@didoo didoo force-pushed the flex-component-documentation branch from 8a58a97 to 8327f91 Compare March 14, 2025 21:30
Copy link
Contributor

@KristinLBradley KristinLBradley left a comment

Choose a reason for hiding this comment

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

Made a few minor editing suggestions but otherwise looking good!

@didoo didoo changed the title [WIP] Layout::Flex - Component documentation Layout::Flex - Component documentation Mar 18, 2025
</Hds::Layout::Flex>
```

!!! Insight
Copy link
Contributor

Choose a reason for hiding this comment

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

@KristinLBradley should this be added to the grid docs as well?


📚 Refer to the ["Recipes"](#flexbox-layout-recipes) and [Patterns](#common-layout-patterns) sections below for practical examples of how the Flexbox `gap` property can be used to implement specific layouts.

#### Non-standard gap values
Copy link
Contributor

Choose a reason for hiding this comment

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

[Question] Is this something we want to document? Or do we want to be more strict and hide this information as not to encourage people to go away from the spacers? Whatever way we decide to go currently the Grid docs do not mention how to override the preset gap values. We would need to align the two docs @KristinLBradley.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In some cases this will be a necessity, expecially if they need to migrate some existing layouts, so we have to give them a (well documented) way to do it.


---

## Flexbox layout "recipes"
Copy link
Contributor

Choose a reason for hiding this comment

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

[Suggestion] Personally, the concept of "recipes", and the difference between "recipes" and "patterns", was not clear to me initially. Looking at it more closely, my understanding is recipes are detailed examples showing common layouts that flex can accomplish, and patterns are small common "real world" examples.

A lot of the sections above this don't display any visual examples, and reference the recipes section to learn more about an argument. To me, this created a small disconnect as the examples in the recipes somewhat talk about specific arguments, but are more about the best applications of flex in general.

My preference would be for the argument sections to have "simple" examples, such as the ones from the showcase, that show isolated examples of how one argument works. This would also align with how the grid docs are currently structured. I think this would also help make the distinction between recipes and patterns more clear, as I would no longer be relying on the recipes section to see examples for an argument, and would only use it for common layout examples.

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 hear your point. Let's see what others think and then we can make a decision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-website Content updates to the documentation website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants