Skip to content

feat: add CloseButton #1224

Merged
GhilesA merged 2 commits into
mainfrom
feat/minor_quota_change
Jul 16, 2026
Merged

feat: add CloseButton #1224
GhilesA merged 2 commits into
mainfrom
feat/minor_quota_change

Conversation

@GhilesA

@GhilesA GhilesA commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

PR Summary

Use new close button instead of cancel button for some dialogs

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b4fef1e1-ee68-47dc-96ae-4fe5b755bb75

📥 Commits

Reviewing files that changed from the base of the PR and between ee309e8 and 88539a1.

📒 Files selected for processing (10)
  • src/components/ui/reactHookForm/utils/CancelButton.tsx
  • src/components/ui/reactHookForm/utils/CloseButton.tsx
  • src/components/ui/reactHookForm/utils/index.ts
  • src/features/topBar/AboutDialog.tsx
  • src/features/topBar/UserInformationDialog.tsx
  • src/features/topBar/UserSettingsDialog.tsx
  • src/translations/en/commonButtonEn.ts
  • src/translations/en/topBarEn.ts
  • src/translations/fr/commonButtonFr.ts
  • src/translations/fr/topBarFr.ts
💤 Files with no reviewable changes (2)
  • src/translations/fr/topBarFr.ts
  • src/translations/en/topBarEn.ts
🚧 Files skipped from review as they are similar to previous changes (6)
  • src/translations/en/commonButtonEn.ts
  • src/translations/fr/commonButtonFr.ts
  • src/components/ui/reactHookForm/utils/CloseButton.tsx
  • src/features/topBar/UserInformationDialog.tsx
  • src/features/topBar/UserSettingsDialog.tsx
  • src/features/topBar/AboutDialog.tsx

📝 Walkthrough

Walkthrough

Adds a shared CloseButton component, reuses it in three top-bar dialogs, updates CancelButton prop handling, and centralizes English/French close translations.

Changes

CloseButton component and dialog integration

Layer / File(s) Summary
Shared button component and exports
src/components/ui/reactHookForm/utils/CloseButton.tsx, src/components/ui/reactHookForm/utils/CancelButton.tsx, src/components/ui/reactHookForm/utils/index.ts
Adds CloseButton with forwarded MUI props and a localized label, re-exports it, and removes useThemeProps handling from CancelButton.
Dialog close-control integration
src/features/topBar/AboutDialog.tsx, src/features/topBar/UserInformationDialog.tsx, src/features/topBar/UserSettingsDialog.tsx
Replaces existing MUI Button and CancelButton close controls with CloseButton while preserving their handlers and relevant props.
Common close translations
src/translations/en/commonButtonEn.ts, src/translations/fr/commonButtonFr.ts, src/translations/en/topBarEn.ts, src/translations/fr/topBarFr.ts
Adds shared English and French close labels and removes the dialog-specific close translation entries.

Sequence Diagram(s)

sequenceDiagram
  participant Dialog
  participant CloseButton
  participant FormattedMessage
  Dialog->>CloseButton: render with close handler and button props
  CloseButton->>FormattedMessage: request message with id close
  FormattedMessage-->>CloseButton: localized close label
  CloseButton-->>Dialog: render MUI Button
Loading

Suggested reviewers: klesaulnier, themaskedturtle, ayolab, antoinebhs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: adding a new CloseButton component.
Description check ✅ Passed The description is directly related and accurately summarizes replacing cancel buttons with a new close button in some dialogs.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@GhilesA GhilesA force-pushed the feat/minor_quota_change branch 4 times, most recently from 986b3e8 to ee309e8 Compare July 7, 2026 11:28
@GhilesA GhilesA added the waiting-for-review PR ready for an owner to review label Jul 7, 2026
@GhilesA GhilesA force-pushed the feat/minor_quota_change branch from ee309e8 to 3b59d97 Compare July 7, 2026 11:42
@flomillot flomillot self-assigned this Jul 8, 2026
@flomillot flomillot removed the waiting-for-review PR ready for an owner to review label Jul 8, 2026
Comment thread src/components/ui/reactHookForm/utils/CloseButton.tsx Outdated
@GhilesA GhilesA force-pushed the feat/minor_quota_change branch from 3b59d97 to 6b7407e Compare July 15, 2026 15:12
@GhilesA GhilesA added the waiting-for-review PR ready for an owner to review label Jul 15, 2026
@GhilesA GhilesA requested a review from flomillot July 16, 2026 08:48
@TheMaskedTurtle TheMaskedTurtle removed the waiting-for-review PR ready for an owner to review label Jul 16, 2026
@sonarqubecloud

Copy link
Copy Markdown

@GhilesA GhilesA merged commit 5a5ab4c into main Jul 16, 2026
10 of 14 checks passed
@GhilesA GhilesA deleted the feat/minor_quota_change branch July 16, 2026 12:01
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.

3 participants