Skip to content

Desktop: Fixes #11823: Fixed cancel behavior labels when switching config screens - #14677

Merged
laurent22 merged 1 commit into
laurent22:devfrom
Davideb18:fix/config-dialog-buttons
Mar 10, 2026
Merged

Desktop: Fixes #11823: Fixed cancel behavior labels when switching config screens#14677
laurent22 merged 1 commit into
laurent22:devfrom
Davideb18:fix/config-dialog-buttons

Conversation

@Davideb18

Copy link
Copy Markdown
Contributor

Problem

When a user has unsaved changes in the Configuration screen and tries to switch to another screen (like "Keyboard Shortcuts"), a confirmation dialog appears. Previously, the buttons were "OK" and "Cancel", which was highly misleading as discussed in issue #11823.

Solution

I replaced shim.showConfirmationDialog with shim.showMessageBox in ConfigScreen.tsx. This allows the use of custom button labels. The buttons are now explicitly labeled "Save changes" and "Discard changes", making the UI much clearer and resolving the confusion.

Test Plan

Manual verification steps:

  1. Open Joplin Desktop.
  2. Go to Settings/Configuration.
  3. Change any setting (e.g., toggle an option in Note History).
  4. Do not click "Apply" or "OK".
  5. Click on a different section (like "Keyboard Shortcuts") on the left menu.
  6. The dialog successfully appears with the new "Save changes" and "Discard changes" buttons.

Here is the screenshot of the new UI:

Registrazione.schermo.2026-03-10.alle.11.46.42.mov

@coderabbitai

coderabbitai Bot commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ca5d27dc-93f3-42b2-9616-d6071115682c

📥 Commits

Reviewing files that changed from the base of the PR and between 7214823 and 71b16ff.

📒 Files selected for processing (1)
  • packages/app-desktop/gui/ConfigScreen/ConfigScreen.tsx

📝 Walkthrough

Walkthrough

This change replaces a simple confirmation dialog with an explicit message box offering "Save changes" and "Discard changes" options in ConfigScreen. Logic is added to check the user's selection (answer === 0) before proceeding with saving settings.

Changes

Cohort / File(s) Summary
Confirmation Dialog Enhancement
packages/app-desktop/gui/ConfigScreen/ConfigScreen.tsx
Replaces basic confirmation dialogue with explicit message box offering two options. Adds handling of message box result with condition check for save action. Imports MessageBoxType from shim and configures it as Confirm type. Updates variable naming from ok to answer to reflect new dialogue result.

Suggested labels

bug, desktop

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: fixing button labels in the config screen confirmation dialog from misleading 'OK/Cancel' to explicit 'Save changes/Discard changes'.
Description check ✅ Passed The description is well-related to the changeset, clearly explaining the problem, solution, and including a manual test plan with screenshot evidence.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Pr Description Must Follow Guidelines ✅ Passed PR description includes problem statement (issue #11823), solution explanation (dialog replacement), and test plan with verification steps.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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 and usage tips.

@coderabbitai coderabbitai Bot added bug It's a bug desktop All desktop platforms labels Mar 10, 2026
@github-actions

github-actions Bot commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@Davideb18

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request Mar 10, 2026
@laurent22
laurent22 merged commit 714bbd6 into laurent22:dev Mar 10, 2026
12 of 13 checks passed
@laurent22

Copy link
Copy Markdown
Owner

Looks good, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug It's a bug desktop All desktop platforms

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants