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

Feat: accordion build item content #107

Merged
merged 2 commits into from
Jul 19, 2024
Merged

Conversation

mari1912
Copy link
Collaborator

Description

  • Add accordion build item content

Related Issues

Visual reference

image

@mari1912 mari1912 requested a review from lfjnascimento July 19, 2024 14:11
@mari1912 mari1912 self-assigned this Jul 19, 2024
@mari1912 mari1912 force-pushed the feat/table-build-page branch from 6f84d3a to 5c3fe08 Compare July 19, 2024 14:25
Comment on lines +102 to +105
const AccordionBuildsTrigger = ({
accordionData,
}: IAccordionItems): JSX.Element => {
const triggerInfo = accordionData as AccordionItemBuilds;
Copy link
Contributor

@lfjnascimento lfjnascimento Jul 19, 2024

Choose a reason for hiding this comment

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

Its a good pratice to avoid the use of as when possible since it really force the type don't matter what. We could create another type or do:

const AccordionBuildsTrigger = ({
  accordionData,
}: {
  accordionData: AccordionItemBuilds;
}): JSX.Element => {

? [
{
value: contentData.testStatus?.passTests ?? 0,
label: 'Test Success',
Copy link
Contributor

@lfjnascimento lfjnascimento Jul 19, 2024

Choose a reason for hiding this comment

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

i18n on labels

color: Colors.Gray,
},
]
: [{ value: 1, label: 'None', color: Colors.Gray }];
Copy link
Contributor

Choose a reason for hiding this comment

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

why value: 1 and label: 'None?

@mari1912 mari1912 force-pushed the feat/table-build-page branch 2 times, most recently from 138ec6f to 650844c Compare July 19, 2024 14:57
Comment on lines 113 to 118
<LinkWithIcon
title={<FormattedMessage id="buildAccordion.kernelConfig" />}
icon={<MdFolderOpen className="text-lightBlue" />}
link={kernelConfig}
linkText={<FormattedMessage id="buildAccordion.kernelConfigPath" />}
/>
Copy link
Contributor

Choose a reason for hiding this comment

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

We could make LinksGroup receive an array of objects containing title, link e linkText. Thais way LinksGroup becomes more general and reusable

@@ -40,7 +40,7 @@ const CardContent = ({ card }: ICardContent): JSX.Element => {
/>
);
} else if (card.type === 'chart') {
return <StatusChartMemoized {...card} />;
return <StatusChartMemoized {...card} title={<></>} />;
Copy link
Contributor

Choose a reason for hiding this comment

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

it would be better to make the title optional

@mari1912 mari1912 force-pushed the feat/accordion-content-build branch from 403ac75 to 72fe214 Compare July 19, 2024 15:05
Base automatically changed from feat/table-build-page to main July 19, 2024 17:22
@mari1912 mari1912 force-pushed the feat/accordion-content-build branch 2 times, most recently from 655d4ce to 31908a6 Compare July 19, 2024 17:32
@mari1912 mari1912 force-pushed the feat/accordion-content-build branch from 31908a6 to da4fc95 Compare July 19, 2024 17:58
@mari1912 mari1912 merged commit a89f14f into main Jul 19, 2024
4 checks passed
@mari1912 mari1912 deleted the feat/accordion-content-build branch July 19, 2024 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create Build Summary component (accordion content for Build tab)
2 participants