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
4 changes: 2 additions & 2 deletions browser-extension/src/entrypoints/posts/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ export default function App() {
return (
<HashRouter>
<div className="flex h-screen bg-gray-100 dark:bg-gray-800">
<div className="w-1/5 overflow-y-auto">
<div className="w-[210px] flex-none overflow-y-auto">
<SidePanelMenu />
</div>
<div className="flex-1 w-fit overflow-y-auto ">
<div className="flex-grow flex-shrink flex overflow-y-auto">
<Routes>
<Route index path="/" element={<HomePage />} />
<Route index path="/posts" element={<PostListPage />} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function ContactSupport() {
});

return (
<main className="p-4 flex flex-col gap-6 items-start">
<main className="flex flex-col gap-6 items-start">
<PageHeader title="Signaler un problème" />
<Card>
<CardTitle>Comment signaler mon problème</CardTitle>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function PostSnapshotDetailPage() {
});

return (
<main className="p-4">
<main>
{isLoading && <div>Loading...</div>}
{post && (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function PostSnapshotListPage() {
};

return (
<main className="p-4 flex flex-col gap-4 w-full max-w-full overflow-x-hidden">
<main className="flex flex-col gap-4 overflow-x-hidden">
<h1>Publications collectées</h1>

{postsQuery.isLoading && <Spinner className="size-8" />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { HelpPageContent } from "./HelpContent";

function HarrasementHelpPage() {
return (
<main className="p-4 flex flex-col items-start w-full max-w-4xl">
<main className="flex flex-col items-start ">
<PageHeader title="Aide et ressources - Cyberharcèlement & actions" />
<HelpPageContent mdContent={harassmentHelpMarkdown}></HelpPageContent>
</main>
Expand Down
2 changes: 1 addition & 1 deletion browser-extension/src/entrypoints/posts/Help/HelpPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { BookOpenTextIcon, HandHeartIcon, ShieldCheckIcon } from "lucide-react";

function HelpPage() {
return (
<main className="p-4 flex flex-col gap-6 items-start w-full max-w-4xl">
<main className="flex flex-col gap-6 items-start">
<PageHeader title="Aide et ressources" />

<div className="grid gap-4 md:grid-cols-3 w-full">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { HelpPageContent } from "./HelpContent";

function PrivacyPolicyPage() {
return (
<main className="p-4 flex flex-col items-start w-full max-w-4xl">
<main className="flex flex-col items-start ">
<PageHeader title="Aide et ressources - Données personnelles et politique de confidentialité" />
<HelpPageContent mdContent={privacyPolicyMarkdown}></HelpPageContent>
</main>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { HelpPageContent } from "./HelpContent";

function ProductHelpPage() {
return (
<main className="p-4 flex flex-col items-start w-full max-w-4xl">
<main className="flex flex-col items-start">
<PageHeader title="Aide et ressources - Utiliser Balance tes Haters" />
<HelpPageContent mdContent={productHelpMarkdown}></HelpPageContent>
</main>
Expand Down
2 changes: 1 addition & 1 deletion browser-extension/src/entrypoints/posts/Home/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function HomePage() {
const allComments = (data || []).flatMap((p) => p.comments);

return (
<main className="p-4 flex flex-col gap-6 w-full ">
<main className="flex flex-col gap-6">
<PageHeader title="Vue d'ensemble" />
<div className="flex justify-between ">
<SocialNetworkSelector
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function PostDetailPage() {
const numberOfHatefulComments = hatefulComments.length;

return (
<main className="p-4 flex flex-col gap-6 w-5/6">
<main className="flex flex-col gap-6">
{isLoading && <div>Chargement...</div>}
{post && (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function PostListPage() {
} = useFilteredPostList(socialNetworkFilter);

return (
<main className="p-4 flex flex-col gap-6 items-start">
<main className="flex flex-col gap-6 items-start">
<PageHeader title="Publications analysées" />
<SocialNetworkSelector
value={socialNetworkFilter}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export function BuildReport() {
const [displayReport, setDisplayReport] = React.useState<boolean>(false);

return (
<main className="p-4 flex flex-col gap-6 w-full mx-auto">
<main className="flex flex-col gap-6">
{!displayReport && (
<BthStepper
reportQueryData={reportQueryData}
Expand Down
9 changes: 7 additions & 2 deletions browser-extension/src/entrypoints/posts/Shared/PageHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@ import { Separator } from "@base-ui/react";

function PageHeader({ title }: Readonly<{ title: string }>) {
return (
<div>
<div className="w-full relative">
<h4 className="text-left w-full mb-3">{title}</h4>
<Separator className="w-screen -ms-8 border" />

{/*
PageHeader is meant to be used only inside a <main> tag
The separator is configured to overflow on <main> padding
*/}
<Separator className="absolute w-[calc(100%+var(--spacing)*8)] -mx-4 border" />
</div>
);
}
Expand Down
2 changes: 1 addition & 1 deletion browser-extension/src/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ blockquote {
}

main {
@apply bg-background m-3 rounded-md overflow-hidden w-11/12;
@apply bg-background m-3 p-4 rounded-md w-full min-h-[calc(100%-var(--spacing)*6)] h-fit;
}

/* Shadcn theme*/
Expand Down
Loading