-
Notifications
You must be signed in to change notification settings - Fork 166
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
Convert Key to interface, add static instances and improve JavaDocs #4061
Conversation
5b4cd10
to
ccf49e5
Compare
Apparently, |
Replaced |
a7ab7fa
to
1dd9919
Compare
52ea4b2
to
5bde3c2
Compare
Not sure why TC build fails 😕 |
The build log says |
Thank you @Legioth, I'll have a look at that! Strange enough this is what I see (as guest) on the TC build log:
|
*/ | ||
public class Key { | ||
@FunctionalInterface | ||
public interface Key extends Serializable { |
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.
The trick is that when the the build log terminates after a bunch of JavaDoc warnings, then there's also at least one JavaDoc error earlier during the same run. Those errors can be found by searching for "error:" in the log. |
Review status: 0 of 5 files reviewed at latest revision, 1 unresolved discussion. flow-server/src/main/java/com/vaadin/flow/component/Key.java, line 279 at r4 (raw file):
This doesn't work in MS Edge, please use the key code instead (I think it is 27) Comments from Reviewable |
Review status: 0 of 5 files reviewed at latest revision, 2 unresolved discussions. flow-server/src/main/java/com/vaadin/flow/component/Key.java, line 210 at r4 (raw file):
Are you sure this works on MS Edge ? Reported here that it uses Comments from Reviewable |
@pleku What do you mean "change to the key code"? Just for Seems like Edge does report the wrong value and it's being tackled by the Edge team as a bug. Maybe we should just note this on the JavaDoc of the |
@heruan Edge reports
I'm not sure how I want to workaround this issue in this PR, maybe a comment yes... but basically people should be using a key code in stead of the key for cross browser supported Review status: 0 of 5 files reviewed at latest revision, 3 unresolved discussions. Comments from Reviewable |
I agree with @heruan that it's in general better to use
Review status: 0 of 5 files reviewed at latest revision, 3 unresolved discussions. Comments from Reviewable |
9156ebd
to
e993269
Compare
I committed solution 2, to stay consistent with the initial attempt to let the user specify the semantic of the key rather than its physical position on the keyboard. Another matter is whether or not implement an API to specify also the
Be aware that the value reported by http://keycode.info (i.e. |
808d698
to
162e271
Compare
Hi. Could you get the latest master into this branch? It should fix the build. Review status: 0 of 5 files reviewed at latest revision, 3 unresolved discussions, some commit checks failed. Comments from Reviewable |
Reviewed 2 of 5 files at r1, 1 of 1 files at r5, 1 of 2 files at r6, 1 of 1 files at r7. flow-server/src/main/java/com/vaadin/flow/component/Key.java, line 368 at r7 (raw file):
Duplicate "to" flow-server/src/main/java/com/vaadin/flow/component/Key.java, line 832 at r7 (raw file):
Typo "twoard" flow-server/src/main/java/com/vaadin/flow/component/Key.java, line 1096 at r7 (raw file):
typo: "funciton" flow-server/src/main/java/com/vaadin/flow/component/Key.java, line 1147 at r7 (raw file):
typo: "curreent" flow-server/src/main/java/com/vaadin/flow/component/Key.java, line 1354 at r7 (raw file):
There's "PIP" and "PinP" with an 'n' flow-server/src/main/java/com/vaadin/flow/component/Key.java, line 1717 at r7 (raw file):
Missing ")" flow-server/src/main/java/com/vaadin/flow/component/Key.java, line 1765 at r7 (raw file):
Now it allows to pass zero arguments and also seems a bit more confusing than before. Maybe it could be something like: and explain in the javadocs that the flow-server/src/main/java/com/vaadin/flow/component/KeyNotifier.java, line 95 at r7 (raw file):
typo: "matche" (same for the two methods below) flow-server/src/main/java/com/vaadin/flow/component/KeyNotifier.java, line 98 at r7 (raw file):
I guess this link doesn't work after changing the parameters to varargs. (same for the two methods below) Comments from Reviewable |
162e271
to
1b63846
Compare
I apologize for the many typos, descriptions come from MDN and I trusted them too much 😅 Review status: 3 of 5 files reviewed at latest revision, 12 unresolved discussions. flow-server/src/main/java/com/vaadin/flow/component/Key.java, line 368 at r7 (raw file): Previously, pekam (Pekka Maanpää) wrote…
Done. flow-server/src/main/java/com/vaadin/flow/component/Key.java, line 832 at r7 (raw file): Previously, pekam (Pekka Maanpää) wrote…
Done. flow-server/src/main/java/com/vaadin/flow/component/Key.java, line 1096 at r7 (raw file): Previously, pekam (Pekka Maanpää) wrote…
Done. flow-server/src/main/java/com/vaadin/flow/component/Key.java, line 1147 at r7 (raw file): Previously, pekam (Pekka Maanpää) wrote…
Done. flow-server/src/main/java/com/vaadin/flow/component/Key.java, line 1354 at r7 (raw file): Previously, pekam (Pekka Maanpää) wrote…
Done. flow-server/src/main/java/com/vaadin/flow/component/Key.java, line 1717 at r7 (raw file): Previously, pekam (Pekka Maanpää) wrote…
Done. flow-server/src/main/java/com/vaadin/flow/component/Key.java, line 1765 at r7 (raw file): Previously, pekam (Pekka Maanpää) wrote…
Done. Comments from Reviewable |
1b63846
to
130f685
Compare
Oh, right. Well now we have better docs than MDN. :D Reviewed 2 of 2 files at r8. Comments from Reviewable |
Review status: all files reviewed at latest revision, 4 unresolved discussions. a discussion (no related file): Just say if you are busy or otherwise need help with this since we'd like to get this in before releasing the RC tomorrow. :) Comments from Reviewable |
Review status: 4 of 6 files reviewed at latest revision, 5 unresolved discussions. a discussion (no related file):
😍 Comments from Reviewable |
Reviewed 2 of 2 files at r9. a discussion (no related file): Previously, heruan (Giovanni Lovato) wrote…
Well that's the plan at least. :D Thanks for the test! Good thing that the bug was found at this point. There's still one un-resolved comment about typos in javadocs. Comments from Reviewable |
Reviewed 1 of 1 files at r10. flow-server/src/main/java/com/vaadin/flow/component/KeyNotifier.java, line 95 at r7 (raw file): Previously, pekam (Pekka Maanpää) wrote…
I fixed it myself, hope you don't mind. Comments from Reviewable |
Sorry @heruan, we'll be releasing another beta after all. Anyway, thanks again for the contribution and quick responses! :) |
Improves keyboard event listeners:
com.vaadin.flow.component.Key
is now a functional interface;Fixes #4046
This change is