* Prefer key over keyCode
* Do not close TS pages on Esc when floating elements are open
* Close pop-up when Escape is pressed regardless of keepOnKeyup
* Close help modals when Escape is pressed
* Avoid duplicate handling of Esc in WithFloating
* Formatting
* Handle closing of preset management modals
* Reset text input modal to initial value
The problem at the moment is that the two left buttons are not part
of the scrollable area on the right, and the scrollable area has been
manually positioned. We would need to move the buttons into the toolbar
area, and then hide them when using the desktop editor. For now, I've
just added wrapping/smaller text instead.
https://forums.ankiweb.net/t/image-occlusion-editor-buttons-overlap-in-some-languages/38499
Our average calculation is based on pre-binned values, so it's not
entirely accurate, but using the midpoint of the bin brings us closer.
In the future we can solve this by calculating it on the Rust end instead.
Confirmed correct layout in RTL mode.
I experimented with adding a tooltip as well, as suggested in
https://forums.ankiweb.net/t/anki-23-12-beta/37771/82, but it's
confusing as we already change the mouse cursor/underline when the user
hovers over a label. Given the help text universally starts with
"affects the entire collection", I think that's good enough.
- We were registered another event handler for each card, which was a
resource leak, and would lead to the shortcut failing on every second card
due to the even number of toggles.
- We were allowing toggleMasks() to run even when the button wasn't visible
(e.g., when showing the question side of a card)
The previous wording could be interpreted as 'time until showing question'
or 'time that question should be shown'. I'd intended the latter, and
I didn't notice that the original implementation was doing the former.
Profiling revealed that binding to clientWidth for each component in
the deck options was taking up a sizable amount of time, due to the
inefficient way it's implemented: https://github.com/sveltejs/svelte/issues/7583
In one case, we can instead defer checking clientWidth until we go to
display the popover. In the other case, we can achieve the revert button
positioning a different way.
The last change dropped the speed index in Chrome from 1.4s to 1s; this
change brings it down to 0.7s.
Also fixed the hovered select element from jiggling due to a different
border width when hovering.
There's been a fair bit of talk on the forums about users not discovering
the help info, so this will hopefully make finding it easier.
Ideally we'd use a single var(--fg), but it feels a bit too strong in
light mode.
The animations we were showing on hover/focus made the UI feel
laggy. This has come up before, and we already disable them for buttons.
I experimented with removing the transitions (but keeping the change on
hover) - it feels much more responsive, but I also didn't feel that it
was contributing anything useful - the user knows where they've placed
the mouse or cursor, and the extra movement feels like a bit of a
distraction. Happy to discuss if people feel differently, though.
column-count was causing progressively-worse performance. By switching
to manual left/right column assignment, we get faster performance and
retain the top-to-bottom/left-to-right flow.
This also removes the outer DynamicallySlottable, which as far as I'm
aware, is not used by any add-ons.
Closes#2877
* Add type to createEventDispatcher
* Fix image overlay not closing when clicking outside on Qt6.6
Use Event.composedPath() instead of obsolete Event.path
https://chromestatus.com/feature/5726124632965120
* Fix RTL position of close button in help modals
* Fix position of active button's border
* Fix margin of modal's title
* Fix alignment of modal buttons' text
* Add missing translation
* Replace css_browser_selector
* Add classes to root element instead of body
* Export addBrowserClasses() in reviewer_extras for mobile clients (dae)
* Avoid setting .mac on iOS devices (dae)
Due to a change in svelte-check 3.5.2 (likely https://github.com/sveltejs/language-tools/pull/2146),
we can no longer have composite enabled, as svelte-check spits out errors
about files in other project references not being listed in included files.
This should hopefully not make a difference to us, as we weren't taking
advantage of TypeScript's project compilation, as svelte-check doesn't support
it, and we use esbuild for JS conversion.
* remove unfinished polygon and remove selectable for shapes in polygon mode
* make group and polygon position remain inside canvas area
* click through transparent area in grouped object
* add some shortcuts for basic usages
* tools button icon in center & switch mode border
* fix load svg image
* basic rtl support, panzoom have issues in rtl mode
* better zoom option both in ltr and rtl
* handle zoom event in mask editor
* add h button to handle toggle mask
* add more mime type
* use capital M (shift+m) for toggle mask
* allow io shortcuts in mask editor only
* make other shapes also remain in canvas bound area
* better zoom implementation, zoom from center
add zoom to resize event listener
* add a border to corner to handle blend of control
* add refresh button to go to selection menu
* add tooltip to shortcuts and also add shortcut for other tools
* make opacity remain in same state when toggled on
* opacity for group/ungroup objects
* update shortcuts implementation
* resolve TagAddButton a11y
better comments to document tagindex reasoning
* resolved a11y for TagsSelectedButton
allow focus to TagsSelectedButton with Shift+Tab and Enter or Space to show popover
* safely ignore a11y warning as container for interactables is not itself interactable
* Update CONTRIBUTORS
* quick fix syntax
* quick fix syntax
* quick fix syntax
* quick fix syntax
* resolved a11y in accordance with ARIA APG Disclure pattern
* resolved a11y
ideally should replace with with
a11y-click-events-have-key-events is explicitly ignored as the alternative (adding ) seems more clunky
* resolved SpinBox a11y
cannot focus on these buttons, so no key event handling needed (keyboard editting already possible by just typing in the field)
widget already properly follows ARIA APG Spinbutton pattern
* cleanup
* onEnterOrSpace() function implemented as discussed in #2787 and #2564
* I think this is the main keyboard handling of Select
Still need to fix focus and handle roles and attributes
* fixed the keyboard interaction
focus is janky because you need to wait until after the listed options load and for some reason that needs a tiny delay on onMount
I think this technically violates a11y, but it really doesn't since the delay is literally zero. But the code still needs it to happen.
* Select and SelectOption reference the same focus function
* SelectOption moved inside Select
+ started roles and a11y
* quick syntax and such changes
* finish handling roles and attributes
* fixed keyboard handling and only visual focus
* cleanup and slight refactoring
* fixed syntax
* what even is this?
* bug fixes + revert key selection
* fixed scrolling
* better control scrolling and focus
* Adjusted selection
Up/Down Arrows: start selection on active option
Enter/Space/Click: no initial selection, down arrow to first option, up arrow to last option
* Only set selected the first time Select is opened, all subsequent times use the previous selected
* Revert "Fix I/O not showing in Qt5"
This reverts commit c478689e5a.
* Fix misalignment of IO masks in Qt5 when image is vertically long
Also, as in Qt6, constrain the IO image to fit in the viewport.
* resolve TagAddButton a11y
better comments to document tagindex reasoning
* resolved a11y for TagsSelectedButton
allow focus to TagsSelectedButton with Shift+Tab and Enter or Space to show popover
* safely ignore a11y warning as container for interactables is not itself interactable
* Update CONTRIBUTORS
* quick fix syntax
* quick fix syntax
* quick fix syntax
* quick fix syntax
* resolved a11y in accordance with ARIA APG Disclure pattern
* resolved a11y
ideally should replace with with
a11y-click-events-have-key-events is explicitly ignored as the alternative (adding ) seems more clunky
* resolved SpinBox a11y
cannot focus on these buttons, so no key event handling needed (keyboard editting already possible by just typing in the field)
widget already properly follows ARIA APG Spinbutton pattern
* cleanup
* onEnterOrSpace() function implemented as discussed in #2787 and #2564
* quick syntax and such changes
* Allow im-/exporting with or without deck configs
Closes#2777.
* Enable webengine remote debugging in launch.json
* Reset deck limits and counts based on scheduling
Also:
- Fix `deck.common` not being reset.
- Apply all logic only depending on the source collection in the
gathering stage.
- Skip checking for scheduling and only act based on whether the call
wants scheduling. Preservation of filtered decks also depends on all
original decks being included.
- Fix check_ids() not covering revlog.
* Fix importing legacy filtered decks w/o scheduling
* Disable 'include deck options' by default, and fix tab order (dae)
* deck options > deck presets (dae)
* Move stop-timer-on-answer strings to correct section
* Add auto-advance options to deck preset
* Implement answer actions
* Fix error when last card is answered before timeout
* Fix deserialization of answerAction
* Add answerAction to reserved key list
* Fix inverted boolean
* Add option to wait for audio to finish
* Add auto-advance toggle
* Add shortcut
* Disable auto-advance when main window state changes
* Start auto-advance timer after option is toggled
* Disable auto-advance when main window loses focus
* Use existing translations
* Add Answer Hard and Show Reminder
- Allow custom study methods in reviewer to prevent errors
- Ensure we 'fail closed' if referer header has been removed
- Ensure we ignore opaque POST requests from other origins
Thanks again to Daniel for the feedback.