Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make theme uploads more tolerant #5617

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

Xazin
Copy link
Collaborator

@Xazin Xazin commented Jun 24, 2024

If there are missing keys in the light or dark theme file, we simply replace them with default values.

This is not a good way of handling errors, but it's better than failing indiscriminately without any proper feedback.

I've added a getMissingKeys to compare and see which values are missing, and written some quick unit tests for it. We should find a way to use it so we can let users know if their theme has missing values.

Relates: #5359

PR Checklist

  • My code adheres to AppFlowy's Conventions
  • I've listed at least one issue that this PR fixes in the description above.
  • I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes.
  • All existing tests are passing.

@Xazin Xazin merged commit 271b250 into AppFlowy-IO:main Jun 25, 2024
13 checks passed
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