-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Add IO mask colour fill tool #4048
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
Conversation
dae
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| }, | ||
| ] as const; | ||
|
|
||
| export type ActiveTool = typeof tools[number]["id"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL this is possible in TypeScript! Thank you for the typing improvements too. :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor suggestion: if fill is set to #000000, we could clear the explicit value.
Not sure if i understood correctly 🤔 The fill attr isn't saved in the cloze if its set to the default mask colour (#ffeba2), like the angle attr when its 0. If its changed to be cleared when set to #000000 then users' existing io notes using the default mask colour would have their notes bloated with it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, that's a thinko on my part - from https://github.com/ankitects/anki/pull/4048/files#diff-a1adc784721911f5063bdb67703c3f2892d9fb58d5ee1738e0df305f7062f5caR361 I assumed #000 was the default. If our default is a color the user is unlikely to be able to pick easily, no point trying to remove it if it's the default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, sorry, was mistaken as well. The text "clozes" behave differently, they don't save the fill attr when its the default text colour (#000000) and regular masks don't save it when its the default mask colour
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If our default is a color the user is unlikely to be able to pick easily
The datalist element should be able to provide preset options for the colour input, and seems to work in external/mobile browsers but not in anki itself, even though its chromium version should support it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing Qt overlooked something when trying to integrate it into their own color picker implementation.
Anyway, thank you as always for your contributions :-)
Forum post: https://forums.ankiweb.net/t/allow-having-multiple-io-mask-colours/61137
This pr proposes to add a new fill tool to the io editor, which would bring it closer to the IOE addon feature-wise