Git Product home page Git Product logo

Comments (12)

dbhagesh avatar dbhagesh commented on May 14, 2024 1

Yes, its finally working 😃
Thank you for your help.
I am closing the issue now.

from jupyter-ui.

dbhagesh avatar dbhagesh commented on May 14, 2024

image

We can use this API, to update the file with the new content.

from jupyter-ui.

echarles avatar echarles commented on May 14, 2024

@dbhagesh This is implemented in 7084229 Save commands were already available and just needed to be triggered. Those commands post indeed to the jupyter server API you have referenced. Thx!

from jupyter-ui.

dbhagesh avatar dbhagesh commented on May 14, 2024

I checked the commit you mentioned above.
But the latest repository doesn't contain the "saveEpic" which is present in the commit you mentioned above.
And while testing the latest repository I found that save button is not functioning.
Can you include the relevant functions in the latest commit so that the save function will be back in the latest v0.0.11.
Please specify if I am missing anything.
Thankyou

from jupyter-ui.

echarles avatar echarles commented on May 14, 2024

The saveEpic is present in latest main branch https://github.com/datalayer/jupyter-react/blob/f7a5de96604598a975dc3b3c407751e9c0ef3216/packages/react/src/components/notebook/NotebookState.ts#L279-L295

I have pushed more fixes to ensure the jupyter server answer is not cached. Could you pull the latest commits and try again. Thank you very much for trying out, this is very helpful. Nothing is shown for now when you click on the Save button in the example, but you can check that the HTTP request in the devtools is successful. If you refresh your browser, you can also check that the change is saved.

I reopen this issue.

from jupyter-ui.

dbhagesh avatar dbhagesh commented on May 14, 2024

Yes, its working for local environment containing the v0.0.14 (LATEST ON GITHUB).
But the remote dependency i.e v0.0.13 still lacks the save feature. No, API call is made for save button in this version.
It will be better if you could host the latest version so that the changes are available remotely.

Thankyou for the help.

from jupyter-ui.

echarles avatar echarles commented on May 14, 2024

I can cut a new release, but 0.0.13 should contain the fix. I will cut anyway a new release tomorrow. Thx for the very useful feedback so far and glad that you find jupyter-react usable and useful.

from jupyter-ui.

dbhagesh avatar dbhagesh commented on May 14, 2024

Yes, you are correct. This isn't the version problem which I am facing.
Actually, I have separated the "create-react-app" and "Jupyter-react".
And I am starting the "Jupyter-react" server from the main application. And just starting the react part of the "create-react-app".
Doing so, the "jupyter-react" server is not started from the create-react-app/dev section. Instead it is started from the main application.
Under the above scenario, everything is working fine except save button. No API call is made in this situation.
You may test in the above situation.
Suggestion, separate the "Create-react-app" from "jupyter-react" server. And let the "jupyter-react" server and frontend be independent.
Thankyou for your help again.

from jupyter-ui.

echarles avatar echarles commented on May 14, 2024

@dbhagesh I have tested the scenario you describe (start the server from the top, and start the create-react-app from the subfolder) and it works fine.

I have pushed an update to the create-app example to add a notebook with a toolbar with the save button. It is working on my env (the changes to the notebook are saved).

from jupyter-ui.

dbhagesh avatar dbhagesh commented on May 14, 2024

@echarles Yes, its working fine that way. But if you move the create-react-app folder outside the main application, then the save part doesn't work.

from jupyter-ui.

echarles avatar echarles commented on May 14, 2024

@dbhagesh I have tested in the scenario you describe (moving create-react-app example in a folder outside of the repo, yarn install that folder, start the server from the repo, start the react-app from the folder) and indeed the save was not working with [email protected]. This is because the current example provides a parameter (a date) and in the 0.0.13 version, you had to give undefined for the save to be effective. I have change to the following code, and it is saving fine with 0.0.13.

          <Button
            variant="default"
            size="small"
            onClick={() => dispatch(notebookActions.save.started(undefined))}
            >
              Save the notebook
          </Button>

from jupyter-ui.

echarles avatar echarles commented on May 14, 2024

0.0.14 is now published and saves whatever (date or undefined) you pass to the save.started(...) function.

I hope this will work for you.

from jupyter-ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.