KTL-3906 Tech Debt resolution: move PDF, Grammar and redirects generator from Python#5324
Merged
KTL-3906 Tech Debt resolution: move PDF, Grammar and redirects generator from Python#5324
Conversation
… dynamic import # Conflicts: # package.json
- Introduced a new `Grammar` page with server-side XML parsing using `fast-xml-parser`. - Added reusable grammar components and styles under `blocks/grammar`. - Migrated markdown handling to `markdown-to-jsx` for enhanced React compatibility. - Updated `package.json` and `yarn.lock` with `fast-xml-parser` and `markdown-to-jsx` dependencies.
- Add `GrammarMarkdown` component for handling custom Markdown syntax.
- Introduce `extendedMarkdown` function to parse Markdown with inline attributes like `{:...}` syntax.
- Update grammar components to use `GrammarMarkdown` for consistent Markdown rendering.
- Refactor CSS for grammar components to support updated styles and improve readability.
- Enhance Markdown rendering with custom styling and relative URL rebasing. - Add `DEFAULT_OPTIONS` for `GrammarMarkdown` to support advanced element customization. - Refactor grammar token components to better handle nested structures with React keys. - Update styling with `JetBrains Mono` font and improve table layout rendering. - Integrate `ThemeProvider` in `GrammarPage` for consistent theming. - Adjust page layout with new top menu configuration. chore(config): update `next.config.js` for improved readability and formatting adjustments
- Implement `useEffect` to add an event listener for `hashchange` for smooth scrolling updates. - Ensure compatibility by handling element scrolling with appropriate offset adjustments. - Add cleanup to remove the event listener when the component unmounts.
…sing - Add support for rebasing grammar documentation links with legacy URL handling. - Enhance `GrammarMarkdown` component for better parsing and rendering of extended Markdown syntax (`IAL` attributes). - Introduce JSDoc comments to improve code readability and maintainability.
…ldJsAssets - Remove `BuildKotlinGrammar` dependency from `DockerImageBuilder`. - Add `BuildKotlinGrammar` dependency to `BuildJsAssets` with proper snapshot and artifact rules.
- Delete legacy `src/grammar.py` and its associated methods. - Remove `/docs/reference/grammar.html` route and related references from `kotlin-website.py`.
- Add `data-testid` attributes for improved testability across grammar components. - Introduce Playwright E2E tests for grammar page, ensuring key functionalities like hash navigation, content visibility, and URL behavior. - Implement grammar-specific utility classes and page objects for streamlined testing.
- Update `education_page`, `why_teach_page`, and `education_courses` routes to include `headerCurrentUrl` in their render context.
- Add a warning message when the grammar page is accessed in development mode without the required file. - Return an empty data set instead of throwing an error in development mode for better DX.
d189136 to
2719923
Compare
zoobestik
approved these changes
Jan 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://youtrack.jetbrains.com/issue/KTL-3906/Tech-Debt-resolution-farewell-Python