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

Replay buttons on card and 2.1.20 #135

Open
Arthur-Milchior opened this issue Jan 23, 2020 · 9 comments
Open

Replay buttons on card and 2.1.20 #135

Arthur-Milchior opened this issue Jan 23, 2020 · 9 comments

Comments

@Arthur-Milchior
Copy link

Anki 2.1.20 (currently in beta) adds a button to replay sounds. That's great. This means that this add-on become obsolete.
You might want to add the information on anki, "-19", to indicate that's it can be used up to version 19.

@twwn
Copy link

twwn commented Jan 25, 2020

Not quite obsolete I'd say. So far the new button has a huge white circle for no apparent reason, and since it's a static img/png you can't get rid of (just) that.

I'd hope that either Anki directly switches to this addon's handling or the addon is altered to now replace that img with its cleaner svg.

@Arthur-Milchior
Copy link
Author

Let me rephrase then
Current version of the add-on is obsolete; adding a second button makes no sens.
Replacing one button by another one would be a nice change.
You can also give your feedback about the button size on https://anki.tenderapp.com/
I won't do it because I don't care, but that's probably the kind of thing Damien Elmes would like to know

@twwn
Copy link

twwn commented Jan 25, 2020

Left him a post yesterday, yes. I do hope he picks up this behavior as it matches AnkiDroid's, which likewise injects a svg.

(About the second button: There's none currently as the hooks also changed. For me addon does nothing on 2.1.20.)

@ospalh
Copy link
Owner

ospalh commented Jan 25, 2020

I’v added a note at Ankiweb.
I’l now think about what to do. Maybe i’l look at a way to hide the original button. But that wil probably take a while, as i don’t work too much on these add-ons any more.

@omega3
Copy link

omega3 commented Feb 14, 2020

It is not obsolete. Anki 2.1.20 sound button doesn't look good (in my humble subjective opinion).

This is how Anki sound icon looks like:
https://i.imgur.com/kWoNbig.png

I had this beautiful svg button
https://i.imgur.com/RzzkivL.png

The advantage of svg is that users can easily change color and adjust size.

.card .replaybutton svg {
    fill:  #3399ff;
}

I was given this here:
#122

Damien will not implement this add-on in Anki. I already proposed it here:
https://anki.tenderapp.com/discussions/beta-testing/1708-anki-2120-beta/page/1#comment_48042382
but with no response to this idea from Damien.

Edition:
They can be styled a bit
https://apps.ankiweb.net/docs/manual.html#audio-replay-buttons
but still this is not the same effect as I showed with my styling for add-on.

@Arthur-Milchior
Copy link
Author

I can update the add-on to ensure it hides Anki's button and use the one fo this add-on instead.
If anyone want to hire me, we can discuss it.
I must state that my original post was really about telling you the add-on was, as far as I see it, obsolete. I was not looking to find clients here

@omega3
Copy link

omega3 commented Feb 16, 2020

I figured out how to achieve the effect that I had before without add-on.

In Styling section of cards

.replay-button svg path { stroke: #2f2f31; fill: #3399ff; }
.replay-button { width: 35px; }
.replay-button svg circle {
  fill: #2f2f31;
  stroke: #2f2f31;
}

.card.nightMode { background-color: #2f2f31; }

Adjust colors to your liking. Colors should match background color for the circle to disappear.

The piece of code for this is in reviewer.css. At least in tar.bz2 version for Linux.

In this case add-on seems to be unnecessary, unless it can provide some extra features.

@Arthur-Milchior
Copy link
Author

Add-on may be simpler for users: adding a number in manager instead of changing every note type. But I admit that seems less necessary than if you didn't have this CSS

@kelciour
Copy link

Something like this can also be used to make it look exactly the same as before. To make it black, delete or replace fill='blue' with fill='black'.

.replay-button {
 content: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='blue'><polygon points='11,25 25,16 11,7'></polygon></svg>");
}

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

5 participants