Skip to content

feat/203 more sorting options#236

Draft
Qufel wants to merge 9 commits intodevfrom
203-more-sorting-options
Draft

feat/203 more sorting options#236
Qufel wants to merge 9 commits intodevfrom
203-more-sorting-options

Conversation

@Qufel
Copy link
Copy Markdown
Member

@Qufel Qufel commented Apr 4, 2026

Podsumowanie

Dodano nowe opcje sortowania quizów, pozwalające na sortowanie po dacie utworzenia i ostatniego użycia


Co dodano

Dodano trzy nowe opcje sortowania

Nazwa Co robi
Najnowsze Sortuje quizy od najnowszego utworzonego
Najstarsze Sortuje quizy od najstarszego utworzonego
Ostatnio używane Sortuje quizy w kolejności od ostatnio używanego, quizy nigdy nie używane (pole last_used_at ma wartość null) będą na końcu

Zmieniono nazwę sortowania alfabetycznego, sugerujący kierunek sortowania

Przed Po
A - Z A → Z
Z - A Z → A

Dodano do intefejsu QuizMetadata trzy nowe pola

  created_at: string;
  updated_at: string;
  last_used_at: string;

Dodano do migracji quizów odpowiednie pole

  created_at: new Date().toISOString(),
  updated_at: new Date().toISOString(),
  last_used_at: "",

CLOSES #203

@Qufel Qufel self-assigned this Apr 4, 2026
@Qufel Qufel requested a review from olios123 as a code owner April 4, 2026 09:50
@Qufel Qufel linked an issue Apr 4, 2026 that may be closed by this pull request
@solvro-coolify
Copy link
Copy Markdown

solvro-coolify bot commented Apr 4, 2026

The preview deployment for frontend-testownik-dev is ready. 🟢

Open Preview | Open Build Logs | Open Application Logs

Last updated at: 2026-04-13 10:07:36 CET

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Dodaje nowe opcje sortowania listy quizów (data utworzenia oraz ostatnie użycie) i rozszerza metadane quizu o pola czasowe, aby te sortowania były możliwe w UI.

Changes:

  • Rozszerzenie QuizMetadata o created_at, updated_at, last_used_at.
  • Uzupełnienie migracji legacy quizów o nowe pola dat.
  • Dodanie nowych opcji sortowania w komponencie QuizSort oraz zmiana etykiet sortowania alfabetycznego.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
src/types/quiz.ts Dodaje pola czasowe do QuizMetadata, aby UI mogło sortować po dacie.
src/lib/migration.ts Ustawia wartości domyślne nowych pól w migracji legacy quizów.
src/components/quiz/quiz-sort.tsx Dodaje opcje sortowania po created_at i last_used_at, oraz aktualizuje labelki A→Z/Z→A.
src/components/quiz/helpers/quiz-validation.ts Rozszerza whitelistę dozwolonych kluczy quizu o nowe pola dat.

Comment thread src/types/quiz.ts Outdated
Comment thread src/lib/migration.ts Outdated
Comment thread src/components/quiz/quiz-sort.tsx
Comment thread src/components/quiz/quiz-sort.tsx
@olios123
Copy link
Copy Markdown
Member

olios123 commented Apr 4, 2026

Hej, hej. Przejrzyj sobie copilota i podepnij PR pod taska. Niestety ale musimy chwilę poczekać z mergowaniem aby skończyć najpierw #214 bo będzie za dużo konfliktów. Zostaw w review a ja ogarnę po wszystkim

@olios123 olios123 marked this pull request as draft April 8, 2026 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TASK] Więcej opcji sortowania quizów

3 participants