Skip to content

#225 Edytor Markdown'a - #278

Open
Qufel wants to merge 28 commits into
devfrom
feat/225-markdown-latex
Open

#225 Edytor Markdown'a#278
Qufel wants to merge 28 commits into
devfrom
feat/225-markdown-latex

Conversation

@Qufel

@Qufel Qufel commented Jun 11, 2026

Copy link
Copy Markdown
Member

Podsumowanie

Dodano edytor markdown wykorzystujący logikę istniejącego już edytora Overtype. Edytor jest dostosowany zarówno do PC jak i urządzeń mobilnych.
Poprawiono renderowanie pytań w quizie, ze względu na złe wyświetlanie markdownu w starej wersji.

Dodano

  • Edytor Markdown OverTypeEditor wraz z toolbarem
  • Customowego hooka useOverType inicjalizujący referencję do edytora
  • Poprawiono wyświetlanie nr pytania w question-card.tsx

Zmiana w wyświetlaniu pytania

Wyświetlanie pytań obecnie usuwało formatowanie z pierwszej linii tekstu, przez co tekst nie wyświetlał się poprawnie
image

Po wprowadzeniu zmian przeniosłem tekst "Pytanie" wraz z numerem pytania w celu poprawnego formatowania do osobnego elemntu, rozdzielając treść od numeracji.
image

Edytor

Domyślnie treść edytora wyświetlana jest w trybie podglądu
image

Po nacisnięciu przycisku "Edytuj" zmienia się on na "Podgląd" jeśli użytkownik chciałby zobaczyć jak wygląda wygenerowany markdown. W tej chwili możemy dowolnie edytować tekst oraz korzystać z przycisków na toolbarze
image

W mobilnym widoku toolbar zmienia się na dropdown zawierający wszystkie opcje.

CLOSES #225

@Qufel Qufel self-assigned this Jun 11, 2026
@Qufel
Qufel requested a review from olios123 as a code owner June 11, 2026 14:23
@Qufel Qufel linked an issue Jun 11, 2026 that may be closed by this pull request
@solvro-ci

solvro-ci Bot commented Jun 11, 2026

Copy link
Copy Markdown

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

Open Preview | Open Build Logs | Open Application Logs

Last updated at: 2026-07-13 12:17:43 CET

Comment thread src/components/overtype-editor.tsx Fixed

@Antoni-Czaplicki Antoni-Czaplicki left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Note

AI-generated review comment.

I reviewed the Markdown/LaTeX editor PR against current dev, including the editor integration, quiz display rendering, tests, build/typecheck/lint behavior, and mergeability.

Main blockers:

  • The PR is currently not mergeable. GitHub reports it as CONFLICTING; the conflict areas include pnpm-lock.yaml and src/components/ai/ai-explain-card.tsx.
  • pnpm lint fails locally with 18 @typescript-eslint/no-unsafe-* route typing errors after this PR's dependency/lockfile refresh. pnpm typecheck passes after pnpm next typegen, and the create-quiz page tests pass with a larger timeout, but lint needs to be clean before merge.
  • The OverType preview/value synchronization issue called out inline can make existing editor content render blank/stale.

Needed to merge: rebase/merge current dev and resolve conflicts, fix the lint regression or narrow the lockfile/tooling bump, fix the OverType controlled-value/initial-preview behavior, and add a targeted regression test for existing quiz text or parent-driven value updates in the editor.

Comment thread src/components/overtype-editor.tsx Outdated
Copilot AI review requested due to automatic review settings June 25, 2026 11:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@Qufel
Qufel requested a review from Antoni-Czaplicki June 25, 2026 12:01
@Antoni-Czaplicki
Antoni-Czaplicki force-pushed the dev branch 2 times, most recently from eaddd9b to f57961b Compare July 1, 2026 23:46
Copilot AI review requested due to automatic review settings July 13, 2026 11:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 18 out of 19 changed files in this pull request and generated 9 comments.

Comment on lines +178 to +181
if (isInMathBlock(ta)) {
formats.splice(formats.indexOf("inlineMath"), 1);
formats.push("blockMath");
}
Comment on lines +183 to +186
if (isInCodeBlock(ta)) {
formats.splice(formats.indexOf("code"), 1);
formats.push("blockCode");
}
Comment on lines +218 to +222
const styleId = "#ot-math-styles";
if (document.querySelector(styleId) === null) {
const style = document.createElement("style");
style.id = styleId;
style.textContent = `
Comment on lines +281 to +284
return () => {
observer.disconnect();
document.querySelector(styleId)?.remove();
};
Comment on lines +236 to +239
for (const child of node.childNodes) {
if (child.nodeType !== Node.TEXT_NODE) {
return;
}
Comment on lines +240 to +243
const text = child.textContent ?? "";
if (!text.includes("$")) {
return;
}
Comment thread src/components/overtype-editor.tsx Outdated
Comment thread src/components/overtype-editor.tsx Outdated
Comment thread .github/workflows/ci.yml
Copilot AI review requested due to automatic review settings July 13, 2026 12:14

@olios123 olios123 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Dzięki za PR,
przejrzyj sobie jeszcze komentarze od Copilota. Rozwiązałem problemy z lintem i parę drobnych poprawek.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 12 changed files in this pull request and generated 15 comments.

Comment thread src/hooks/use-overtype.ts
Comment on lines +1 to +4
// eslint-disable-next-line import/no-named-as-default
import OverType from "overtype";
import type { OverTypeInstance, Theme } from "overtype";
import { useEffect, useRef } from "react";
@@ -0,0 +1,953 @@
import {
Comment on lines +178 to +181
if (isInMathBlock(ta)) {
formats.splice(formats.indexOf("inlineMath"), 1);
formats.push("blockMath");
}
Comment on lines +183 to +186
if (isInCodeBlock(ta)) {
formats.splice(formats.indexOf("code"), 1);
formats.push("blockCode");
}
Comment on lines +218 to +221
const styleId = "#ot-math-styles";
if (document.querySelector(styleId) === null) {
const style = document.createElement("style");
style.id = styleId;
Comment thread .github/workflows/ci.yml
Comment thread package.json
Comment thread package.json
Comment thread package.json
Comment thread package.json
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.

[FEATURE] Formatowanie markdown i latex

5 participants