Closed (fixed)
Project:
BS Base
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
6 Mar 2017 at 22:34 UTC
Updated:
16 Jun 2017 at 09:19 UTC
Jump to comment: Most recent, Most recent file
Currently we are not properly defining all form elements to be aligned with Bootstrap HTML/CSS code.
We should cover all basic form elements from https://v4-alpha.getbootstrap.com/components/forms
None.
None.
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #24 | numbers.png | 11.15 KB | thenchev |
| #24 | clearfix.png | 37.97 KB | thenchev |
| #24 | invisible weight number.png | 61.52 KB | thenchev |
| #24 | first element displaced.png | 54.84 KB | thenchev |
| #23 | improve_form_bs_support-2858262-23.patch | 11.52 KB | pivica |
Comments
Comment #2
pivica commentedComment #3
pivica commentedComment #5
pivica commentedComment #6
pivica commentedComment #7
pivica commentedComment #8
pivica commentedFor now last things that needs to be done before closing this issue are
Comment #9
thenchev commentedWorking on those 3 remaining tasks.
Comment #10
thenchev commented1. Done the star indicator.
As for the validation sates I think they will require the experimental inline error module. Doesn't look easy to cover all elements. Here is how it looks now with the module
2. What exactly are the problems with rendering? Can I get some pictures? Looks fine on my side.
3. File browser is implemented.
Comment #11
thenchev commentedCheckboxes no longer f'd up.
before:
after:
Comment #12
pivica commentedThis should be a variable and not hard coded color value - check for BS danger/warning or some appropriate color value that already exist.
Why are we having here custom code? Why are we not including bootstrap/sass/_custom_forms.scss?
Also instead of .form-file class why we are not using BS .custom-file-input which looks that is doing same thing?
Also lots of hardcoded variables - even with custom code we should avoid hard values but use our custom variables. Not relevant in this case if we are going to use bootstrap sass file for this.
Missing new line.
Comment #13
pivica commentedWhile testing this i found additional related problems, created two follow ups #2878380: Improve inline form error support, #2878378: Visual look of multi file field is not good.
Comment #14
thenchev commentedCovered #12
Now a lot of code is removed. Had to override only the .custom-file-control. Is there no way to somehow turn off how bootstrap tries to handle translation?
Comment #15
pivica commentedOkey lang(en)?
Why do we have language dependent selector? We will build lots of multilingual sites so this will not work like this.
Ah i see i guess per each language you offer different content.
But i think we do not need this, we can provide translatable data-content attribute in twig and translate there the string so we do not need selector per language i guess, right?
Yeah its here, we already translate the stuff so we should not need CSS selector based on language.
Comment #16
thenchev commentedThe reason
is here because i need to override bootstraps selector, because i need to have this content: attr(data-content); in order to have our values from twig that are translated. Didn't know how else to do it except to override it like this... left a comment above about language handling.
I think i tried .custom-file-control::after, without the lang(en) part, but bootstraps selector with language took its place... i will check again if i can get around this. Maybe use another class for this...?
Comment #17
thenchev commentedOk, when i first tried i left the loop in sass and just removed the lang part. With this it appears it works.
Comment #18
pivica commentedWe still have this stuff in generated CSS.
Why don't you just override $custom-file-text BS var, and set it to empty map or null what ever works better?
Comment #19
thenchev commentedLike this it works.
Comment #20
pivica commentedCouple of small things still...
Missing line break in comment because of more then 80 lines.
This override should actually go to _bootstrap.scss because this is not custom variable form bs_bootstrap theme.
And don't forget !default property.
Comment #21
thenchev commented#20 1. and 2.
Comment #22
pivica commentedWhy is this removed?
Here also, removed?
This also look as a code that is removed but its not related to this issue, why? If this is really not needed and vertical spacing between form elements is fine, then its fine.
Comment #23
pivica commentedHere is a new patch.
1, 2, 3 from comment 22 addressed.
Beside that next things are done
@Denchev can you please do review and test of this - i would really like to close this issue properly sooner then later ;)
Comment #24
thenchev commentedTested on arch Linux with chrome browser.
Looks a lot better with the patch. Here are some visual problems I had.
1. When you display the weight its not aligned right:
2. On smaller displays the weight numbers disappear
3. This might not be related to this issue but when you edit a node this is how the vertical tabs at the bottom look like:
missing clearfix or something?
4. Last thing is that the negative number are moved to the right a bit?
do we need some new issues for these?
Comment #25
pivica commented1. and 2. we already have an issue for that #2878378: Visual look of multi file field is not good - can you move this stuff there please? Also we should not do 2878378 until #2868082: Add BS responsive table support is done because we need proper responsive table support first for multifields also.
> 3.
bs_bootstrap is not an admin theme i would say, but for sure it should support admin forms as much as possible. Can you create a follow up for this for alpha2, and if we want to support admin forms better then we need to do also drop button support better - that 'Save and keep published' button - can you add one more follow up for this in alpha2 meta issue.
Also no clearfix hacks please any more - they are needed for float layout model which we do not use. It is more likely that that vertical tabs have float somewhere which is messing with layout - we should remove that float if possible and change it with flex model. If this is too much work then its fine we temporary add clearfix for this.
> 4.
Can we move this also to #2878378: Visual look of multi file field is not good or to a separate follow up for alpha2.
Comment #26
thenchev commentedUpdated #2878378: Visual look of multi file field is not good here
Followups:
#2882696: [META] Support for admin forms/pages
#2882706: Displaced numbers in a dropdown
Comment #28
pivica commentedTested this in detail one more time - got some more ideas while reviewing code and created couple of more issues :)
Also improved form layout a little bit more - added vertical margins between form items and similar.
This is committed finally (jay :) and all followups are looking good so closing this one, thx for all the work.