-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feat(web, web-react): Introduce ActionGroup
component #DS-1607
#1832
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for spirit-design-system ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for spirit-design-system-storybook canceled.
|
20a0d80
to
c01dc94
Compare
ActionGroup
component #DS-1607
<div class="docs-Stack docs-Stack--stretch"> | ||
|
||
<div class="ActionGroup ActionGroup--row"> | ||
<a href="#" role="button" class="Button Button--primary Button--medium">Primary Action</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<a href="#" role="button" class="Button Button--primary Button--medium">Primary Action</a> | |
<a href="#" class="Button Button--primary Button--medium">Primary Action</a> |
Please avoid using role="button"
, using the <button>
element is more appropriate in such case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We agreed in person to:
- not implement the
ActionGroup
component in theweb
package at all, - instead, extend the
Flex
component:- extend the Direction Dictionary with
DirectionExtended
which extendsDirection
withhorizontalReversed
andverticalReversed
, - deprecate
row
andcolumn
layouts of theFlex
component in favor of theDirectionExtended
dictionary, create codemod in React,
- extend the Direction Dictionary with
- in React, reuse the updated
Flex
component to create theActionGroup
component.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for the naming. Isn't the Orientation
with the values vertical
/horizontal
better than Direction
? I think the "direction" suggests more from/to path than "orientation", which I understand as position on some point, e.g. a 360-degree circle (I hope this is understandable).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (blocking): We have nothing to say here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pavelklibani left the README intentionally empty because he anticipated we would decide to discard the web
component.
|
||
const ColumnLayout = () => { | ||
return ( | ||
<ActionGroup direction="column"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (blocking): I am not quite satisfied with the naming. I expect the direction
is from left to right, up and down, not column
or row
.
Maybe orientation
as I saw it in Adobe Spectrum Button Group would sound better. Of course with values like horizontal
or vertical
. And I think horizontal-reversed
or vertical-reversed
work as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The thing is we currently use direction
everywhere, it comes from our Direction dictionary. I am certainly open to a discussion, just be aware it affects all components with this prop.
<div class="docs-Stack docs-Stack--stretch"> | ||
|
||
<div class="ActionGroup ActionGroup--row"> | ||
<a href="#" role="button" class="Button Button--primary Button--medium">Primary Action</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Maybe @adamkudrna wants to suggest this:
<a href="#" role="button" class="Button Button--primary Button--medium">Primary Action</a> | |
<button class="Button Button--primary Button--medium">Primary Action</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either of these, they are both correct, it doesn't matter. Just let's not use <a role="button">
🙂.
Description
Additional context
Issue reference
Component ActionGroup | Web