Giter Club home page Giter Club logo

anki-redesign's Introduction

console.log("Hei!", "Hello!", "Xin chào!") 👋

Welcome to my GitHub profile!

I am Jonny - a consultant at Omegapoint Norge and an ex-Informatics student at NTNU. Currently pentesting and developing web- and mobile applications. ✨.

Aside from development, I am also part of a few norwegian CTF teams such as Iku-toppene, bootplug and Corax. Playing CTFs and solving challenges while learning new things in the field of cybersecurity is something I also enjoy.


⚡ Github Stats

Shirajuki's github stats
Shirajuki's github streak
Shirajuki's github top languages

anki-redesign's People

Contributors

covre912 avatar ebandev avatar shirajuki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

anki-redesign's Issues

Refactor and optimize the code

The add-on is currently implemented with tons of bugs due to QT6. Refactoring the code will possibly make it easier to spot bugs, and also make the development easier. Optimizations is also needed to make the add-on as lightweight as possible.

visual issue with "advanced review buttom bar"

hello there , thank you for the add on its really great
however the issue is when I edited the add on "advanced review bottom bar" (aka ARBb) settings and also checked the box of it in the setting of the anki redesign , the cards count (new, learning, review ) in the bottoms bar (above the good , easy...bottoms) is almost gone
I tried adjusting the setting of the ARBb but it did not work
Untitled

Night mode - Issue

There is an issue with the dark mode. Apparently some part appearing white.
image

Adding the ability to select multiple fonts

Hey ! I do have emojis inside my packet name, and those emojis are not well rendered by Anki (see attached pic)
image
Could you add the ability to select a "fallback" font (in css it's basically making a font-family: "mainFont", "fallbackFont") in the config screen so we can select an emoji font (Apple Color Emoji, Twemoji etc) or a fallback font for non-Latin characters whom are not supported by some font? Thx ! :D

Horizontal Slider

Why the horizontal slider appears while there is a lot of space left for zoom??

slider

slider 2

Font color in dark mode

图片

^ As shown above, in the previous version of redesign the font color was white in dark mode.

图片

^ However, in the latest version of redesign the font color becomes black in the dark mode, thus making it hard to see, please tell me which variable I should change in the settings.

Programming decks

This is not related to the program - but it seems like you are doing computer science and I wanted to ask if you could post your programming anki decks as I am taking similar courses and it would help to have well made cards :)

Automatic disable after update

Hello there!

First of all, I would like to thank you for your amazing add-on, it does make Anki page look more visually pleasant and gives you a (minor) motivation to keep studying!

One thing I kept noticing is, everytime the Anki-redesign add-on is updated, it automatically gets disabled (last time it happened with the last update of yesterday). It's not much of a major issue, but rather a minor nuissance, although this is the only add-on I have that has this behaviour.

Cheers, and thank you for your work!

small bottoms in the "add cards " window

hello there, i like this add on but as the picture attached to this issue speaks for itself, the bottoms of add cards window became much smaller which is kind of annoying even though I use shortcuts for the most part but still
in the pic I attached the window with the add on (the lower one) it looks squeezed because I resized it to fit the pic canva but i meant in terms of buttom size and width you can see this issue clearly
, I posted another issue with this add on on this github page too, hoping they get fixed soon
Untitled

Mac - Windows Being Blown Up to Full or Put Into Fullscreen Mode

I left a comment on Anki Web but wanted to open an issue here as well.

There is some bug on Macs where every window is resized to fit the whole window or put into fullscreen and resizing windows is not saved. Every time I open the browser, it's in fullscreen mode and I have to take it out. Every time I open the add-ons menu, it gets blown up to full window and I have to resize it every time I open it back up.

[Bug} Filtered decks no longer have a different color

Default behaviour without the addon: In the deck browser, normal decks have a white text color. While filtered decks have a light blue text color.

With the addon: all decks have a white text color.

i have no coding experience but i made the following changes to "DeckBrowser.css" that restored the default behaviour.

replace this part

body table:first-of-type tr a,
body table:first-of-type tr a.filtered {
  color: var(--text-fg, var(--legacy-text-fg)) !important;
}

with

body table:first-of-type tr a {
  color: var(--text-fg, var(--legacy-text-fg)) !important;
}
body table:first-of-type tr a.filtered {
  color: #81cfff !important;
} 

Update to 2.1.55

Beta 1 of Anki 2.1.55 is out now. It features various UI changes: https://betas.ankiweb.net/anki2.1.55.html

In particular, I've noticed that the custom color doesn't get applied to the inside of the fields in the editor and browser-editor:
imagen

Preferences screen:

imagen

Deck options screen:

imagen

Error on startup with version 2.1.55

I just upgraded my Anki to verson 2.1.55 and get the following error on startup:

Error
An add-on you installed failed to load. If problems persist, please go to the Tools>Add-ons menu, and disable or delete the add-on.

When loading '⁨Anki-redesign⁩':
⁨Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/aqt/addons.py", line 247, in loadAddons
    __import__(addon.dir_name)
  File "/home/tai/.local/share/Anki2/addons21/308574457/__init__.py", line 259, in <module>
    from .utils import dialog
  File "/home/tai/.local/share/Anki2/addons21/308574457/utils/dialog.py", line 491, in <module>
    update_theme()
  File "/home/tai/.local/share/Anki2/addons21/308574457/utils/dialog.py", line 420, in update_theme
    apply_theme(ncolors)
  File "/home/tai/.local/share/Anki2/addons21/308574457/utils/dialog.py", line 462, in apply_theme
    theme_manager._apply_palette(mw.app) # Update palette theme_manager
  File "/usr/lib/python3.10/site-packages/aqt/theme.py", line 289, in _apply_palette
    hlbg = self.qcolor(colors.HIGHLIGHT_BG)
  File "/usr/lib/python3.10/site-packages/aqt/theme.py", line 187, in qcolor
    r"rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d+\.*\d+?)\)", self.var(colors)
  File "/usr/lib/python3.10/site-packages/aqt/theme.py", line 181, in var
    return vars["dark" if self.night_mode else "light"]
TypeError: tuple indices must be integers or slices, not str
  • Version ⁨2.1.55 (01caec2a)⁩
  • Python 3.10.8 Qt 6.4.1 PyQt 6.4.0
  • Arch Linux, Wayland, Gnome

review buttons revert to default after the latest update + an error message

image

Error
An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed.
If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem.
When you've discovered the add-on that is causing the problem, please report the issue to the add-on author.
Debug info:
Anki 2.1.54 (b6a7760c) Python 3.9.7 Qt 6.3.1 PyQt 6.3.1
Platform: Windows 10
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2022-07-27 06:15:44

Caught exception:
Traceback (most recent call last):
  File "aqt.addons", line 256, in onAddonsDialog
  File "aqt", line 131, in open
  File "aqt.hooks_gen", line 1872, in __call__
  File "C:\Users\*****\AppData\Roaming\Anki2\addons21\308574457\__init__.py", line 234, in on_dialog_manager_did_open_dialog
    context.form.web.eval(load_custom_style_wrapper())
AttributeError: 'Ui_Dialog' object has no attribute 'web'

Desired features: some themes

Is it possible to consider adding a theme like the things theme(like the color scheme of the things3)in future versions of redesign?And I see that catppuccin has released v0.2.0 with three new colorways, including the original is four colorways, we now use the catppuccin colorway seems to be one of the four named mocha, the new colorway has two new dark colors and a new light color, I really want to have them in redesign and I think the new light color can be used to optimize the current light color catppuccin.
图片
图片
Here is the reference link to the things theme mentioned above: https://github.com/colineckert/obsidian-things

Bug: some color settings are not available

Hello Shirajuki :D I'm here againnnnnn with bug feedback.

First, let me show you what anki looks like after I modify the color scheme.

The light theme
图片

The dark theme
图片

Next I will give feedback on two bugs that I encountered during the modification process.

  1. The color of the selected deck does not respond after modification, this problem occurs in both day mode and night mode.(Of course I'm sure I saved the changes after I made them)

图片

图片

  1. The frame background color does not respond after modification, but appears only in night mode.

图片

This problem is not present in daytime mode.
图片

In addition, I think I should not push you to update more themes, I think it is more important to change the color interface and make it easier to understand which position each option corresponds to, and then you can experience creating your own color scheme, but finally I propose a save as theme function, you can customize the changes under the current existing theme, and then save as a new theme that you can name yourself. I'm afraid that after the next redesign update my custom color scheme will be overwritten.

Lastly, I really like redesign and would love to find bugs for it, please don't feel pressured, this plugin is good enough.

Bug:Font change after a button is clicked will not work in night mode

图片

图片

图片

图片

In day mode, my primary color is set to black, and after I click the button, my button background changes to black and the font automatically changes from black to white, but in night mode, my primary color is set to white, and after I click the button, the font color does not automatically change from white to black, causing the font color and the button background to blend into one.

[Feature] Use better emoji & font

Could be cool to change the default font to something like Poppins (which imho looks rly better than sans-serif) and emojis to Apple one's (if installed) or by twitter's if apple one are not installed cuz for now I'm having issues with emojis :
Kuvakaappaus 2022-01-25 16-58-36
/

Anki Redesign on Anki 2.1.22

Once again, thank you for keeping this Add-on up to date and making Anki more contemporary and attractive.

When I tried to modify several of the colour schemes in Anki 2.1.22, I received this error message below.

Debug info:
Anki 2.1.22 (0ecc189a) Python 3.8.1 Qt 5.12.6 PyQt 5.12.3
Platform: Windows 10
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2022-04-13 07:55:40

Caught exception:
Traceback (most recent call last):
  File "C:\Users\William\AppData\Roaming\Anki2\addons21\308574457\__init__.py", line 507, in <lambda>
    button.clicked.connect(lambda _: self.save())
  File "C:\Users\William\AppData\Roaming\Anki2\addons21\308574457\__init__.py", line 541, in save
    showInfo(tr.preferences_changes_will_take_effect_when_you())
AttributeError: 'function' object has no attribute 'preferences_changes_will_take_effect_when_you'

No top menu bar add-on config bar

I downloaded the addon, and I can edit a few things from the general addon menu aby using the "configure" button, however, there is no menu bar button for the addon. I disabled all my other addons because I thought it might be interfering with this addon, but the button was still not there after restarting Anki. I'm running 2.1.46 btw, thanks.

Bug:The color switch on some pages is not working

It's me againnnnnnnnn.

This bug is just a simple little problem, and I just happen to have the timing right to find this bug.

Just when I was reporting on a bug about colors, I needed to switch modes to show the bug in a screenshot, and on the way I happened to open my stats page, and then I noticed that the background color of the stats page didn't change as naturally as the main page during the switch between day and night mode.

图片

图片

Then I stopped by to see if browsing page would also have this problem, and it turns out that it does.
图片
图片

But this page is browsed with the help of the plugin Browser: Table/Editor side-by-side (horizontal split), so I thought it might be a problem with the adaptability of the plugin, after I turned off the plugin and tried again, I found that the problem still existed ᇂдᇂ , I only tried to switch from night to day, another switch I think there is no need to try.
图片

NDFS compatibility configuration problem

Hi,

Thanks for making and maintaining Anki Redesign! It greatly improves the experience of using Anki ^_^

I see there is a new fix for NDFS compatibility. If I check the relevant checkbox on the Anki Redesign configuration window and click Save, it returns to an unchecked state when I revisit the configuration window, and doesn’t have any effect on the interface (even after restarting Anki).

It does seem to work if I bypass the configuration by changing

config['addon_no_distractions_full_screen'] = True if config.get('addon_no_distractions_full_screen', "false").lower() == "true" else False

into

config['addon_no_distractions_full_screen'] = True# if config.get('addon_no_distractions_full_screen', "false").lower() == "true" else False

Not working with QT6

Unfortunately, it does not work on the new qt6 with Anki 2.1.50

Getting this error while starting Anki:

When loading '⁨Anki-redesign⁩': ⁨Traceback (most recent call last): File "aqt.addons", line 244, in loadAddons File "/Users/erik/Library/Application Support/Anki2/addons21/308574457/__init__.py", line 620, in <module> update_theme() File "/Users/erik/Library/Application Support/Anki2/addons21/308574457/__init__.py", line 557, in update_theme apply_theme(ncolors) File "/Users/erik/Library/Application Support/Anki2/addons21/308574457/__init__.py", line 564, in apply_theme QPalette.ColorRole.Background: "WINDOW_BG", File "enum", line 429, in __getattr__ AttributeError: Background

TabWidget background color not affected by user customization

There's a known visual bug in QTabWidgets where the background color is not being affected by user customization on older Anki versions (specifically seen on 2.1.22 and 2.1.26). I believe that this is partly due to palette and the color-tags not being correctly overwritten and used by the Add-on. (Or it may just be Anki) Anyway, I have a fix for this in mind and I'll be working on fixing this on the next update.

Embedded image showing the visual bug:
image

Visual glitch (running 2.1.49)

RedesignGlitch

I have a glitch that I can replicate by either pressing "F" to create a filtered deck or whenever I click "Anki-redesign" in the toolbar. A small square takes up the top left corner of the screen and will not remove itself unless I restart Anki.

Bug Report

The latest version of Anki has been able to switch between day mode and night mode as the system switches. Although Anki-Redesign supports night mode, it cannot automatically switch the background to dark when Anki switches to night mode, below is my Anki main interface, which is the situation of Anki after the system automatically switches from light color to dark color, we can see from the picture We can see from the picture that Anki's top bar is already dark and the plugin Heatmap has also switched to dark, but Anki-Redesign has not. Now I still need to manually turn off Anki and turn it on again to achieve the dark and light color change.
图片

Font of Cards much smaller..

Hello!

Thank you for making a wonderful add-on for anki. With the latest update (2/4/2023) most of my cards fonts have been changed to become substantially smaller. I tried to change it over the user interface, however this changes the fonts for words in the program, not necessarily within the cards.

How can I fix this?

Background-Color

For some reason, the "background-color" doesn't change :(

I've tested without the addon and it works fine.

Here's my card's style:

.card {
 font-family: myfont1; 
 font-size: 25px;
 text-align: center;
 color: black;
 background-color: #FFFAF0;
}

img {
 font-family: Arial;
 width: auto;
 height: auto;
 max-width: 600px;
 max-height: 300px;
 box-shadow: 0 1px 4px 1px rgba(0, 0, 0, 0.2);
}

@font-face {
  font-family: myfont1;
  src: url("_msuigothic.ttf");
}

@font-face {
  font-family: myfont2;
  src: url("_meiryo.ttf");
}

.word {
 font-size: 50px;
 font-family: myfont2; 
}

.glossary {
 font-size: 28px;
}

.reading {
 font-size: 42px;
 font-family: myfont2; 
}


#hint {
 background: #FFFAF0; 
 border: color: black; }

#hint.hidden:hover { background: #FFFAF0; color: #000; cursor: pointer; }
#hint.hidden .payload { display: none; }

#hint.shown { background: #FFFAF0; color: #000; }

#hint.shown .trigger { display: none; }
#hint.shown .payload { display: block; }

And here's the image of the card in practice:

image

Borders in reviewer not the same color

First off I love the addon! I was just wondering how can I fix the borders (top and bottom) in the reviewer to be the same color as the rest of the card? It does not seem to be an issue with conflicting addons because I have disabled all others and it still looks like that. Thanks for the help!
Screenshot 2022-10-29 at 11 02 14 AM

[Feature] Change accent color

It could be really cool to have a "change accent color" option in the addon config (with just a simple color picker + ability to add hexadecimal color)

Feature request: Visual feedback

Hi there! Thank you for the awesome add-on!

Do you think it would be possible to implement visual feedback like previous add-ons have done? Currently they don't work with recent Anki versions, but here are two examples:

Ankimote
image

NDFS
image

I know there's a workaround by mobedoor to make NDFS work with more recent versions of Anki, but the NDFS answer bar is always dislocated and unformated for some reason.

It would be awesome to have it integrated into this add-on, and maybe Ankimote's solution is easier to implement (and the confirmation design even matches the new buttons!)

Kind regards 🙏

Add ability to save, sync and reset custom themes

As of now Anki-redesign does support it's users to create their own themes. However, they does not get saved / persist after an update is pushed on the Anki web. This can be fixed by taking a copy of the themes folder in the user_files folder.

Lower buttons are not styled on Mac

Hi, sorry for opening a new issue. There's one remaining thing not working as it should on mac.

CleanShot 2022-08-23 at 12 57 17

This is the reason:
CleanShot 2022-08-23 at 12 58 48

The styles are set as !important. And thus overwrite your styling.

[Bug] Add-on replaces Anki's preferences pane

Unfortunately, this addon replaces Anki's preference pane (at least on my system). I don't understand why it doesn't show up under tools or on a separate column even. But as of now, it replaces the settings pane and thus I have to disable the addon to get back into Anki's settings pane.

image
^ When I press this, it goes into the addon's settings.

image
^ As you can see, the addon's settings isn't to be found anywhere else.

Version 2.1.54 (b6a7760c)
Python 3.9.7 Qt 6.3.1 PyQt 6.3.1
12.4 macOS M1

Edit: Thanks a lot in advance and for all of your work so far :)

Increase the bar buttons

Since the bar is already big, why don't we enjoy bigger buttons. 😜
תמונה

Thanks for the plugin!!

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.