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

Investigate using the put.js saver instead of upload.js #148

Closed
simonbaird opened this issue Apr 23, 2021 · 5 comments
Closed

Investigate using the put.js saver instead of upload.js #148

simonbaird opened this issue Apr 23, 2021 · 5 comments
Assignees

Comments

@simonbaird
Copy link
Collaborator

Suggested at TiddlyWiki/TiddlyWiki5#5622 (comment) .

@simonbaird
Copy link
Collaborator Author

@simonbaird simonbaird added the priority-high Higher priority label Apr 24, 2021
@simonbaird simonbaird self-assigned this Apr 24, 2021
simonbaird added a commit that referenced this issue Apr 25, 2021
- Add a bogus WebDAV header for TiddlyWiki's put saver
- Add a controller method for the "put" saves

The saving works fine, but I think the error message handling needs
some work before it's a viable option for saving.

For example, the upload saver will display a useful message when the
user is not logged in. With the put saver they'll just see:
"XMLHttpRequest error code: 403".

Maybe the put saver can be updated so there's some way to pass on a
message to the user, or maybe there's already a way to do it that I
didn't figure out yet.

Issue: #148
@simonbaird
Copy link
Collaborator Author

As per the commit message, saving works fine, but there's maybe some work needed on the error handling.

@simonbaird
Copy link
Collaborator Author

The link TW patch is intended to improve the error handling a little.

@simonbaird
Copy link
Collaborator Author

simonbaird commented Apr 26, 2021

So I think it works fine, and long term I'd like to adopt it. In the short term though it's a small step backwards in usability due to the error handling. The PR linked above is an improvement, but I'd like to figure out a way to show a more user friendly error message on failure, which is something that the upload.js does now. Perhaps the solution will to create a dedicated saver, i.e. as suggested in #20, but the saver might end up being exactly the same code as the put saver, but with some Tiddlyhost specific error handling.

@simonbaird simonbaird removed the priority-high Higher priority label Apr 29, 2021
@simonbaird
Copy link
Collaborator Author

Investigation is done so let's close this. Will continue using the upload saver for now, but maybe a future tiddlyhost saver will be based on the put saver.

simonbaird added a commit that referenced this issue Apr 4, 2022
The upload.js saver is old and clunky so it would be nice to switch
over to the put.js saver.

- Add a bogus WebDAV header for TiddlyWiki's put saver
- Add a controller method for the "put" saves and related routes
- Make it a configurable option for now, but still thinking about
  how to roll it out to prod, (hence the WIP).

There's a related PR for TiddlyWiki that would improve the UX by
showing the error explanations to the user.

Issue: #148
simonbaird added a commit that referenced this issue Apr 4, 2022
The upload.js saver is old and clunky so it would be nice to switch
over to the put.js saver.

- Add a bogus WebDAV header for TiddlyWiki's put saver
- Add a controller method for the "put" saves and related routes
- Make it a configurable option for now, but still thinking about
  how to roll it out to prod, (hence the WIP).
- Add ETag header

There's a related PR for TiddlyWiki that would improve the UX by
showing the error explanations to the user.

Issue: #148
simonbaird added a commit that referenced this issue Apr 4, 2022
The upload.js saver is old and clunky so it would be nice to switch
over to the put.js saver.

- Add a bogus WebDAV header for TiddlyWiki's put saver
- Add a controller method for the "put" saves and related routes
- Make it a configurable option for now, but still thinking about
  how to roll it out to prod, (hence the WIP).
- Add ETag header and check it when doing a put save

There's a related PR for TiddlyWiki that would improve the UX by
showing the error explanations to the user.

Issue: #148
simonbaird added a commit that referenced this issue Apr 4, 2022
TiddlyWiki's upload.js saver is old and deprecated so let's see if
we can switch to using the put saver.

Includes:
- A bogus WebDAV header to convince TiddlyWiki that the put
  saver is usable
- A new controller method and route for the "put" saves
- Clear the url from $:/UploadURL when serving a site to make
  sure TW doesn't try to use the upload saver

There's a related PR for TiddlyWiki that exposes the error messages
to the user, see TiddlyWiki/TiddlyWiki5#6589

Issue: #148
simonbaird added a commit that referenced this issue Apr 4, 2022
TiddlyWiki's upload.js saver is old and deprecated so let's see if
we can switch to using the put saver.

Includes:
- A bogus WebDAV header to convince TiddlyWiki that the put
  saver is usable
- A new controller method and route for the "put" saves
- Clear the url from $:/UploadURL when serving a site to make
  sure TW doesn't try to use the upload saver

There's a related PR for TiddlyWiki that exposes the error messages
to the user, see TiddlyWiki/TiddlyWiki5#6589

Issue: #148
simonbaird added a commit that referenced this issue Apr 5, 2022
TiddlyWiki's upload.js saver is old and deprecated so let's see if
we can switch to using the put saver.

Includes:
- A bogus WebDAV header to convince TiddlyWiki that the put
  saver is usable
- A new controller method and route for the "put" saves
- Clear the url from $:/UploadURL when serving a site to make
  sure TW doesn't try to use the upload saver

There's a related PR for TiddlyWiki that exposes the error messages
to the user, see TiddlyWiki/TiddlyWiki5#6589

Issue: #148
simonbaird added a commit that referenced this issue Apr 5, 2022
TiddlyWiki's upload.js saver is old and deprecated so let's see if
we can switch to using the put saver.

Includes:
- A bogus WebDAV header to convince TiddlyWiki that the put
  saver is usable
- A new controller method and route for the "put" saves
- Clear the url from $:/UploadURL when serving a site to make
  sure TW doesn't try to use the upload saver

There's a related PR for TiddlyWiki that exposes the error messages
to the user, see TiddlyWiki/TiddlyWiki5#6589

Issue: #148
simonbaird added a commit that referenced this issue Apr 6, 2022
TiddlyWiki's upload.js saver is old and deprecated so let's see if
we can switch to using the put saver.

Includes:
- A bogus WebDAV header to convince TiddlyWiki that the put
  saver is usable
- A new controller method and route for the "put" saves
- Clear the url from $:/UploadURL when serving a site to make
  sure TW doesn't try to use the upload saver

There's a related PR for TiddlyWiki that exposes the error messages
to the user, see TiddlyWiki/TiddlyWiki5#6589

Issue: #148
simonbaird added a commit that referenced this issue Apr 6, 2022
TiddlyWiki's upload.js saver is old and deprecated so let's see if
we can switch to using the put saver.

Includes:
- A bogus WebDAV header to convince TiddlyWiki that the put
  saver is usable
- A new controller method and route for the "put" saves
- Clear the url from $:/UploadURL when serving a site to make
  sure TW doesn't try to use the upload saver

There's a related PR for TiddlyWiki that exposes the error messages
to the user, see TiddlyWiki/TiddlyWiki5#6589

Issue: #148
simonbaird added a commit that referenced this issue Apr 7, 2022
TiddlyWiki's upload.js saver is old and deprecated so let's see if
we can switch to using the put saver.

Includes:
- A bogus WebDAV header to convince TiddlyWiki that the put
  saver is usable
- A new controller method and route for the "put" saves
- Clear the url from $:/UploadURL when serving a site to make
  sure TW doesn't try to use the upload saver

There's a related PR for TiddlyWiki that exposes the error messages
to the user, see TiddlyWiki/TiddlyWiki5#6589

Issue: #148
simonbaird added a commit that referenced this issue Apr 10, 2022
TiddlyWiki's upload.js saver is old and deprecated so let's see if
we can switch to using the put saver.

Includes:
- A bogus WebDAV header to convince TiddlyWiki that the put
  saver is usable
- A new controller method and route for the "put" saves
- Clear the url from $:/UploadURL when serving a site to make
  sure TW doesn't try to use the upload saver

There's a related PR for TiddlyWiki that exposes the error messages
to the user, see TiddlyWiki/TiddlyWiki5#6589

Issue: #148
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

No branches or pull requests

1 participant