Background
@govtechsg/sgds-react is already installed and partially used in this project (Button, Card, Alert, Badge, Form, Modal, ProgressBar are all imported). However, several components still use raw Bootstrap class strings on plain HTML elements instead of the idiomatic SGDS React equivalents.
Findings
<Button> — 5 occurrences in 3 files
Button is already imported and used (10 existing usages), but these raw instances remain:
| File |
Usage |
src/components/Upload/RecentJobsList.jsx |
<button className="btn btn-outline-secondary">, <button className="btn btn-outline-danger"> |
src/components/Common/ErrorBoundary.jsx |
<button className="btn btn-primary">, <button className="btn btn-outline-secondary"> |
src/components/ThemeSwitcher.jsx |
<button className="btn btn-sm btn-outline-secondary"> |
→ Replace with <Button variant="outline-secondary"> etc.
<Spinner> — 8 occurrences in 5 files
Spinner is not imported anywhere despite being available in SGDS:
| File |
Count |
src/components/Transcript/MeetingInfoSidebar.jsx |
1 |
src/components/Upload/RecentJobsList.jsx |
1 |
src/components/Upload/FileUploadCard.jsx |
1 |
src/components/Modals/EditSpeakersModal.jsx |
1 |
src/components/Processing/ProcessingView.jsx |
3 |
src/components/Common/LoadingScreen.jsx |
1 |
Raw: <div className="spinner-border spinner-border-sm" role="status">
→ Replace with: <Spinner animation="border" size="sm">
<Card.Footer> — 1 occurrence
| File |
Usage |
src/components/Upload/RecentJobsList.jsx |
<div className="card-footer text-muted small"> |
→ Replace with: <Card.Footer className="text-muted small">
Acceptance criteria
Notes
- Extra utility classes (e.g.
me-2, text-primary) pass through via the className prop on SGDS components
Spinner needs to be added to the import from @govtechsg/sgds-react in each affected file
- The
role="status" attribute is handled automatically by the SGDS Spinner component
Background
@govtechsg/sgds-reactis already installed and partially used in this project (Button,Card,Alert,Badge,Form,Modal,ProgressBarare all imported). However, several components still use raw Bootstrap class strings on plain HTML elements instead of the idiomatic SGDS React equivalents.Findings
<Button>— 5 occurrences in 3 filesButtonis already imported and used (10 existing usages), but these raw instances remain:src/components/Upload/RecentJobsList.jsx<button className="btn btn-outline-secondary">,<button className="btn btn-outline-danger">src/components/Common/ErrorBoundary.jsx<button className="btn btn-primary">,<button className="btn btn-outline-secondary">src/components/ThemeSwitcher.jsx<button className="btn btn-sm btn-outline-secondary">→ Replace with
<Button variant="outline-secondary">etc.<Spinner>— 8 occurrences in 5 filesSpinneris not imported anywhere despite being available in SGDS:src/components/Transcript/MeetingInfoSidebar.jsxsrc/components/Upload/RecentJobsList.jsxsrc/components/Upload/FileUploadCard.jsxsrc/components/Modals/EditSpeakersModal.jsxsrc/components/Processing/ProcessingView.jsxsrc/components/Common/LoadingScreen.jsxRaw:
<div className="spinner-border spinner-border-sm" role="status">→ Replace with:
<Spinner animation="border" size="sm"><Card.Footer>— 1 occurrencesrc/components/Upload/RecentJobsList.jsx<div className="card-footer text-muted small">→ Replace with:
<Card.Footer className="text-muted small">Acceptance criteria
<button className="btn"usages<div className="spinner-border"usages<div className="card-footer"usagesNotes
me-2,text-primary) pass through via theclassNameprop on SGDS componentsSpinnerneeds to be added to the import from@govtechsg/sgds-reactin each affected filerole="status"attribute is handled automatically by the SGDSSpinnercomponent