8000 Adding support of exporting/importing menus by yar2000T · Pull Request #973 · kando-menu/kando · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Adding support of exporting/importing menus #973

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

Open
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

yar2000T
Copy link
Contributor
@yar2000T yar2000T commented May 30, 2025

Features to be added:

  • Add structure checks (if error, show this error in error window and cancel menu import)
  • Add metadata fields (supported versions, etc.)
  • Confirmation/warning/error windows
  • Check if icon theme is present in the icon themes folder (if not, give a warning)

@yar2000T yar2000T marked this pull request as draft May 30, 2025 18:16
@Schneegans
Copy link
Contributor

Thanks for the initiative! However, as written on Discord, there are a few things to consider here.

  • Why do you want to put this into a zip? I think a JSON file is much more trustworthy. In a zip can be anything.
  • Most of the time, people will want to export or import single menus. How would you do this?,
  • What happens to my menus when I import something new? Are they overridden?

I think we actually want to support exporting and importing individual menus.

@yar2000T
Copy link
Contributor Author
yar2000T commented May 30, 2025

Yes, I will add export buttons for menus, and of course, I will make it use json instead of zip

@yar2000T
Copy link
Contributor Author
yar2000T commented Jun 1, 2025

On KDE Wayland, opening files doesn't work.

@yar2000T
Copy link
Contributor Author
yar2000T commented Jun 1, 2025

I think we could add some confirmation boxes because you can entirely delete your menus if the JSON is corrupted or if there are no menus (Its optional)

src/main/app.ts Outdated
Comment on lines 1245 to 1247
if (!Array.isArray(parsed.menus)) {
throw new Error('Invalid JSON format: expected { menus: [...] }');
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be beneficial to have a more comprehensive validator for verifying properties in the menu item.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I'm already working on it

@yar2000T
Copy link
Contributor Author
yar2000T commented Jun 4, 2025

Okay, so I will add structure checks and metadata fields to check that the menu is compatible with previous versions. Also, I will show warnings if the structure is correct, but the version is newer than entered in the metadata field

@yar2000T
Copy link
Contributor Author
yar2000T commented Jun 4, 2025

Also, we need to check if the required icon theme is present. If not show warning window

@yar2000T yar2000T requested a review from LitoMore June 5, 2025 14:09
@yar2000T yar2000T marked this pull request as ready for review June 17, 2025 07:29
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.

3 participants
0