feat: Labs option in preferences#5057
Conversation
Documentation build overview
4 files changed± genindex.html± autoapi/anki/config/index.html± autoapi/anki/decks/index.html± autoapi/aqt/webview/index.html |
|
Wouldn't Also: I know we didn't do that for the other alert boxes either, but having a "warning" icon might help the user to easily catch that the box is a warning box. It might be helpful for A11Y too, since icons will be recognizable even if e.g. the colors aren't. And another thing, this one for @focushover: you said "labs" is a common term used. Maybe that's mac specific but a quick search on the internet and based on my experiences it is mostly just called something like "Experiments" or "Experimental features" or similar. "Labs" to me is non-obvious; though, of course, a single click into the tab would show what this is all about. But wouldn't it be prefered to make it clear from the get go by just naming it after what it is (experimental)? |
|
I've added a In my opinion "alert-danger" should be used for values that are almost always damaging to the user. For example a 99% DR or as you say manually editing the parameters. While experiments are dangerous in the sense that they are less tested, there is still reason for the user to want to use the experiments so I'd say a "alert-warning" is probably for the best. |
| <div class="container"> | ||
| <Warning | ||
| warning="These features may change, break, or be removed without notice, use at your own risk." | ||
| warning="⚠️ These features may change, break, or be removed without notice, use at your own risk." |
There was a problem hiding this comment.
For consistency, maybe it is possible to prepend that icon on every Warning Box? Not sure if the current code allows this, but that would be better than having to remember to add the icon to every box.
There was a problem hiding this comment.
That wasn't very clear on my side. I meant as in: whenever you use the Warning box, it automatically prepairs the icon for you. So if you want to add another warning box somewhere, you'd only have to add the text. Somewhat like the color that is always the same, you do not have to manually specifiy that.
Perhaps CSS could be used to prepend that icon?
There was a problem hiding this comment.
We could use a
.alert-warning::before {content="⚠️"}
but that seems more complicated. I'm not sure if there are any more warnings on this page and if there were I'm not sure if they would need a
closes #5073 Saves the values set in - #5057 Saves it to the currently open collections json config. I'm not sure if this approach might have problems with #4289 (comment). A situation where the main window has Anki API access while also displaying user supplied JavaScript would be terrible so we should be careful with this. Test by enabling the "ping" labs option and then reload Anki or switch profile to the same profile.
Linked issue (required)
closes #4871
How to test (required)
Find "Labs" as a new option in the preferences
Checklist (minimum)
./ninja checkor an equivalent relevant check locally.Details
I've implemented the "Labs" feature in a web-view as I presume we are moving away from QT and
Currently these options have no function. Before we can add the functionality we should try and come up with the pattern that we should use to register new flags.
UI evidence (required for visual changes; otherwise N/A)
Scope