JuliaPluto / PlutoUI.jl

https://featured.plutojl.org/basic/plutoui.jl
The Unlicense
299 stars 54 forks source link

Add confirm text #243

Closed KeithWM closed 4 months ago

KeithWM commented 1 year ago

Added the option to add a custom text to a "Confirm" button. Currently it showed the rather unfriendly "Submit Query" text on my setup (might be OS/browser dependent?). It now shows the text "Confirm" by default, but the user can specify a different text by use of an optional (non-keyword) argument.

I hope you like it, but am happy to make any changes as you see fit.

github-actions[bot] commented 1 year ago

Try this Pull Request!

Open Julia and type:

  julia> import Pkg
julia> Pkg.activate(temp=true)
julia> Pkg.add(url="https://github.com/KeithWM/PlutoUI.jl", rev="add-confirm-text")
julia> using PlutoUI

Or run this code in your browser: Run with binder

pankgeorg commented 1 year ago

The current behaviour is to let the user agent choose a text, according to localization settings. We want to maintain this behaviour, at least as the default one. Could you adjust the default to fall back to this behaviour and only override if you explicitly pass some text?

KeithWM commented 1 year ago

Hi Panagiotis,

Good idea! I will adjust it and update the PR.

Keith

genericallyterrible commented 4 months ago

Thanks for the inspiration for #294! Since #294 is now merged, this one should probably close.

KeithWM commented 4 months ago

Wow I really dropped the ball there, thanks for picking it up!