Skip to content

120 implement redesigned guides kisokosok page#157

Merged
peterlipt merged 10 commits into
mainfrom
120-implement-redesigned-guides-kisokosok-page
Jun 22, 2026
Merged

120 implement redesigned guides kisokosok page#157
peterlipt merged 10 commits into
mainfrom
120-implement-redesigned-guides-kisokosok-page

Conversation

@DankaMarci

@DankaMarci DankaMarci commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features

    • Permissions now support external links (forms, resources) and submission process information.
    • News articles display representative contact information in a dedicated section.
  • Improvements

    • Refined layouts across permissions, news, and representative pages for better information hierarchy.
    • Enhanced file handling with support for external links alongside file downloads/viewing.
    • Restructured language education content with improved paragraph organization.
    • Updated representative cards and modal with clearer presentation of faculty and contact details.
    • Improved loading states and empty state messaging across multiple pages.
  • Style

    • Updated background colors and spacing across pages for visual consistency.

- Updated RepresentativeCard component to enhance accessibility and visual design.
- Refactored RepresentativeModal to streamline layout and improve user experience.
- Modified RepresentativesGrid to accept title and description props for better context.
- Enhanced RepresentativesGridClient with a back button and improved loading states.
- Created a new helpers file for common representative functions and styles.
- Improved loading skeletons for representative cards and grid.
- Updated page structure in RepresentativesPage for better layout and responsiveness.
… table

- Created a new migration to add `representative_id` and `contact_email` columns to the `news` table.
- Added foreign key constraint for `representative_id` referencing the `representatives` table.
- Created an index on `representative_id` for improved query performance.
- Updated the payload types to include optional `representative` and `contactEmail` fields in the News interface.
…rnal link

- Created a new migration to add columns for submission process in Hungarian and English, and an external link to the permissions table.
- Updated the migrations index to include the new migration.
- Extended the Permission interface in payload-types.ts to include types for the new submission process fields and external link.
@DankaMarci DankaMarci requested a review from peterlipt June 19, 2026 17:12
@DankaMarci DankaMarci self-assigned this Jun 19, 2026
@DankaMarci DankaMarci linked an issue Jun 19, 2026 that may be closed by this pull request
5 tasks
@vercel

vercel Bot commented Jun 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ehk Ready Ready Preview, Comment Jun 22, 2026 7:16am

Request Review

@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

The PR extends the News and Permissions Payload collections with new fields (representative link, contactEmail, submissionProcess rich-text, externalLink), adds two DB migrations, and updates generated types. The shared FileCard component gains an open action and externalUrl/extensionLabel props. A new representatives.helpers.ts module centralises representative utility functions. Representative, news detail, regulations, permissions, decisions, help, and language education pages are visually redesigned to use article-based layouts, shared EmptyState, and UTC date formatting throughout.

Changes

Multi-page UI redesign + schema extensions

Layer / File(s) Summary
Data model extensions and DB migrations
src/collections/News.ts, src/collections/Permissions.ts, src/payload-types.ts, src/migrations/20260619_105937_add_news_representative_and_contact_email.ts, src/migrations/20260619_141957_add_permissions_submission_and_external_link.ts, src/migrations/index.ts
News gains optional representative FK and contactEmail; Permissions gains submissionProcess_hu/en rich text and externalLink. Two DB migrations add the matching columns, FK, and index. Payload-types are regenerated.
FileCard: open action, externalUrl, and extensionLabel
src/components/common/FileCard.tsx
FileCardProps gains externalUrl, extensionLabel, and actionType="open". getFileInfo derives URL/ext from externalUrl and honours extensionLabel. The render path adds a target="_blank" anchor for open actions.
representatives.helpers.ts: new shared utility module
src/app/(app)/[lang]/kepviselok/components/representatives.helpers.ts
Introduces facultyStyles, getPrimaryPosition, getPositionText, getRepresentativePicture, getRepresentativeInitials, getFileInfo, and formatFileSize as a centralised module.
RepresentativeCard and RepresentativeModal redesign
src/app/(app)/[lang]/kepviselok/components/RepresentativeCard.tsx, src/app/(app)/[lang]/kepviselok/components/RepresentativeModal.tsx
Card is rewritten as an accessible article with next/image/initials fallback, faculty span, helper-derived position, and ArrowRight details row. Modal is redesigned with mobile/desktop picture panels, single primary email, direct-anchor file listing replacing FileCard.
RepresentativesGrid, GridClient, skeletons, and page
src/app/(app)/[lang]/kepviselok/components/RepresentativesGrid.tsx, src/app/(app)/[lang]/kepviselok/components/RepresentativesGridClient.tsx, src/app/(app)/[lang]/kepviselok/components/skeletons/..., src/app/(app)/[lang]/kepviselok/page.tsx
RepresentativesGrid now requires title/description props forwarded from the page's dictionary. RepresentativesGridClient renders a back button, title/description header, and restyled grid/empty state. Loading skeletons updated to match.
News detail page redesign
src/app/(app)/[lang]/hirek/[slug]/components/NewsDetail.tsx, ...NewsDetailMain.tsx, ...NewsDetailSidebar.tsx, ...RelatedNewsClient.tsx, src/dictionaries/*/news.json
NewsDetail switches to flex+aside layout. NewsDetailMain replaces Card UI with article+UTC dates+FileCard attachments. NewsDetailSidebar renders contacts only (representative + contactEmail). RelatedNewsClient drops Card/tag-link routing. BackNav, ShareButton, FileIcon, NewsDetailClient, news-utils are removed. Dictionaries gain back/contacts keys.
Regulations, Permissions, Decisions list refactor
src/components/regulations/RegulationsListClient.tsx, src/components/regulations/skeletons/LoadingRegulationsGrid.tsx, src/app/(app)/[lang]/engedelyek/components/PermissionsListClient.tsx, src/app/(app)/[lang]/engedelyek/page.tsx, src/app/(app)/[lang]/hatarozatok-tara/components/DecisionsArchiveClient.tsx, src/app/(app)/[lang]/oktatasi-szabalyzatok/..., src/dictionaries/...
All three list clients switch to EmptyState + article rendering. PermissionsListClient adds submissionProcess rendering and FileCard branching for externalLink vs media. DecisionsArchiveClient adds useLanguage-driven title selection. LoadingRegulationsGrid is reworked to a purely visual skeleton. Related dictionaries and background colours updated.
Help, Language Education, and other pages
src/app/(app)/[lang]/kisokosok/..., src/app/(app)/[lang]/nyelvoktatas/..., src/dictionaries/*/language_education.json
HelpPageList adds EmptyState and article layout; new LoadingHelpPageGrid skeleton. LanguageEducationContent refactored to two-column layout with paragraphs array and dynamic link; language education page removes Suspense. Dictionaries restructured with subtitle/image_alt/paragraphs/link.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • kir-dev/ehk#150: Touches src/components/common/FileCard.tsx with actionType and extension handling changes that directly overlap with this PR's FileCard extension.
  • kir-dev/ehk#151: Contains the same representatives component redesign (RepresentativeCard, RepresentativeModal, RepresentativesGrid, RepresentativesGridClient, representatives.helpers.ts, and skeletons) as this PR.
  • kir-dev/ehk#155: Shares the same refactors in PermissionsListClient.tsx, engedelyek/page.tsx, FileCard.tsx, RegulationsListClient.tsx, and the Permissions schema/dictionary/migrations for submissionProcess_* and externalLink.

Suggested reviewers

  • peterlipt

🐰 New fields bloom in the schema's spring,
ExternalLink and representative bring!
Articles replace the cards of old,
EmptyState guards where nothing's scrolled.
UTC dates now mark each tale —
The rabbit hops a fresh design trail! 🌸

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 2.86% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the PR's primary objective: implementing a redesigned guides (kisokosok) page, which is evidenced by extensive changes to the help page components and related UI updates.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 120-implement-redesigned-guides-kisokosok-page

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@peterlipt peterlipt merged commit 4f0e1a6 into main Jun 22, 2026
2 of 3 checks passed
@peterlipt peterlipt deleted the 120-implement-redesigned-guides-kisokosok-page branch June 22, 2026 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Redesigned Guides (Kisokosok) Page

2 participants