Skip to content

Fix email notification toggle UX and layout shifting#2668

Open
Tarfua wants to merge 2 commits intocinnyapp:devfrom
Tarfua:dev
Open

Fix email notification toggle UX and layout shifting#2668
Tarfua wants to merge 2 commits intocinnyapp:devfrom
Tarfua:dev

Conversation

@Tarfua
Copy link
Copy Markdown

@Tarfua Tarfua commented Feb 20, 2026

Summary

Fixed the Email Notification toggle by implementing optimistic UI and stabilizing the state to prevent layout shifting.

Problem

The setting tile flickered or disappeared during SDK data refreshes. There was a lack of immediate feedback when toggling the switch. Additionally, the append flag could lead to duplicate email pushers on the server.

Changes

The last valid server result is now cached using useRef and useMemo to ensure UI consistency during asynchronous updates. A local state provides an instant toggle response with a rollback mechanism in case of failure. Full-tile loading was replaced with a disabled state and a side-by-side Spinner for better UX. The append flag was removed from the setPusher call to ensure unique entries on the server.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 20, 2026

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

@Tarfua
Copy link
Copy Markdown
Author

Tarfua commented Feb 20, 2026

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

ajbura added a commit to cinnyapp/cla that referenced this pull request Feb 20, 2026
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.

1 participant