Skip to content

Commit

Permalink
SHARED:VKT(Frontend): Add and use new utility class 'gapped-xxxxl', m…
Browse files Browse the repository at this point in the history
…iscellaneous UI improvements
  • Loading branch information
pkoivisto committed Dec 30, 2024
1 parent b3d6f5b commit 4b255c2
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 20 deletions.
6 changes: 6 additions & 0 deletions frontend/packages/shared/CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Released]

## [1.11.12] - 2024-12-30

### Added

- Class shorthand for larger gaps: gapped-xxxxl

## [1.11.11] - 2024-12-27

### Changed
Expand Down
2 changes: 1 addition & 1 deletion frontend/packages/shared/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opetushallitus/kieli-ja-kaantajatutkinnot.shared",
"version": "1.11.11",
"version": "1.11.12",
"description": "Shared Frontend Package",
"exports": {
"./components": "./src/components/index.tsx",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@
gap: map.get($spacing, 'xxl');
}

.gapped-xxxxl {
gap: map.get($spacing, 'xxxxl');
}

.gapped-sm {
gap: map.get($spacing, 'sm');
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/packages/vkt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
},
"dependencies": {
"reduxjs-toolkit-persist": "^7.2.1",
"shared": "npm:@opetushallitus/[email protected].11"
"shared": "npm:@opetushallitus/[email protected].12"
}
}
2 changes: 1 addition & 1 deletion frontend/packages/vkt/public/i18n/fi-FI/clerk.json
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
"examiner": "Tutkinnon vastaanottaja",
"language": "Kieli"
},
"title": "Tutkinnon vastaanottajan tiedot"
"title": "Tutkinnon vastaanottajien tiedot"
},
"header": {
"backToOph": "Takaisin Opintopolkuun",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const ClerkExaminerExamEventListing = () => {
// TODO Table sorting not implemented yet!

return (
<>
<div className="rows gapped clerk-homepage__extra-padding-top">
<div className="columns">
<div className="clerk-homepage__grid-container__heading">
<H2>{t('title')}</H2>
Expand All @@ -66,6 +66,6 @@ export const ClerkExaminerExamEventListing = () => {
rowsPerPageLabel={translateCommon('rowsPerPageLabel')}
stickyHeader
/>
</>
</div>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export const ClerkExaminerListing = () => {
const examiners = useAppSelector(selectFilteredExaminers);

return (
<>
<div className="rows gapped clerk-homepage__extra-padding-top">
<div className="clerk-homepage__grid-container__heading columns grow">
<H2>{t('title')}</H2>
</div>
Expand All @@ -172,6 +172,6 @@ export const ClerkExaminerListing = () => {
getRowDetails={getRowDetails}
stickyHeader
/>
</>
</div>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,10 @@ export const ExaminerExamEventListing = () => {
setExaminerExamEventLanguageFilter(event.target.value as ExamLanguage),
);
};
const allExamEvents = examiner?.examEvents || [];

return (
<div className="examiner-homepage__exam-events rows gapped-xl margin-top-xxl">
<div className="examiner-homepage__exam-events rows gapped-xl margin-top-sm margin-bottom-lg">
<div className="columns">
<H2 className="grow">{t('heading')}</H2>
<div className="flex-end">
Expand All @@ -170,10 +171,12 @@ export const ExaminerExamEventListing = () => {
</div>
<Divider />
<ExaminerExamEventToggleFilters />
<LanguageFilter
value={examEventFilters.languageFilter}
onChange={handleLanguageFilterChange}
/>
{allExamEvents.length > 0 && (
<LanguageFilter
value={examEventFilters.languageFilter}
onChange={handleLanguageFilterChange}
/>
)}
{filteredExamEvents.length === 0 && (
<Text className="empty-results">{t('labels.noExamEvents')}</Text>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,16 @@ export const ClerkGoodAndSatisfactoryLevelPage: FC = () => {
<Grid item>
<Paper elevation={3} className="clerk-homepage__examiners">
{examinersLoading ? (
<PublicExamEventGridSkeleton />
<div className="rows gapped">
<PublicExamEventGridSkeleton />
</div>
) : (
<ClerkExaminerListing />
)}
{examEventsLoading ? (
<PublicExamEventGridSkeleton />
<div className="rows gapped">
<PublicExamEventGridSkeleton />
</div>
) : (
<ClerkExaminerExamEventListing />
)}
Expand Down
6 changes: 3 additions & 3 deletions frontend/packages/vkt/src/pages/examiner/ExaminerHomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const PublicInformation = () => {
}

return (
<div className="examiner-homepage__public-information rows gapped-xl margin-bottom-xxl">
<div className="examiner-homepage__public-information rows gapped-xl margin-top-lg margin-bottom-lg">
<div className="columns gapped">
<H2 className="grow">{t('heading')}</H2>
<CustomButtonLink
Expand Down Expand Up @@ -79,7 +79,7 @@ const ContactRequests = () => {
const { examiner } = useAppSelector(examinerDetailsSelector);

return (
<div className="examiner-homepage__contact-requests rows gapped-xl margin-top-xxl margin-bottom-xxl">
<div className="examiner-homepage__contact-requests rows gapped-xl margin-top-sm margin-bottom-lg">
<H2>{t('heading')}</H2>
<Divider />
{examiner?.contactRequests?.length === 0 ? (
Expand All @@ -94,7 +94,7 @@ const ContactRequests = () => {
const ExaminerOverview = () => {
return (
<Paper elevation={3} className="examiner-homepage__overview">
<div className="rows gapped-xl">
<div className="rows gapped-xxxxl">
<PublicInformation />
<ContactRequests />
<ExaminerExamEventListing />
Expand Down
6 changes: 5 additions & 1 deletion frontend/packages/vkt/src/styles/pages/_clerk-homepage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,14 @@
& &__examiners {
display: flex;
flex-direction: column;
gap: 2rem;
gap: 6rem;
padding: 2.5rem;
}

& &__extra-padding-top {
padding-top: 3rem;
}

& &__notification {
background-color: $color-blue-200;
color: $color-text-primary;
Expand Down
4 changes: 2 additions & 2 deletions frontend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2690,7 +2690,7 @@ __metadata:
languageName: unknown
linkType: soft

"@opetushallitus/kieli-ja-kaantajatutkinnot.shared@workspace:packages/shared, shared@npm:@opetushallitus/[email protected].11":
"@opetushallitus/kieli-ja-kaantajatutkinnot.shared@workspace:packages/shared, shared@npm:@opetushallitus/[email protected].12":
version: 0.0.0-use.local
resolution: "@opetushallitus/kieli-ja-kaantajatutkinnot.shared@workspace:packages/shared"
languageName: unknown
Expand All @@ -2701,7 +2701,7 @@ __metadata:
resolution: "@opetushallitus/kieli-ja-kaantajatutkinnot.vkt@workspace:packages/vkt"
dependencies:
reduxjs-toolkit-persist: "npm:^7.2.1"
shared: "npm:@opetushallitus/[email protected].11"
shared: "npm:@opetushallitus/[email protected].12"
languageName: unknown
linkType: soft

Expand Down

0 comments on commit 4b255c2

Please sign in to comment.