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
Add option to import theme from zip file #943
Comments
@andreicristianpetcu Is this something that you'd be interested in working on? Fixing this would allow FirefoxColor to more easily import themes with images inside. |
Sorry but I cannot. I'll focus my free time on about:logins. |
I would like to do work on this issue |
To resolve this bug, the following needs to be implemented:
See the README to get started, by setting up a local development environment. |
when I am trying to do npm ci then my system consumes a lot of time |
|
ok thanks |
visual studio is mandatory for local installation? @Rob--W |
I am getting this error while installing dependencies 😥😓 |
I have updated the node-sass dependency, because its README claimed that Node 14+ is only supported as of node-sass version 4.14+. Could you retry? |
yeah yeah why not sir |
Another error while installing dependencies (ELIFECYCLE) @Rob--W |
Alternatively, you could try to simply run |
okay |
@Rob--W it is now working |
please review #947 |
how to convert manifest to theme object @Rob--W, I am new to this |
Change the format of the colors to be {r: 1, g: 2, b: 4 } and remove unused properties. Here is the same theme in manifest.json and theme object. Hope this helps. I'm no expert 😄 |
Make sure you don't remote manifest fields that are used in theme objects https://github.com/mozilla/FirefoxColor/tree/master/src/preset-themes |
@andreicristianpetcu 's example above (#943 (comment)) looks good. A more precise definition of the format is available in the form of JSON schemas. I linked to the schema for the Theme object in #943 (comment) . |
@andreicristianpetcu @Rob--W ok please give me some time to understand the things |
https://stackoverflow.com/questions/32267930/get-name-of-files-of-zip-file-in-javascript |
@Rob--W Please take a look! |
This project has an existing library for working with zip files. For example, this logic in src/web/lib/export.js is responsible for exporting the theme as a zip file. To read from a zip file, read the documentation of JSZip. PS. Please give me some time to respond. I don't always have time to respond immediately, a response time of within two business days is reasonable. |
sorry @Rob--W |
Is there any other platform for discussions with you ? @Rob--W |
Specific questions about this issue can be asked here. I'm also on https://chat.mozilla.org/ with the nick |
Actually it is difficult for me to understand how to work with zip files and for this issue I have created a new import.js file and imported JSZip and further steps are quite difficult, but I want to work and also want to solve this issue 😅😅 @Rob--W and sorry that I am disturbing you very much but as a beginner, it's my duty to learn new things 😅 |
I have made a logic to read all the files inside the zip but unable to do filter manifest.json file from the files, so how could I achieve this ? I want to read only manifest file which is present inside the zip and further I will be change it to theme object @Rob--W |
See #943 (comment), where I referred to documentation where this is explained. |
okay |
Is there any progress to this issue? There's no real reason to export the theme if you cannot import it in any way. |
The "Share" button only supports themes without images, but as soon as an image is included, it is no longer possible to share a linlk.
The next button, "Export", does offer the ability to export the theme, but once exported it cannot be imported in Firefox Color again.
Since we now support all theme properties (#940), it should be possible to offer an Import button that is an accurate representation of the theme.
There is one thing though: a zip file with the theme exension supports arbitrary image formats (including SVG), whereas dynamic themes only support PNG and JPG due to https://bugzilla.mozilla.org/show_bug.cgi?id=1491790 .
The text was updated successfully, but these errors were encountered: