Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
74 changes: 74 additions & 0 deletions uli-website/src/components/molecules/AppShellNew.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
import * as React from "react";
import { Grommet, Box } from "grommet";
import { Helmet } from "react-helmet";
import { Theme } from "../atoms/UliCore";
import NavBarNew from "./NavBarNew";
import Footer from "./Footer";
import { useTranslation } from "react-i18next";
import { useLocation } from "@reach/router";
import Projects from "./Projects";

export default function AppShellNew({ children }) {
const { i18n } = useTranslation();
const location = useLocation();

/* ---------- Set language from localStorage ---------- */
React.useEffect(() => {
const lang = localStorage.getItem("uli-lang");
if (lang) {
i18n.changeLanguage(lang);
}
}, []);

/* ---------- Page title ---------- */
let fullPath = location.pathname;
if (fullPath.endsWith("/")) {
fullPath = fullPath.slice(0, -1);
}

let title = fullPath.split("/").at(-1);

if (["hi", "en", "ta", "ma"].includes(title)) {
title = "Uli";
}

title = title
.split("-")
.map((w) => w.charAt(0).toUpperCase() + w.slice(1))
.join(" ");
Comment on lines +26 to +40
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Ensure a default title for the root path.
When pathname === "/", title becomes an empty string, so the page title/OG title is blank. Add a fallback (e.g., “Uli”).

✅ Suggested fix
-  let title = fullPath.split("/").at(-1);
+  let title = fullPath.split("/").filter(Boolean).at(-1) || "Uli";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
let fullPath = location.pathname;
if (fullPath.endsWith("/")) {
fullPath = fullPath.slice(0, -1);
}
let title = fullPath.split("/").at(-1);
if (["hi", "en", "ta", "ma"].includes(title)) {
title = "Uli";
}
title = title
.split("-")
.map((w) => w.charAt(0).toUpperCase() + w.slice(1))
.join(" ");
let fullPath = location.pathname;
if (fullPath.endsWith("/")) {
fullPath = fullPath.slice(0, -1);
}
let title = fullPath.split("/").filter(Boolean).at(-1) || "Uli";
if (["hi", "en", "ta", "ma"].includes(title)) {
title = "Uli";
}
title = title
.split("-")
.map((w) => w.charAt(0).toUpperCase() + w.slice(1))
.join(" ");
🤖 Prompt for AI Agents
In `@uli-website/src/components/molecules/AppShellNew.jsx` around lines 24 - 38,
The computed title derived from location.pathname can be an empty string for the
root path ("/"), causing blank page/OG titles; modify the logic around
fullPath/title in AppShellNew.jsx (variables fullPath and title) to detect when
title === "" (or fullPath === "/") and set a default like "Uli" before the
language check and capitalization steps so the root page gets a proper fallback
title.


return (
<Grommet theme={Theme}>
<main
style={{
display: "flex",
flexDirection: "column",
minHeight: "100vh",
}}
>
<Helmet>
<meta charSet="utf-8" />
<title>{title}</title>
<link rel="stylesheet" href="/layout.css" />
<link rel="stylesheet" href="https://use.typekit.net/twt1ywc.css" />
<meta property="og:title" content={title} />
<meta name="icon" href="images/favicon-32x32.png" />
<script
Comment on lines +51 to +58
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Use <link rel="icon"> instead of a meta tag.
<meta name="icon"> won’t register a favicon in browsers.

✅ Suggested fix
-          <meta name="icon" href="images/favicon-32x32.png" />
+          <link rel="icon" href="images/favicon-32x32.png" />
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<Helmet>
<meta charSet="utf-8" />
<title>{title}</title>
<link rel="stylesheet" href="/layout.css" />
<link rel="stylesheet" href="https://use.typekit.net/twt1ywc.css" />
<meta property="og:title" content={title} />
<meta name="icon" href="images/favicon-32x32.png" />
<script
<Helmet>
<meta charSet="utf-8" />
<title>{title}</title>
<link rel="stylesheet" href="/layout.css" />
<link rel="stylesheet" href="https://use.typekit.net/twt1ywc.css" />
<meta property="og:title" content={title} />
<link rel="icon" href="images/favicon-32x32.png" />
<script
🤖 Prompt for AI Agents
In `@uli-website/src/components/molecules/AppShellNew.jsx` around lines 49 - 56,
In AppShellNew.jsx inside the Helmet block, replace the incorrect <meta
name="icon" ... /> usage with a proper favicon link element; locate the Helmet
component in the AppShellNew.jsx file and change the meta tag that sets
name="icon" to a link element with rel="icon" and the same href (optionally add
type="image/png") so browsers register the favicon correctly.

defer
data-domain="uli.tattle.co.in"
src="https://plausible.io/js/plausible.js"
></script>
</Helmet>

{/* NEW NAVBAR */}
<NavBarNew />

{/* PAGE CONTENT */}
<Box flex="grow">{children}</Box>
<Projects/>
{/* FOOTER */}
<Footer />
</main>
</Grommet>
);
}
80 changes: 80 additions & 0 deletions uli-website/src/components/molecules/NavBarNew.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
import React from "react";
import { Box, Text, ResponsiveContext } from "grommet";
import { NavLink } from "../atoms/UliCore";
import { navigate } from "gatsby";
import { useContext } from "react";
import navbarBg from "../../images/navbar-bg.svg";


export default function NavBarNew() {
const size = useContext(ResponsiveContext);

return (
<>
{/* ---------- TOP SVG STRIP ---------- */}
<Box
height="20px"
style={{
backgroundImage: `url(${navbarBg})`,
backgroundRepeat: "repeat-x",
backgroundPosition: "top left",
backgroundSize: "auto 20px",
}}
/>

{/* ---------- NAVBAR ---------- */}
<Box
align="center"
background="#fff6e9"
pad={{ vertical: "medium", horizontal: "small" }}
>
<Box
width="xlarge"
direction="row"
align="center"
justify="between"
style={{
position: "relative",
}}
>
{/* ---------- LEFT ---------- */}
<Box direction="row" gap="medium">
<NavLink to="/">
<Text size="small">Tattle</Text>
</NavLink>
</Box>

{/* ---------- CENTER LOGO ---------- */}
<Box
style={{
position: size === "small" ? "static" : "absolute",
left: "50%",
transform: size === "small" ? "none" : "translateX(-50%)",
cursor: "pointer",
}}
onClick={() => navigate("/")}
>
Comment on lines +48 to +56
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

find . -name "NavBarNew.jsx" -type f

Repository: tattle-made/Uli

Length of output: 111


🏁 Script executed:

cat -n uli-website/src/components/molecules/NavBarNew.jsx | head -80

Repository: tattle-made/Uli

Length of output: 2810


Make the center logo keyboard-accessible.
The clickable Box only handles mouse clicks, so keyboard users cannot activate it. Add keyboard semantics and handlers, or use a proper link/button element. The left and right navigation use NavLink for consistency—this should too.

✅ Suggested fix
          <Box
            style={{
              position: size === "small" ? "static" : "absolute",
              left: "50%",
              transform: size === "small" ? "none" : "translateX(-50%)",
              cursor: "pointer",
            }}
+           role="link"
+           tabIndex={0}
+           aria-label="Uli home"
            onClick={() => navigate("/")}
+           onKeyDown={(e) => {
+             if (e.key === "Enter" || e.key === " ") navigate("/");
+           }}
          >

This violates WCAG 2.1 Level A (2.1.1 Keyboard accessibility) since interactive elements must be operable via keyboard.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<Box
style={{
position: size === "small" ? "static" : "absolute",
left: "50%",
transform: size === "small" ? "none" : "translateX(-50%)",
cursor: "pointer",
}}
onClick={() => navigate("/")}
>
<Box
style={{
position: size === "small" ? "static" : "absolute",
left: "50%",
transform: size === "small" ? "none" : "translateX(-50%)",
cursor: "pointer",
}}
role="link"
tabIndex={0}
aria-label="Uli home"
onClick={() => navigate("/")}
onKeyDown={(e) => {
if (e.key === "Enter" || e.key === " ") navigate("/");
}}
>
🤖 Prompt for AI Agents
In `@uli-website/src/components/molecules/NavBarNew.jsx` around lines 48 - 56, The
centered logo Box is only clickable via mouse (onClick => navigate("/")) and
must be keyboard-accessible; replace the Box with the same NavLink/NavLink-like
component used for left/right navigation or add proper semantics: give the
element tabIndex={0}, role="link" (or use a button/Link), and handle onKeyDown
to call navigate("/") for Enter/Space, ensuring focus styles remain; update the
element around the navigate("/") call (the Box) to match NavLink usage so
keyboard and screen-reader users can activate it.

<img
src="/Uli_Logo.png"
alt="Uli Logo"
style={{ height: "40px" }}
/>
</Box>

{/* ---------- RIGHT ---------- */}
<Box direction="row" gap="medium">
<NavLink to="/contact">
<Text size="small">Contact</Text>
</NavLink>
<NavLink to="/about">
<Text size="small">About us</Text>
</NavLink>
<NavLink to="/data">
<Text size="small">Data Y</Text>
</NavLink>
</Box>
</Box>
</Box>
</>
);
}
70 changes: 70 additions & 0 deletions uli-website/src/components/molecules/ProjectCard.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import React from "react";
import projectImage from "../../images/projectImage.svg";

const pixelCutShape =
"polygon(" +
"0% 20%, 3% 20%, 3% 10%, 6% 10%, 6% 0%, " +
"94% 0%, 94% 10%, 97% 10%, 97% 20%, 100% 20%, " +
"100% 80%, 97% 80%, 97% 90%, 94% 90%, 94% 100%, " +
"6% 100%, 6% 90%, 3% 90%, 3% 80%, 0% 80%" +
")";

const ProjectCard = ({ title, description, reverse }) => {
return (
<div
style={{
background: "#fde9d9",
padding: "10px",
clipPath: pixelCutShape,
}}
>
<div
style={{
backgroundColor: "#fde9d9",
padding: "44px 56px",
clipPath: pixelCutShape,
}}
>
<div
style={{
display: "flex",
flexDirection: reverse ? "row-reverse" : "row",
alignItems: "center",
justifyContent: "space-between",
gap: "48px",
}}
>
{/* LEFT ICON */}
<img
src={projectImage}
alt=""
style={{ width: "180px" }}
/>

{/* TEXT */}
<div style={{ maxWidth: "55%" }}>
<h3 style={{ marginBottom: "16px" }}>{title}</h3>

<p style={{ marginBottom: "24px", lineHeight: "1.6" }}>
{description}
</p>

<div style={{ display: "flex", gap: "18px" }}>
<button style={btnStyle}>Install</button>
<button style={btnStyle}>Install</button>
</div>
Comment on lines +52 to +55
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Wire CTA buttons to real actions instead of hardcoded labels.
Both buttons are static and don’t trigger navigation or actions. If these are meant to be real CTAs (per the “links” requirement), thread labels + href/onClick through props and render them conditionally.

🛠️ Example approach
-const ProjectCard = ({ title, description, reverse }) => {
+const ProjectCard = ({ title, description, reverse, primaryCta, secondaryCta }) => {
...
-            <div style={{ display: "flex", gap: "18px" }}>
-              <button style={btnStyle}>Install</button>
-              <button style={btnStyle}>Install</button>
-            </div>
+            <div style={{ display: "flex", gap: "18px" }}>
+              {primaryCta && (
+                <a href={primaryCta.href} style={btnStyle}>
+                  {primaryCta.label}
+                </a>
+              )}
+              {secondaryCta && (
+                <a href={secondaryCta.href} style={btnStyle}>
+                  {secondaryCta.label}
+                </a>
+              )}
+            </div>
🤖 Prompt for AI Agents
In `@uli-website/src/components/molecules/ProjectCard.jsx` around lines 52 - 55,
ProjectCard currently renders two static "Install" buttons; change this to
accept CTA props (e.g., primaryCta, secondaryCta) that include label and either
href or onClick, use the existing btnStyle for styling, and render each button
conditionally only when its prop is present; for link CTAs render an anchor
(<a>) with href and rel/target as needed, otherwise render a <button> with the
onClick handler, and update the JSX where btnStyle is used so labels come from
primaryCta.label / secondaryCta.label instead of hardcoded text.

</div>
</div>
</div>
</div>
);
};

const btnStyle = {
background: "transparent",
border: "2px dashed #000",
padding: "10px 28px",
cursor: "pointer",
};

export default ProjectCard;
52 changes: 52 additions & 0 deletions uli-website/src/components/molecules/Projects.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import React from "react";
import { projects } from "../../config/projects";
import ProjectCard from "./ProjectCard";
import topBorder from "../../images/ProjectsTitle.svg";
import sideBorder from "../../images/left-border.svg";

const Projects = () => {
return (
<section
style={{
backgroundColor: "#fff6eb",
position: "relative",
}}
>
{/* 🔝 TOP BORDER */}
<div
style={{
height: "50px",
backgroundImage: `url(${topBorder})`,
backgroundSize: "auto 100%",
}}
/>

{/* ⬅️➡️ SIDE BORDERS WRAPPER */}
<div
style={{
backgroundImage: `url(${sideBorder}), url(${sideBorder})`,
backgroundRepeat: "repeat-y, repeat-y",
backgroundPosition: "left top, right top",
backgroundSize: "auto 100%",
padding: "80px 40px",
}}
>
<div
style={{
maxWidth: "1200px",
margin: "0 auto",
display: "flex",
flexDirection: "column",
gap: "40px",
}}
>
{projects.map((project) => (
<ProjectCard key={project.id} {...project} />
))}
</div>
</div>
</section>
);
};

export default Projects;
31 changes: 31 additions & 0 deletions uli-website/src/config/projects.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// src/config/projects.js
export const projects = [
{
id: 1,
title: "Title",
description:
"Use Uli to redact slurs and abusive content, archive problematic content, and collectively push back against online gender based violence",
reverse: false,
},
{
id: 2,
title: "Title",
description:
"Use Uli to redact slurs and abusive content, archive problematic content, and collectively push back against online gender based violence",
reverse: true,
},
{
id: 3,
title: "Title",
description:
"Use Uli to redact slurs and abusive content, archive problematic content, and collectively push back against online gender based violence",
reverse: false,
},
{
id: 4,
title: "Title",
description:
"Use Uli to redact slurs and abusive content, archive problematic content, and collectively push back against online gender based violence",
reverse: true,
},
];
14 changes: 14 additions & 0 deletions uli-website/src/images/ProjectsTitle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions uli-website/src/images/left-border.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions uli-website/src/images/navbar-bg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions uli-website/src/images/projectImage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 4 additions & 7 deletions uli-website/src/pages/new-home.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import * as React from "react"
import AppShell from "../components/molecules/AppShell"
import AppShellNew from "../components/molecules/AppShellNew"
import AnnouncementBanner from "../components/molecules/AnnouncementBanner"
import { Box, Text } from "grommet"


const NewHome = () => {
return (
<AppShell>
<main style={{ padding: "2rem" }}>

<AppShellNew>
<main>
<AnnouncementBanner>
<Box>
<Text size="xlarge">Announcement</Text>
Expand All @@ -18,10 +17,8 @@ const NewHome = () => {
</Box>

</AnnouncementBanner>
<h1>New Home</h1>
<p>This is a temporary placeholder for the new homepage design.</p>
</main>
</AppShell >
</AppShellNew >
)
}

Expand Down