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

Titan deletion dialog #717

Open
byte-diver opened this issue Feb 5, 2025 · 2 comments
Open

Titan deletion dialog #717

byte-diver opened this issue Feb 5, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@byte-diver
Copy link

byte-diver commented Feb 5, 2025

More of a discussion really.

titan:// spec says:
gemini://transjovian.org/titan/page/The%20Titan%20Specification

Deletion

When the client wants to delete a resource, it uses the Titan protocol to send zero bytes of content (size=0).

So while making some stuff with file-managing functionality I assumed that if we have a file at "domain.org/file" and write or generated a link to it like that:

=> titan://domain.org/file;size=0; delete

^ this would mean "press here to delete". But instead Lagrange opens file upload dialog. If I don't do anything with it and just press "upload", it works and the file is deleted. But should it make the dialog in the first place, as the intention to delete the file is clear here?

@skyjake
Copy link
Owner

skyjake commented Feb 5, 2025

The Titan specification talks there about the request that the client sends to the server. How exactly the request is initiated and composed is up to the client. Lagrange will ignore any URL parameters (except "edit") in the Titan link, as those are meant to be set according to the data provided by the user, and not dictated by the link on the page.

As I mentioned on BBS, the UI could be improved by making it easier to send a Titan request without any data attached (i.e., just "size=0").

For your use case of a delete link, why not just use a regular Gemini link since no data is needed?

@skyjake skyjake added the enhancement New feature or request label Feb 5, 2025
@byte-diver
Copy link
Author

ye in my case I'll opt with doing a CGI for handle deletion, since params in the titan link is ignored by every browser I tested.
that's a pity actually, but maybe since Lagrange is arguably the largest one, we could push for some change?

e.g. if we have link like titan://blabla/handle - then open the dialog for uploading
but if we have link like titan://blabla/handle;size=0; on the page - then open file deletion dialog with confirmation. if user presses "OK" - then Lagrange actually sends the request and server deletes the file.

this should be safe since it's impossible to have both size=0 and file bytes in the link, since they require a newline and links in gemtext are strictly one line.

I see how this interpretation of size=0 lies in the gray zone and it would lead to different behavior in browsers, but I personally see it as a valuable improvement. This way we could have a DELETE request alternative in geminispace. If community will support this change ofc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants