Re: [wicket] branch csp updated: WICKET-6725: replace display:none by wicket--hidden css class

2020-01-16 Thread Emond Papegaaij
Hi all, The CSP branch started to get a bit of a mess with work on different parts of Wicket combined in one branch. I've reworked the commits, put some of them on master, and split the rest on 2 branches: csp-display-none and csp-configurable. Those are for reviewing the code. I'll open a pull

Re: [wicket] branch csp updated: WICKET-6725: replace display:none by wicket--hidden css class

2020-01-15 Thread Andrew Kondratev
Some kind of core CSS is likely to be needed, considering that ALL inline styles should go not just hidden/display:none. The special class is what I originally suggested. For me personally the approach with css class would be easier to live with. Another option to consider could be an inline

Re: [wicket] branch csp updated: WICKET-6725: replace display:none by wicket--hidden css class

2020-01-15 Thread Sven Meier
Hi Andrew, exactly what I was thinking. Have fun Sven On 14.01.20 22:55, Andrew Kondratev wrote: Hi Everyone! Is this "none !important" actually needed? Elements with hidden attribute are hidden by themselves, except the cases when they have some display overrides (see

Re: [wicket] branch csp updated: WICKET-6725: replace display:none by wicket--hidden css class

2020-01-15 Thread Emond Papegaaij
> > IMHO we have to decide first whether we want to use the "hidden" attribute. > > I'm not sure about the pros and cons at the moment. > > > > Depending on that decision (NO) we'll have to write CSS classes anyway > > or (YES) we might want to add them additionally. > > In the latter case I'm not

Re: [wicket] branch csp updated: WICKET-6725: replace display:none by wicket--hidden css class

2020-01-15 Thread Martin Grigorov
On Wed, Jan 15, 2020 at 8:12 PM Sven Meier wrote: > Hi Martin, > > IMHO we have to decide first whether we want to use the "hidden" attribute. > I'm not sure about the pros and cons at the moment. > > Depending on that decision (NO) we'll have to write CSS classes anyway > or (YES) we might want

Re: [wicket] branch csp updated: WICKET-6725: replace display:none by wicket--hidden css class

2020-01-15 Thread Sven Meier
Hi Martin, IMHO we have to decide first whether we want to use the "hidden" attribute. I'm not sure about the pros and cons at the moment. Depending on that decision (NO) we'll have to write CSS classes anyway or (YES) we might want to add them additionally. In the latter case I'm not sure we

Re: [wicket] branch csp updated: WICKET-6725: replace display:none by wicket--hidden css class

2020-01-15 Thread Sven Meier
Hi, in my tests inputs inside of hidden divs work just fine. >This sounds like if you use 'hidden' attribute on a that wraps some >form elements, those elements will submit their values when you submit >their form. With display:none the elements won't submit their values. Actually elements

Re: [wicket] branch csp updated: WICKET-6725: replace display:none by wicket--hidden css class

2020-01-15 Thread Sven Meier
I disagree, "hidden" has the perfect semantic for what we're doing with placeholders or other s. Sven On 15.01.20 11:44, Emond Papegaaij wrote: According to my tests textarea with hidden attribute works the same way as `display: none` (latest Chrome, FF, Chromium) Maxim and Andrew: Yes,

Re: [wicket] branch csp updated: WICKET-6725: replace display:none by wicket--hidden css class

2020-01-15 Thread Maxim Solodovnik
Just have tested Chrome might change the position of such tag in the DOM :( (inside table) sorry for the noise On Wed, 15 Jan 2020 at 23:54, Maxim Solodovnik wrote: > Maybe some non-html tag can be rendered as placeholder? (for ex. > ) > It will be invisible :) > > > On Wed, Jan 15, 2020,

Re: [wicket] branch csp updated: WICKET-6725: replace display:none by wicket--hidden css class

2020-01-15 Thread Maxim Solodovnik
Maybe some non-html tag can be rendered as placeholder? (for ex. ) It will be invisible :) On Wed, Jan 15, 2020, 17:44 Emond Papegaaij wrote: > > > According to my tests > > > textarea with hidden attribute works the same way as `display: none` > > > (latest Chrome, FF, Chromium) > > > > >

Re: [wicket] branch csp updated: WICKET-6725: replace display:none by wicket--hidden css class

2020-01-15 Thread Emond Papegaaij
> > According to my tests > > textarea with hidden attribute works the same way as `display: none` > > (latest Chrome, FF, Chromium) > > Maxim and Andrew: Yes, the display: none is very important. (That's why it even has !important). The hidden attribute has the lowest priority possible. Any

Re: [wicket] branch csp updated: WICKET-6725: replace display:none by wicket--hidden css class

2020-01-15 Thread Maxim Solodovnik
Hello Martin, I did more tests :) Browser Chrome latest plain HTML 4 tabs enter different text in all areas via DevTools 1) first

Re: [wicket] branch csp updated: WICKET-6725: replace display:none by wicket--hidden css class

2020-01-14 Thread Martin Grigorov
Hi Maxim, On Wed, Jan 15, 2020 at 8:54 AM Maxim Solodovnik wrote: > Hello All, > > According to my tests > textarea with hidden attribute works the same way as `display: none` > (latest Chrome, FF, Chromium) > What exactly did you test ? According to

Re: [wicket] branch csp updated: WICKET-6725: replace display:none by wicket--hidden css class

2020-01-14 Thread Maxim Solodovnik
Hello All, According to my tests textarea with hidden attribute works the same way as `display: none` (latest Chrome, FF, Chromium) hidden also hides all descendants So I would vote for using `hidden="hidden"` for placeholders and preserving `data-wicket-placeholder` (due to hidden can be used

Re: [wicket] branch csp updated: WICKET-6725: replace display:none by wicket--hidden css class

2020-01-14 Thread Andrew Kondratev
Hi Everyone! Is this "none !important" actually needed? Elements with hidden attribute are hidden by themselves, except the cases when they have some display overrides (see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/hidden). If developer/user does override he or she could

Re: [wicket] branch csp updated: WICKET-6725: replace display:none by wicket--hidden css class

2020-01-14 Thread Sven Meier
Hi Edmond, then I'll ask again: Why not render a "hidden" attribute and style it in the core css: |[hidden] { display: none !important}| We could get rid of the "data-wicket-placeholder" attribute as well, and let wicket-ajax check on the "hidden" attribute instead. Sven On 14.01.20

Re: [wicket] branch csp updated: WICKET-6725: replace display:none by wicket--hidden css class

2020-01-14 Thread Sven Meier
Hi Maxim, great idea with the header contributor, that's much better! Thanks Sven On 14.01.20 16:23, Maxim Solodovnik wrote: For example it can be added as `Application.get().getHeaderContributorListeners()` On Tue, 14 Jan 2020 at 16:03, Maxim Solodovnik wrote: `!important` is not the

Re: [wicket] branch csp updated: WICKET-6725: replace display:none by wicket--hidden css class

2020-01-14 Thread Emond Papegaaij
> >Using the hidden attribute is no option either, > >because it is overridden by any css that sets display. > > why is that a no-option, hidden elements can be styled too: Dropping the styling altogether will force our users to package their own styling for artifacts generated by Wicket. These

Re: [wicket] branch csp updated: WICKET-6725: replace display:none by wicket--hidden css class

2020-01-14 Thread Sven Meier
Hi, >Using the hidden attribute is nooption either, >because it is overridden by any css that sets display. why is that a no-option, hidden elements can be styled too: |[hidden] { display: none !important} | Do you mean FormComponentFeedbackBorder's "color:red;" style? I wouldn't want that to

Re: [wicket] branch csp updated: WICKET-6725: replace display:none by wicket--hidden css class

2020-01-14 Thread Emond Papegaaij
Hi, Sven, we do need styling to hide components. Component.renderPlaceholderTag renders an empty tag for whatever it reads from your markup. That fact that it is empty, does not mean it is invisible. For example, in my application I had empty list-items (li) popping up all over the place. Using

Re: [wicket] branch csp updated: WICKET-6725: replace display:none by wicket--hidden css class

2020-01-14 Thread Sven Meier
Hi Maxim, an empty div with hidden inputs does not take any space. Try it with wicket-examples. Have fun Sven Am 14. Januar 2020 18:07:23 MEZ schrieb Maxim Solodovnik : >I thought the main idea is to keep placeholder for any element both >invisible and "take no space" >hidden attribute might

Re: [wicket] branch csp updated: WICKET-6725: replace display:none by wicket--hidden css class

2020-01-14 Thread Maxim Solodovnik
I thought the main idea is to keep placeholder for any element both invisible and "take no space" hidden attribute might work instead of `display: none` The latter also hides all descendants [1], so I guess it should be preferable [1] https://developer.mozilla.org/en-US/docs/Web/CSS/display On

Re: [wicket] branch csp updated: WICKET-6725: replace display:none by wicket--hidden css class

2020-01-14 Thread Sven Meier
Hi, do we really need this CSS? AFAIK the 'hidden' markup from Form and Component placeholders do not need any styling actually, they look fine without it. We should add a CSS class to the markup of course, but leave its styling to each project. Cases in wicket-examples (UploadProgressBar,

Re: [wicket] branch csp updated: WICKET-6725: replace display:none by wicket--hidden css class

2020-01-14 Thread Maxim Solodovnik
For example it can be added as `Application.get().getHeaderContributorListeners()` On Tue, 14 Jan 2020 at 16:03, Maxim Solodovnik wrote: > `!important` is not the silver bullet (as well as inline style) > > `renderHead` is not as important as `onConfigure`, so I believe it > shouldn't be made

Re: [wicket] branch csp updated: WICKET-6725: replace display:none by wicket--hidden css class

2020-01-14 Thread Maxim Solodovnik
`!important` is not the silver bullet (as well as inline style) `renderHead` is not as important as `onConfigure`, so I believe it shouldn't be made mandatory Maybe there is some `hackish` way to inject this css only once for any component hierarchy? On Tue, 14 Jan 2020 at 15:55, Emond Papegaaij

Re: [wicket] branch csp updated: WICKET-6725: replace display:none by wicket--hidden css class

2020-01-14 Thread Martin Grigorov
On Tue, Jan 14, 2020 at 9:16 AM Maxim Solodovnik wrote: > Is this comment make sense: > > https://github.com/apache/wicket/commit/6d91a6a9e5c1d955a53571f9fb0f76262ac5c5d2#r36784645 > ? > Sounds good to me! > > On Tue, 14 Jan 2020 at 14:13, Martin Grigorov > wrote: > > > On Tue, Jan 14, 2020

Re: [wicket] branch csp updated: WICKET-6725: replace display:none by wicket--hidden css class

2020-01-14 Thread Martin Grigorov
On Tue, Jan 14, 2020 at 10:01 AM Maxim Solodovnik wrote: > An related question: > Will this code > > `org.apache.wicket.core.util.string.ComponentRenderer.renderComponent(Component)` > work as expected? > This method will render the component with class="wicket--hidden" on its HTML element.

Re: [wicket] branch csp updated: WICKET-6725: replace display:none by wicket--hidden css class

2020-01-14 Thread Maxim Solodovnik
An related question: Will this code `org.apache.wicket.core.util.string.ComponentRenderer.renderComponent(Component)` work as expected? On Tue, 14 Jan 2020 at 14:15, Maxim Solodovnik wrote: > Is this comment make sense: >

Re: [wicket] branch csp updated: WICKET-6725: replace display:none by wicket--hidden css class

2020-01-13 Thread Maxim Solodovnik
Is this comment make sense: https://github.com/apache/wicket/commit/6d91a6a9e5c1d955a53571f9fb0f76262ac5c5d2#r36784645 ? On Tue, 14 Jan 2020 at 14:13, Martin Grigorov wrote: > On Tue, Jan 14, 2020 at 9:05 AM Maxim Solodovnik > wrote: > > > Wasn't aware of `hidden` attribute > > (and it seems

Re: [wicket] branch csp updated: WICKET-6725: replace display:none by wicket--hidden css class

2020-01-13 Thread Martin Grigorov
On Tue, Jan 14, 2020 at 9:05 AM Maxim Solodovnik wrote: > Wasn't aware of `hidden` attribute > (and it seems to be widely supported > https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/hidden > ) > Thanks for the reference, Maxim! It says "elements that are descendants of a

Re: [wicket] branch csp updated: WICKET-6725: replace display:none by wicket--hidden css class

2020-01-13 Thread Maxim Solodovnik
Wasn't aware of `hidden` attribute (and it seems to be widely supported https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/hidden) Thanks :) On Tue, 14 Jan 2020 at 14:01, Martin Grigorov wrote: > Hi, > > 1) I see that such CSS resource might be used for other needs, not just >

Re: [wicket] branch csp updated: WICKET-6725: replace display:none by wicket--hidden css class

2020-01-13 Thread Martin Grigorov
Hi, 1) I see that such CSS resource might be used for other needs, not just this particular case but would it be an option to use "hidden" attribute in this case instead of CSS "display" ? 2) wicket-core.css instead of wicket-base.css ? On Mon, Jan 13, 2020 at 9:43 PM wrote: > This is an