Skip to content

chore: replace raw Bootstrap class strings with SGDS components #192

Description

@NotYuSheng

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

  • No remaining <button className="btn" usages
  • No remaining <div className="spinner-border" usages
  • No remaining <div className="card-footer" usages
  • Visual regression check across affected pages
  • App builds cleanly after changes

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementTechnical improvements, infra, refactoring

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions