Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 3 additions & 3 deletions src/Components/PortfolioSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ export default function PortfolioSection() {
>
<motion.div
data-nojs-visible
className="group h-full overflow-hidden rounded-2xl bg-white/95 backdrop-blur border border-gray-200/80 shadow-md transition-shadow duration-300 motion-reduce:transition-none hover:-translate-y-1 hover:shadow-lg"
className="group flex h-full flex-col overflow-hidden rounded-2xl bg-white/95 backdrop-blur border border-gray-200/80 shadow-md transition-shadow duration-300 motion-reduce:transition-none hover:-translate-y-1 hover:shadow-lg"
initial={{ opacity: 0, y: 20 }}
whileInView={{ opacity: 1, y: 0 }}
transition={{ duration: 0.45, delay: 0.05 * index }}
viewport={{ once: true }}
>
<div className="aspect-[2/1] overflow-hidden bg-white">
<div className="aspect-[2/1] shrink-0 overflow-hidden bg-white">
<PortfolioCoverImage
cover={p.cover}
alt=""
Expand All @@ -119,7 +119,7 @@ export default function PortfolioSection() {
: { responsiveCover: p.responsiveCover })}
/>
</div>
<div className="flex h-full flex-col gap-3 p-5 sm:p-6">
<div className="flex min-h-0 flex-1 flex-col gap-3 p-5 sm:p-6">
<div className="flex flex-wrap items-center gap-2">
{p.status !== undefined && (
<span className="rounded-full bg-blue-50 px-3 py-1 text-xs font-semibold text-blue-800">
Expand Down
4 changes: 2 additions & 2 deletions src/test/NoJsVisibility.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const approvedFiles = {
},
"src/Components/PortfolioSection.tsx": {
baselineHash:
"c44668e5f882394ab72307105fb20f748a4216cf749aac1f3019500066957b8b",
"74d84a2a8057249ed69c0f30f0069db03797ac1fd103722575edc09d9bd53ce8",
markers: 4,
},
"src/Components/SobreMiSection.tsx": {
Expand Down Expand Up @@ -178,7 +178,7 @@ describe("targeted no-JavaScript visibility contract", () => {
"<motion.section\n data-nojs-visible",
);
expect(source("src/Components/PortfolioSection.tsx")).toContain(
"<motion.div\n data-nojs-visible\n className=\"group h-full",
"<motion.div\n data-nojs-visible\n className=\"group flex h-full",
);
expect(source("src/Components/portfolio/PortfolioCard.tsx")).toContain(
"return (\n <motion.div\n data-nojs-visible",
Expand Down
23 changes: 23 additions & 0 deletions src/test/PortfolioSafety.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -867,4 +867,27 @@ describe("portfolio architecture invariants", () => {
expect(portfolioCardSource).not.toContain("truncate");
expect(portfolioCardSource).not.toContain("w-full h-full object-center");
});

it("keeps the Home featured card a real flex column so mobile actions stay visible", () => {
const portfolioSectionSource = fs.readFileSync(
path.join(projectRoot, "src/Components/PortfolioSection.tsx"),
"utf8",
);

expect(portfolioSectionSource).toContain(
'className="group flex h-full flex-col overflow-hidden rounded-2xl',
);
expect(portfolioSectionSource).toContain(
'className="aspect-[2/1] shrink-0 overflow-hidden bg-white"',
);
expect(portfolioSectionSource).toContain(
'className="flex min-h-0 flex-1 flex-col gap-3 p-5 sm:p-6"',
);
expect(portfolioSectionSource).not.toMatch(
/className="group h-full overflow-hidden rounded-2xl/,
);
expect(portfolioSectionSource).not.toContain(
'className="flex h-full flex-col gap-3 p-5 sm:p-6"',
);
});
});
Loading