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

[Bug] error message when loading themes #5359

Open
yotamguttman opened this issue May 18, 2024 · 5 comments
Open

[Bug] error message when loading themes #5359

yotamguttman opened this issue May 18, 2024 · 5 comments
Labels
bug Something isn't working themes

Comments

@yotamguttman
Copy link

Bug Description

image
receiving different error messages when attempting to upload any theme file.

How to Reproduce

I downloaded all the official themes from the Themes Appflowy Docs Article. I tried to upload them all: base, barbie, and dracula. I kept receiving an error in return that the light theme file is faulty and the learn more button just sends me back to the same docs page...

Expected Behavior

the theme file should have been added to the theme list and applied to the app UI.

Operating System

Fedora 40, Gnome 46

AppFlowy Version(s)

unknown

Screenshots

No response

Additional Context

also, when you download a theme file from the Appflowy docs page, you get a zip file which when extracted, has an odd structure. check this image:
image

there's the zipping folder which inside has a folder of the same name and some mac crap folder. and this can be confusing to some users because the docs article steps describe having to unzip the archived file and uploading the extracted folder to the Appflowy theme UI. but if you do that you get the following error message:
image

because Appflowy expects to see the light+dark json files right in side this folder, but instead there's a duplication of the same folder and some empty mac folder. I figured that I should pick the folder inside which housed the Json files but it isn't at all reproducible according to the docs article.
https://docs.appflowy.io/docs/appflowy/product/themes


and the cherry on top is that the 'debug info' button does not do anything. so I cannot share the version details because it doesn't show in the settings page either. I updated all my apps 2 days ago so I suppose it's the latest vers.
Screenshot from 2024-05-18 11-02-31

@Xazin
Copy link
Collaborator

Xazin commented May 18, 2024

I believe there are a lot of improvements to the theme upload handler that can be done.

This is one of many, but at least:

  • A theme should not require dark/light mode versions, it should be optional.
  • Concise error messages, if eg. a variable is missing, it should warn the user but still succeed in importing (the missing color should be it's default variant, instead of failing completely)

@Xazin Xazin added bug Something isn't working themes labels May 18, 2024
@yotamguttman
Copy link
Author

yotamguttman commented May 18, 2024

let me just emphasis again that the only theme files I've tried to import are from the official doc article. I'd find it hard to believe the theme files were faulty. I did run a quick test and copied the content of the dark json to the light json (I tried it on the 'base' theme) and I still received the same error regarding the light theme... even though it had the exact same content as the 'dark'...

also, while I see why it's good practice to create both light and dark configs when you author a theme, I'd agree with you that it should be optional.

@MayurSMahajan
Copy link
Collaborator

Hey @yotamguttman, the error message is because there is a new color field called secondaryTextColor added to the FlowyColorScheme but the themes in the documentation do not have any color for that field.

I am going to add a new zip adding this new color field. Thanks for filing this issue.

@MayurSMahajan
Copy link
Collaborator

I have updated the official docs, but the official docs will take some time to reflect those changes, till then you can download this zip file here:
Dracula.flowy_plugin.zip

@MayurSMahajan
Copy link
Collaborator

While we are here, I think the error UI can be improved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working themes
Projects
None yet
Development

No branches or pull requests

3 participants