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

Flex Component Evolution #861

Closed
korgon opened this issue Aug 17, 2023 · 0 comments · Fixed by #870
Closed

Flex Component Evolution #861

korgon opened this issue Aug 17, 2023 · 0 comments · Fixed by #870
Assignees
Labels
type: feature New functionality

Comments

@korgon
Copy link
Contributor

korgon commented Aug 17, 2023

The Flex component has worked well to demonstrate the possibilities of building a layout, but it is time for it to evolve.

  1. simplify layout props
  2. add href / link ability
  3. rename component to something more appropriate
  4. add testing
  5. move component into ResultLayout for internal use only?

Currently the component is highly coupled to CSS flex box properties to function. I think a more intuitive easier to use set of props would be beneficial to make using the quirky bits of flexbox simpler.

We have needed ways to create anchor tags (links) within layouts, and we have considered a Link component or similar... however, it makes more sense to just extend the capabilities of this component to function as a link if a specific prop is provided (href perhaps). In this way we can leverage the fact that other components are already being wrapped and prevent having another wrapper.

After the changes above the component will no longer be 'flex' only, and so a rename is likely in order. It is a Layout building block, so maybe LayoutContainer or simply Container would be a more appropriate name.

Lastly it is unlikely that this component would be used outside of the ResultLayout, so we should probably move it as a helper component for ResultLayout and not create a story for it, nor export it from the component library.

@korgon korgon added type: feature New functionality type: testing Test related type: refactor Code cleanup labels Aug 17, 2023
@korgon korgon added this to the Snap Themed Components milestone Aug 17, 2023
@korgon korgon removed type: testing Test related type: refactor Code cleanup labels Aug 17, 2023
@chrisFrazier77 chrisFrazier77 self-assigned this Aug 18, 2023
This was linked to pull requests Aug 22, 2023
@korgon korgon closed this as completed Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature New functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants