-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Send to device follow-ups #393
Conversation
…ead of number for leading zeros
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.
looking good! nice adjustments 👍
src/assets/stylesheets/index.scss
Outdated
@@ -57,16 +57,20 @@ body { | |||
min-height: 90px; | |||
height: 90px; | |||
display: flex; | |||
border-bottom: 2px solid #242424; | |||
border-bottom: 1px solid #242424; |
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.
nit: this is rgb(36, 36, 36)
, which is slightly darker than $darker-grey
is. do you want to make a $darkest-grey
, heh?
src/assets/stylesheets/index.scss
Outdated
display: flex; | ||
width: 350px; |
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.
do you want to make this a variable?
color: $grey-text; | ||
font-size: 1.0em; | ||
font-weight: lighter; | ||
white-space: nowrap; |
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.
nit; want to do text-overflow: ellipsis;
? (I've been meaning to file an issue for this anyway; ellided text that looks truncated tends to look better/natural with …
IMO)
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 don't think this will ever overflow because once the width is reduced we just stop showing it altogether
src/assets/stylesheets/index.scss
Outdated
display: none; | ||
} | ||
|
||
padding: 0.5em; |
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.
nit: intentional usage of em
instead of rem
or px
?
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.
yeah px seems better
src/assets/stylesheets/index.scss
Outdated
} | ||
|
||
padding: 0.5em; | ||
background-color: rgba(0, 0, 0, 0.85); |
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.
can you use $darkest-transparent
?
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.
yep, refactored and flipped everything to 0.9 alpha
src/react-components/home-root.js
Outdated
@@ -132,6 +139,13 @@ class HomeRoot extends Component { | |||
</div> | |||
</div> | |||
</div> | |||
<div className="header-subtitle"> | |||
<div> | |||
<a className="header-subtitle__link" href="/link"> |
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.
rel="nofollow"
?
@@ -106,7 +111,8 @@ class LinkRoot extends Component { | |||
<div className={styles.enteredDigits}> | |||
<input | |||
className={styles.digitInput} | |||
type="number" | |||
type="tel" | |||
pattern="[0-9]*" |
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.
feels awkward to use type="tel"
, but then, given the bug in Firefox, and seeing how input[type="tel"]
's mobile entry flow is more PIN-code-like, this is probably sufficient.
do you know how this works with internationalisation (i.e., non-Arabic numerals)?
is Firefox the only browser affected in your experience? Chrome, Safari seemed fine in my testing.
can you add a comment somewhere linking to this relevant Firefox bug?
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 interesting, i didn't realize this was considered a bug. it seemed logical that a "0001" entry for a number
seems wrong. i'll add a comment. not sure about internationalisation. even previously it was just a rendering issue, if they just punch the value in the keypad as you'd expect i think it will work no matter what.
let lastTouchAtMs = 0; | ||
|
||
document.addEventListener("touchmove", ev => { | ||
if (ev.scale === 1) return; |
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.
scale
seems to be a WebKit-specific property, not a standardised property of TouchEvent
. is this correct?
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.
yes, this is an iOS specific hack since iOS 11 disabled recognizing user-scalable=no
ev.preventDefault(); | ||
}); | ||
|
||
document.addEventListener("touchend", ev => { |
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.
do you want to handle the touchforcechange
event?
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.
not sure, I don't have a device to test :/ I'll do a fast-follow if this doesn't resolve the issue we were seeing (mis-zooming on the keypad page)
|
||
document.addEventListener("touchend", ev => { | ||
const now = new Date().getTime(); | ||
const isDoubleTouch = now - lastTouchAtMs <= 300; |
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 pretty sure, but not certain, you could use iOS' gesturestart
/gesturechange
/gestureend
events.
from Safari's Handling Events docs:
To disable pinch open and pinch close gestures in iOS 2.0, implement the
gesturestart
andgesturechange
event handlers as follows:
function gestureChange(event) {
// Disable browser zoom
event.preventDefault();
}
(there's also dblclick
but that may fire too late.)
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.
yeah the double tapping is the main issue for the link page, and the zooming is the main issue for the hub page. this implementation "cleanly" fixes both (I don't like it either) :/
This PR:
viewport
method in iOS 10+ apparently :P)number
totel
because it can have leading zeros.