Re: RFR: 8091673: Public focus traversal API for use in custom controls [v4]

2024-11-07 Thread Andy Goryachev
On Thu, 7 Nov 2024 18:20:36 GMT, Michael Strauß wrote: > tests should also assert the `focusVisible` flag good point, thanks! - PR Comment: https://git.openjdk.org/jfx/pull/1628#issuecomment-2462968353

Re: RFR: 8091673: Public focus traversal API for use in custom controls [v4]

2024-11-07 Thread Michael Strauß
On Thu, 7 Nov 2024 15:52:04 GMT, Andy Goryachev wrote: >> Public focus traversal API for use in custom controls. >> >> https://github.com/andy-goryachev-oracle/Test/blob/main/doc/FocusTraversal/FocusTraversal-v3.md >> >> This is a lightweight change that only adds the public API for focus >> t

Re: RFR: 8091673: Public focus traversal API for use in custom controls [v4]

2024-11-07 Thread Andy Goryachev
> Public focus traversal API for use in custom controls. > > https://github.com/andy-goryachev-oracle/Test/blob/main/doc/FocusTraversal/FocusTraversal-v3.md > > This is a lightweight change that only adds the public API for focus > traversal, containing neither the public API for the traversal p

Re: RFR: 8091673: Public focus traversal API for use in custom controls [v4]

2024-10-29 Thread Andy Goryachev
On Tue, 29 Oct 2024 17:03:01 GMT, Jeanette Winzenburg wrote: >> I think this discussion is not productive. Can we focus on essentials >> please? > > readability __is__ essential ;) Same as others, wondering why you insist on > not going to max it? I agree with readability. At the same time,

Re: RFR: 8091673: Public focus traversal API for use in custom controls [v4]

2024-10-29 Thread Kevin Rushforth
On Tue, 29 Oct 2024 15:28:39 GMT, Andy Goryachev wrote: >> I agree that especially when each switch case is on a single line, indenting >> is the most sensible thing to do. It's a little more defensible to treat the >> standard switch `case :`, on a line by itself, as a label which is >> p

Re: RFR: 8091673: Public focus traversal API for use in custom controls [v4]

2024-10-29 Thread Jeanette Winzenburg
On Tue, 29 Oct 2024 16:51:33 GMT, Andy Goryachev wrote: >> I'm not sure why this is a counter argument. It's not used in the JDK or >> JavaFX. I still think option 2 is better, but if we don't enforce a style >> then it's your choice. > > I think this discussion is not productive. Can we focus

Re: RFR: 8091673: Public focus traversal API for use in custom controls [v4]

2024-10-29 Thread Andy Goryachev
On Tue, 29 Oct 2024 16:15:45 GMT, Nir Lisker wrote: >> That isn't an example of "everything on one line". That's effectively the >> "switch case :, on a line by itself", which is defensible, although >> still not preferred. >> >> Anyway, what you currently have is what I called option 1, a

Re: RFR: 8091673: Public focus traversal API for use in custom controls [v4]

2024-10-29 Thread Nir Lisker
On Tue, 29 Oct 2024 16:00:43 GMT, Kevin Rushforth wrote: >> Sure: >> >> >> String s = switch(val) { >> case 1 -> >> "one"; >> case 2 -> >> "two"; >> default -> >> "unknown"; >> }; > > That isn't an example of "everything on one line". That's effectively the > "switch case :, on

Re: RFR: 8091673: Public focus traversal API for use in custom controls [v4]

2024-10-29 Thread Andy Goryachev
On Tue, 29 Oct 2024 15:16:59 GMT, Kevin Rushforth wrote: >> This is a bit silly. You have an opening brace, you should be indenting as >> you would in every other case when an opening brace appears and you break >> off the line. So unless there is a **really** good reason to suddenly not >>

Re: RFR: 8091673: Public focus traversal API for use in custom controls [v4]

2024-10-29 Thread Kevin Rushforth
On Mon, 28 Oct 2024 22:36:50 GMT, John Hendrikx wrote: >>> I don't indent case labels inside of switch. >> >> Our typical code style is to indent. I don't have a strong preference, but I >> switched (pun intended) many years ago from not indenting to always >> indenting because: A) the IDEs (a

Re: RFR: 8091673: Public focus traversal API for use in custom controls [v4]

2024-10-28 Thread John Hendrikx
On Mon, 28 Oct 2024 20:00:02 GMT, Kevin Rushforth wrote: >> I don't indent case labels inside of switch. >> I don't think we enforce one way or the other. >> >> And you can't ask to make it more compact and then complain that it's more >> compact /jk > >> I don't indent case labels inside of sw

Re: RFR: 8091673: Public focus traversal API for use in custom controls [v4]

2024-10-28 Thread Kevin Rushforth
On Mon, 28 Oct 2024 16:30:36 GMT, Andy Goryachev wrote: > I don't indent case labels inside of switch. Our typical code style is to indent. I don't have a strong preference, but I switched (pun intended) many years ago from not indenting to always indenting because: A) the IDEs (at least most

Re: RFR: 8091673: Public focus traversal API for use in custom controls [v4]

2024-10-28 Thread Andy Goryachev
On Mon, 28 Oct 2024 16:21:25 GMT, Nir Lisker wrote: >> Andy Goryachev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> review comments > > modules/javafx.graphics/src/main/java/javafx/scene/Node.java line 10458: > >> 10456: case

Re: RFR: 8091673: Public focus traversal API for use in custom controls [v4]

2024-10-28 Thread Nir Lisker
On Mon, 28 Oct 2024 16:13:37 GMT, Andy Goryachev wrote: >> Public focus traversal API for use in custom controls >> >> https://github.com/andy-goryachev-oracle/Test/blob/main/doc/FocusTraversal/FocusTraversal-v3.md >> >> This work is loosely based on the patch >> https://cr.openjdk.org/~jgiles/

Re: RFR: 8091673: Public focus traversal API for use in custom controls [v4]

2024-10-28 Thread Andy Goryachev
> Public focus traversal API for use in custom controls > > https://github.com/andy-goryachev-oracle/Test/blob/main/doc/FocusTraversal/FocusTraversal-v3.md > > This work is loosely based on the patch > https://cr.openjdk.org/~jgiles/8061673/ > > And is a scaled down version (with the public trav