jeff-zucker / solid-file-client

A Javascript library for creating and managing files and folders in Solid data stores
MIT License
55 stars 18 forks source link

switch demo to new auth #219

Closed ewingson closed 2 years ago

ewingson commented 2 years ago

d2022-01-28 t18:59 @bourgeoa @jeff-zucker

the code is functional. I did adjustments. expect this as my first contribution of actual working code. what still needs to be done is an options menu for the pod provider.

jeff-zucker commented 2 years ago

Great work, @ewingson, here's your first merged PR!

bourgeoa commented 2 years ago

@ewingson great job. If you keep the Vite dependency you must document the purpose and how to use it. For the purpose of podProvider the simplest is just use a JavaScript prompt. Examples must be as simple as possible.

ewingson commented 2 years ago

@bourgeoa @jeff-zucker

a) I am afraid the vite dependency happened by mistake. first, I installed it during the development in a wrong folder, so that npm thought it would be needed. I am new to this.

b) I know what a prompt is, but I'm not sure I understand what you mean. would a javascript input field with a prefilled content (solidweb.me in that case) be sufficient or what do you suppose do do exactly in this example ?

bourgeoa commented 2 years ago

b) is perfect. I was too quick

ewingson commented 2 years ago

I am afraid I am not yet ready. I just went to https://jeff-zucker.github.io/solid-file-client/docs/examples/ and the Login gave me an Invalid Request. that must happen because of the local version being (treated) other than the live merged version. I suppose the following:

  1. maybe we delete the vite dependency, case it is not technical necessary
  2. I make a new fork and a new clone of the repo
  3. I install vite in the right directory (the dir of the app, in this case docs/examples/upload ) [edit] as we have seen now, it must be docs/examples
  4. I try to make it work locally
  5. what we have to do to make it work remote remains still unclear for me.
bourgeoa commented 2 years ago

I went to try the app and it is not working.

ewingson commented 2 years ago

this comes because docs/examples/ is the index of the app and copy/upload happens in different iframes. so work to be done. but before I fork and clone new, we should solve the dependency question

[edit] maybe we find a solution for the (upload/copy) menu without iframes

ewingson commented 2 years ago

@jeff-zucker @bourgeoa (comment on location: I misplaced this edit here https://github.com/jeff-zucker/solid-file-client/pull/218#issuecomment-1026451304 cause my repo doesn't have issues. I'm working through the stuff) could you please review https://github.com/ewingson/solid-file-client/tree/use_dpop_auth/docs/examples/advanced (both files)

several q's opened

  1. are the dependencies all needed ?
  2. are they in the right order ?
  3. is it correct to call the actual code at the very bottom (script call L214) ?
  4. session is used in index.html L171 and L198. does that matter ?
  5. another duplicate getDefaultSession() in index.html L171, L198 and copy.js L9 ?

statements I wanna trace the option buttons / checkboxes / ids / classes. I wanna use existing code wherever possible.

to really work it / control it ... I must understand it. what do you think ?

[edit] introduced a main function. things get clearer, slowly... [edit2] I have created advanced/index.html and advanced/copy.js and need to rewrite at least parts of it...

ewingson commented 2 years ago

status: upload working copy not working I have made copy verbose and am trying to follow the codeflow Bildschirmfoto_2022-02-06_13-24-30

ewingson commented 2 years ago

@bourgeoa @jeff-zucker @SharonStrats

I post a screenshot Bildschirmfoto_2022-02-07_16-09-42

ewingson commented 2 years ago

@bourgeoa @jeff-zucker @SharonStrats I think I can improve the error-handling still a bit. the HEAD errors will vanish when served live. but only thing that worries me, the formular expects correct paths and sometimes there aren't even .acl or .meta files so you need to use it in the correct way.

but functionaliy, yeah. gonna clean up. don't know though if I let it verbose, can you gimme a hint ? an average user has no console open.

jeff-zucker commented 2 years ago

I was wrong, the .acl errors you get are from solid-file-client you should trap them by putting a try/catch around the copy commands. Leaving the console logs is ok with me.