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

Refactor Accordion component #2157

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 18 additions & 20 deletions apps/website/screens/common/themes/advanced-theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,43 @@
"accordion": {
"backgroundColor": "#ffffff",
"hoverBackgroundColor": "#f2eafa",
"focusBackgroundColor": "transparent",
"activeBackgroundColor": "#f2eafa",
"arrowColor": "#5f249f",
"disabledArrowColor": "#999999",
"subLabelFontFamily": "Open Sans, sans-serif",
"subLabelFontSize": "0.75rem",
"subLabelFontWeight": "400",
"subLabelFontStyle": "normal",
"subLabelFontColor": "#666666",
"disabledSubLabelFontColor": "#999999",
"assistiveTextFontFamily": "Open Sans, sans-serif",
"assistiveTextFontSize": "1rem",
"assistiveTextFontWeight": "300",
"assistiveTextFontStyle": "italic",
"assistiveTextLetterSpacing": "0.025em",
"assistiveTextFontSize": "0.75rem",
"assistiveTextFontWeight": "400",
"assistiveTextFontStyle": "normal",
"assistiveTextFontColor": "#666666",
"disabledAssistiveTextFontColor": "#999999",
"assistiveTextMinWidth": "100px",
"assistiveTextPaddingRight": "1.5rem",
"assistiveTextPaddingLeft": "0rem",
"titleLabelFontFamily": "Open Sans, sans-serif",
"titleLabelFontSize": "1rem",
"titleLabelFontWeight": "400",
"titleLabelFontStyle": "normal",
"titleLabelFontColor": "#000000",
"titleLabelFontColor": "#333333",
"disabledTitleLabelFontColor": "#999999",
"titleLabelPaddingTop": "0rem",
"titleLabelPaddingBottom": "0rem",
"titleLabelPaddingLeft": "0rem",
"titleLabelPaddingRight": "1rem",
"focusBorderColor": "#0095ff",
"focusBorderStyle": "solid",
"focusBorderThickness": "2px",
"borderRadius": "4px",
"boxShadowOffsetX": "0px",
"boxShadowOffsetY": "6px",
"boxShadowBlur": "10px",
"boxShadowOffsetY": "12px",
"boxShadowBlur": "12px",
"boxShadowSpread": "0px",
"boxShadowColor": "#0000001a",
"iconColor": "#5f249f",
"disabledIconColor": "#999999",
"iconSize": "24px",
"iconMarginLeft": "0rem",
"iconMarginRight": "0.75rem",
"accordionGroupSeparatorBorderColor": "#0000001a",
"accordionGroupSeparatorBorderThickness": "1px",
"accordionGroupSeparatorBorderRadius": "0px",
"accordionGroupSeparatorBorderStyle": "solid"
"accordionSeparatorBorderColor": "#e6e6e6",
"accordionSeparatorBorderThickness": "1px",
"accordionSeparatorBorderStyle": "solid"
},
"alert": {
"overlayColor": "#000000b3",
Expand Down
5 changes: 3 additions & 2 deletions apps/website/screens/common/themes/opinionated-theme.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"accordion": {
"accentColor": "#5f249f",
"titleFontColor": "#000000",
"assistiveTextFontColor": "#666666"
"titleFontColor": "#333333",
"subLabelFontColor": "#666666",
"assistiveTextFontColor": "#999999"
},
"button": {
"baseColor": "#5f249f",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ const AccordionPageHeading = ({ children }: { children: ReactNode }) => {
<DxcFlex direction="column" gap="2rem">
<ComponentHeading name="Accordion" />
<DxcParagraph>
Accordions are used to group similar content and hide or show it depending on user needs or preferences.
Accordions give users more granular control over the interface and help digest content in stages, rather
than all at once.
Accordion are used to group related content into collapsible sections, allowing users to expand or hide
Copy link
Collaborator

Choose a reason for hiding this comment

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

I see a bit strange the start of the definition. Maybe we can fit something like to avoid using a singular name ("Accordion") with a plural verb ("are"). How do you see something like:

"The accordion component is a vertical stack of interactive headings used to group related content into collapsible sections, ..."

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Totally agree! I would only change headings by headers, so that it fits with the anatomy in the guidelines. Do you see it fine? @GomezIvann

content based on their needs or preferences. It enhances the user experience by organizing information into
smaller, digestible chunks, helping reduce cognitive load and save screen space.
</DxcParagraph>
<TabsPageHeading tabs={tabs}></TabsPageHeading>
</DxcFlex>
Expand Down
Loading