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

Added error box to afterSaveLilypondPDF Method in SaveInterface.js #4258

Closed
wants to merge 1 commit into from

Conversation

raghavvvgaba
Copy link

@raghavvvgaba raghavvvgaba commented Jan 11, 2025

Resolved issue #4257 by adding an error box message to notify users in case of an error during the post-processing steps for saving a Lilypond file in PDF format.
This update solves a todo which improves user experience by providing clear feedback when something goes wrong. Please review the changes and provide feedback if necessary.

@walterbender
Copy link
Member

Do we know that trying again will work?

The error message needs to be inside _() for translation.

@FirePheonix
Copy link
Contributor

@walterbender
I've been working on getting the SaveLilypondPDF afterSaveLilypondPDF method to work.
There was no actual feature on the website to call the Save Lily Pond as PDF function, so I created it.

I have got the error handling and simulating the error box to work.

Music.Blocks.-.Google.Chrome.2025-01-17.01-30-09.mp4

while debugging the file to invoke an error, I rather realized that there is ERROR IN CONVERSION from server side itself.

Music.Blocks.-.Google.Chrome.2025-01-17.01-32-41.1.mp4

In this code, in ServerInterface.js, I was wondering if the server still works and the API-KEYs are correctly put inside the code.

constructor(Planet) {
this.ServerURL = "https://musicblocks.sugarlabs.org/planet-server/index.php";
this.ConnectionFailureData = {"success": false, "error": "ERROR_CONNECTION_FAILURE"};
this.APIKey = "3f2d3a4c-c7a4-4c3c-892e-ac43784f7381" ;
}

● ServerInterface js - musicblocks - Visual Studio Code 17-01-2025 01_37_54

Let me know if you need just the error box, or maybe I can get this feature to work after the server is repaired.

I'll create a pull request according to that.

@walterbender
Copy link
Member

I am a bit confused here. What version of MB are you running?

I don't see the PDF option.

Screenshot From 2025-01-18 08-08-56

@FirePheonix
Copy link
Contributor

@walterbender

This pull request will answer all your queries sir. I've explained in detail, please check it out.

This pull request has everything related to how to stimulate the error box, ALONG WITH how to get the save as PDF button. And more information on it.

#4288

@pikurasa
Copy link
Collaborator

I don't see the PDF option.

I think the person is un-commenting out some code and then testing.

@raghavvvgaba The thing is that PDF generation is only possible if we have Lilypond on the server.

@pikurasa
Copy link
Collaborator

I'm closing this for now.

Before we would ever get errors for this, we first need to get Lilypond running on our servers.

@pikurasa pikurasa closed this Jan 21, 2025
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.

4 participants