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

fix(No-id): Fix borders and toolbar #473

Merged
merged 1 commit into from
Dec 10, 2024
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: 4 additions & 0 deletions frontend/src/components/ReviewTable.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@
.information-display {
width: 100vw;
background-color: white;
}

.review-border {
border-color: rgb(204, 204, 204);
}
38 changes: 19 additions & 19 deletions frontend/src/components/ReviewTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ const ReviewTable = ({
isUploadComplete={!(errorCount > 0)}
/>
<Divider margin="0px" />
<div className="display-flex flex-justify-center padding-top-4">
<div className="display-flex flex-justify-center padding-top-4 review-border border-bottom">
<ExtractStepper currentStep={ExtractStep.Review} />
</div>

<div className="display-flex flex-justify-between padding-top-4 information-display">
<div className="display-flex flex-justify-between information-display">
<div className="width-50 height-full table-container-half">
<div className="display-flex flex-column review-template-header-container">
<h2>Extracted Data</h2>
Expand Down Expand Up @@ -178,24 +178,24 @@ const ReviewTable = ({
</div>
</div>
<div className="image-container">
<div className="width-full bg-white border-gray-5 border-1px">
<div>
<Toolbar totalPages={images.length} onPageChange={(index) => handleImageChange(index - 1)} />
<Toolbar className="toolbar-borders" totalPages={images.length} onPageChange={(index) => handleImageChange(index - 1)} />
<div className=" height-full width-full padding-2">
<div className="width-full bg-white">
{images.map((image, innerIndex) => (
<svg
style={{ display: innerIndex !== index ? "none" : "initial" }}
viewBox="0 0 612 720"
key={innerIndex}
>
<image
result="photo"
href={image}
preserveAspectRatio="xMidYMid slice"
></image>
<polygon points={maskShape} stroke="blue" fill="none" />
</svg>
))}
</div>
{images.map((image, innerIndex) => (
<svg
style={{ display: innerIndex !== index ? "none" : "initial" }}
viewBox="0 0 612 720"
key={innerIndex}
>
<image
result="photo"
href={image}
preserveAspectRatio="xMidYMid slice"
></image>
<polygon points={maskShape} stroke="blue" fill="none" />
</svg>
))}
</div>
</div>
</div>
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/components/Toolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ import "./Toolbar.scss";

interface ToolbarProps {
initialPage?: number;
className?: string;
totalPages: number;
onPageChange?: (page: number) => void;
}

const Toolbar: React.FC<ToolbarProps> = ({
initialPage = 1,
className = '',
totalPages,
onPageChange,
}) => {
Expand All @@ -33,7 +35,7 @@ const Toolbar: React.FC<ToolbarProps> = ({
};

return (
<div className="toolbar" data-testid="toolbar">
<div className={`toolbar ${className}`} data-testid="toolbar">
<PageNumber
currentPage={currentPage}
totalPages={totalPages}
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/pages/ReviewTemplate.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,13 @@
margin: 24px 16px;
}

.toolbar-border {
box-shadow: -2px 4px 11px 2px rgba(231, 242, 250, 0.58);
}

.image-container {
width: 50%;
background-color: #f5fbff;
padding: 16px;
}

.text-success-confidence {
Expand Down
Loading