Code Monkey home page Code Monkey logo

Comments (8)

ocdtrekkie avatar ocdtrekkie commented on August 26, 2024 1

I just assembled datasette-external-links-new-tabs which I believe will resolve this issue. I'll plan to include it in the next release of Datasette on Sandstorm.

from datasette-sandstorm.

ocdtrekkie avatar ocdtrekkie commented on August 26, 2024

I kinda think this might make sense to propose upstream because it is potentially destructive to click off the app inadvertently, so I've proposed it there first. We can make a package-specific patch if it's not wanted.

from datasette-sandstorm.

ocdtrekkie avatar ocdtrekkie commented on August 26, 2024

Simon pointed out (in addition to his preference against target blank) that Datasette also displays URLs in tables, so I should probably look to implement a plugin to do this more generally in Datasette.

from datasette-sandstorm.

zenhack avatar zenhack commented on August 26, 2024

(Fwiw, I tend to agree that in general target=_blank is not what you should do -- but in the case of sandstorm it's needed for external links to even do anything, so...)

from datasette-sandstorm.

zenhack avatar zenhack commented on August 26, 2024

hm, that looks like it's actually general enough that we could even package it up as just something you can shove into apps to fix this issue in general, rather than having to patch it up on a case by case basis...

from datasette-sandstorm.

ocdtrekkie avatar ocdtrekkie commented on August 26, 2024

Arguably, yeah, though I think it really depends on the app whether it's the most efficient solution. <base target="_blank"> can also be a nice solution sometimes too. I personally dislike the concept of adding JS just to modify all the hyperlink tags on a page because it feels conceptually ugly/inefficient, though I'm sure compared to modern web apps it's practically zero cost.

from datasette-sandstorm.

ocdtrekkie avatar ocdtrekkie commented on August 26, 2024

Actually, I think at minimum I should go ahead and add it to the Docs, because we already provide the base tag example somewhere, and this would be good too.

from datasette-sandstorm.

ocdtrekkie avatar ocdtrekkie commented on August 26, 2024

Closing because I've pushed out Datasette 0.63 with this plugin included.

from datasette-sandstorm.

Related Issues (1)

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.