Conversation
Sigrid maintainability feedback✅ You wrote maintainable code and achieved your objective of 3.5 stars. Show detailsSigrid compared your code against the baseline of 2026-02-26. 👍 What went well?
👎 What could be better?
📚 Remaining technical debt
View this system in Sigrid to explore your technical debt ⭐️ Sigrid ratings
💬 Did you find this feedback helpful?We would like to know your thoughts to make Sigrid better. |
| const [errorAlert, setErrorAlert] = useState<string | null>(null); | ||
| const redirectToReportPage = location.hash === "#redirect-to-report"; | ||
| const sessionLabel = committeeSessionLabel(currentCommitteeSession.number, true).toLowerCase(); | ||
| const sessionLabel = committeeSessionLabel(election.role, currentCommitteeSession.number, true).toLowerCase(); |
There was a problem hiding this comment.
This results in a lower-case "CSB": "Details van zitting csb".
e7a0217 to
9f24a38
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2945 +/- ##
==========================================
- Coverage 91.89% 91.88% -0.01%
==========================================
Files 393 393
Lines 19040 19050 +10
Branches 2094 2102 +8
==========================================
+ Hits 17497 17505 +8
- Misses 1440 1442 +2
Partials 103 103 ☔ View full report in Codecov by Sentry. |
9f24a38 to
bb6a3ed
Compare
PDF Diff SummaryComparing against base branch:
|
| render(<CommitteeSessionStatusWithIcon status={state} userRole={role} />); | ||
| expect(screen.getByText(label)).toBeVisible(); | ||
| expect(screen.getByRole("img", { hidden: true })).toHaveAttribute("data-icon", icon); | ||
| electionRoleValues.forEach((electionRole) => { |
There was a problem hiding this comment.
This re-renders within the same DOM, i.e. the additional render is appended to the document body without clearing the previous render.
Use parameterised tests with test.each/test.for instead.
| {election.role === "GSB" && ( | ||
| <Table.Row key={election.id} to="polling-stations"> | ||
| <Table.HeaderCell scope="row" className="normal"> | ||
| {t("polling_station.title.plural")} | ||
| </Table.HeaderCell> | ||
| <Table.Cell className="underlined"> | ||
| {numberOfPollingStations}{" "} | ||
| {t(`polling_station.title.${numberOfPollingStations === 1 ? "singular" : "plural"}`).toLowerCase()} | ||
| </Table.Cell> | ||
| </Table.Row> | ||
| )} | ||
| {election.role === "GSB" && ( | ||
| <Table.Row> | ||
| <Table.HeaderCell scope="row" className="normal"> | ||
| {t("counting_method_type")} | ||
| </Table.HeaderCell> | ||
| <Table.Cell>{t(election.counting_method)}</Table.Cell> | ||
| </Table.Row> | ||
| )} |
There was a problem hiding this comment.
These can be merged into a single {election.role === "GSB" && (...)} block
Fixes #2933