Skip to content

feat: Convert diff page from Jinja2 template to React component#883

Open
Marvinrose wants to merge 3 commits intofedora-infra:swatantryafrom
Marvinrose:feat/diff-page-react-component
Open

feat: Convert diff page from Jinja2 template to React component#883
Marvinrose wants to merge 3 commits intofedora-infra:swatantryafrom
Marvinrose:feat/diff-page-react-component

Conversation

@Marvinrose
Copy link
Copy Markdown

@Marvinrose Marvinrose commented Mar 29, 2026

Closes #882

Changes

  • Added /json/diff/<id_a>/<id_b> API endpoint in tahrir/views/user.py to expose badge diff data between two users
  • Created frontend/src/routes/diff.jsx React component following the project's established patterns (direct fetch, two-column layout, vibe theming)
  • Registered /diff/:id_a/:id_b route in frontend/src/main.jsx

Approach

Following the pattern established in addendum.jsx, the component uses direct fetch() with useState/useEffect rather than Redux RTK Query, keeping the implementation simple and consistent with the codebase style.

The two-column layout matches existing routes — left sidebar shows user links and navigation, right main area shows the comparison summary and three-column badge breakdown.

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.

1 participant