Closed jorisleker closed 1 month ago
@jorisleker what do we do about the Space Grotesk font rendering straight quotes as curly quotes? There is an issue opened with the font (https://github.com/floriankarsten/space-grotesk/issues/44) but it doesn't look like there's any progress made on this.
@praseodym
Just downloaded a list of all polling station from TK2023 from https://waarismijnstemlokaal.nl/data. None of them has "
or '
in their name. So i'd say this is a very low priority issue. Don't think we will use quotes in h1 elements ourselves. My suggestion: don't fix.
The weird thing is, Space Grotesk actually has straight (single and double) quotes. see Google Fonts glyphs page. But it looks like the chars are flipped in the fontset. When I copy/paste these straight quotes from the screenshot below, I get these chars: ′
and ″
... So a fix would be to do a replace in all text we render to the front-end, but feels way too hacky.
Woops, my bad. There are quite some polling stations with names like 't Gasthoes
or BMV “De Schakel”
(about 60 on 10.000 polling stations). Disregard my previous 'don't fix' suggestion. Still low prio though
What about renaming our example polling stations so that we don't have quotes there? I can align it with the names from the Figma design.
The weird thing is, Space Grotesk actually has straight (single and double) quotes. see Google Fonts glyphs page. But it looks like the chars are flipped in the fontset. When I copy/paste these straight quotes from the screenshot below, I get these chars:
′
and″
... So a fix would be to do a replace in all text we render to the front-end, but feels way too hacky.
Those are the Unicode prime (U+2032) and double prime (U+2033) symbols. I'm not sure why the font would have those but not proper quote glyphs.
What about renaming our example polling stations so that we don't have quotes there? I can align it with the names from the Figma design.
Hiding the issue does not make it go away 😂 But fine with me. As long as we have an extended test set with names witn quotes
Those are the Unicode prime (U+2032) and double prime (U+2033) symbols. I'm not sure why the font would have those but not proper quote glyphs.
Ah check. Alternative would be to use Space Mono to render straight quotes, because that font has proper quotes. But that feels like an even bigger hack (and requires including an additional font).
how do we handle keyboard shortcuts? We can add a listener to buttons for instance, or I have something laying around that does
useKeyboard({
"shift+enter": doSomething
});
how do we handle keyboard shortcuts? We can add a listener to buttons for instance, or I have something laying around that does
useKeyboard({ "shift+enter": doSomething });
In the polling station selector we use this, I think that works fine: https://github.com/kiesraad/abacus/blob/53afc53d79197b9a0d72e7d10fc5a812cc8a4bf9/frontend/app/component/form/polling_station_choice/PollingStationSelector.tsx#L46-L50
this only triggers when the element has focus, is that the intention of the shortcuts below forms?
this only triggers when the element has focus, is that the intention of the shortcuts below forms?
If you have an elegant way of making the shortcut work anywhere on the page that would be best. If that's not easily achievable, having it work when focus is on the text boxes is good enough for now.
This is my current implementation: https://github.com/kiesraad/abacus/tree/design-debt-3-133/frontend/lib/ui/Button
but might want to decouple it from a button and create a
This is my current implementation: https://github.com/kiesraad/abacus/tree/design-debt-3-133/frontend/lib/ui/Button but might want to decouple it from a button and create a component ?
I'm ok with keeping it there for now, but I don't really like how eventMatchesShortcut
re-parses the shortcut for every keypress.
Also, the ShortcutHint
component is very similar to the KeyboardKeys
component that is implemented in #284.
I've added code for this:
With the tab-key I can highlight the "volgende" button and then submit by hitting the space bar. I can also highlight the navigation items on the left, but there hitting the space bar does not get me to the item I highlighted.
But spacebar doesnt normally trigger links from tags. It does now in progress list but wouldn't that make people expect it to work on other links as wel?
Shift+enter submit works, but the focusing of the next row fires first. I think we should move the listener to a <Form .../> component
But spacebar doesnt normally trigger links from tags. It does now in progress list but wouldn't that make people expect it to work on other links as wel?
spacebar shouldn't work on links. Normal browser behavior is activate focussed action with 'enter', spacebar behaves like pagedown
@jorisleker if using "ENTER" to go through the inputs, you enter numbers press enter and reach the submit button, it is focused after pressing ENTER on the last input. What should happen if you press ENTER with the submit button focused ?
What should happen if you press ENTER with the submit button focused ?
I think it makes sense to submit the form when you press ENTER
with the submit button focussed.
The thing we wanted to prevent was submitting the form 'to early' / unexpectedly as what happens in OSV. But we have prevented that by splitting up the form in sections, and by adding the 'controleren en opslaan' page/step.
(am thinking of changing the SHIFT
+ENTER
keyboard shortcut to move to the totals fields instead of submitting the form section, because that's an input you always need to complete before submitting, but will put this in a separate ticket)
ENTER
from this list because it is addressed in #207 so this issue can be closed
/overview
, you briefly see the page footer right below the top navigation bar whilst the content of the page is loading./1/input
the entire page is white whilst page is loading: this is how we want it to be./input
allow polling-station-numbers starting with0
(i.e.033
). Strip leading zeros before doing lookup of the polling station number in the database (002
and02
should evaluate to2
) → #284input-grid td
's should havepadding:.5rem 1.5 rem
(iso1rem 1.5rem
) andline-height:1.25rem
(iso inherited value of1.5rem
After #133 is fixed:
ENTER
does.