Closed (fixed)
Project:
Olivero
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
6 Apr 2020 at 15:38 UTC
Updated:
2 May 2020 at 13:56 UTC
Jump to comment: Most recent, Most recent file
The "text formats" area eats up too much vertical space. We should re-align the items, so they layout horizontally similar to how Bartik does it.
TBD: Can/should we make this specific <select> element shorter?


| Comment | File | Size | Author |
|---|---|---|---|
| #20 | 3125374-19.patch | 54.37 KB | mherchel |
| #19 | Снимок экрана 2020-04-16 в 15.51.08.png | 90.31 KB | kostyashupenko |
| #19 | interdiff_15-19.txt | 9.98 KB | kostyashupenko |
| #19 | 3125374-19.patch | 54.52 KB | kostyashupenko |
| #17 | Снимок экрана 2020-04-11 в 14.19.47.png | 30.36 KB | kostyashupenko |
Comments
Comment #2
hansa11 commentedComment #3
hansa11 commented@mherchel I agree, the text format block takes up too much space. If we rearrange it to something like Bartik or Classy, it would look like
The select box looks very large here, I think we should make it a bit smaller for the comments section.
We can have something like this:
Let me know if this would work so I'll start with the implementation or if we should get the designs for this.
Thanks!
Comment #4
mherchelAgree that the select box should be smaller... but lets keep the overall style. We can also make the direction list-item font-size smaller.
Comment #5
hansa11 commentedWhile working on this, I realized that we have attached the comments.css only for the twig comment.html.twig which is rendered only when we add a new comment and not when we Edit an existing comment.
So, the styles that are specific to comments (for instance making the select box smaller only for the comments section) will not reflect when we edit a comment.
I think we should add the comments.css in global-styling and the global classes like ".js-indented" which are in the comments.css can be wrapped in the comment specific parent class OR should we make another css file that works for global.
Please suggest!
Comment #6
mherchel@hansa11 - I don't want to move comments.css into global, however the styles for the "text formats" area should be global. Maybe under form.css
Comment #7
hansa11 commentedPatch details:
1. Smaller select box for text-area.
2. Smaller font sizes for the list items.
3. Moved the form select box variables to variables.scss.
Please review.
Thanks!
Comment #8
hansa11 commentedComment #9
kostyashupenkoHello @hansa11 !
Thanks for your patch, but i think styles for small select shouldn't be on the level of comment-form. I will try to explain what i mean:
- Base component is
form-elementand it is described inform-text.cssfile for selector.form-element. Andform-element--type-selectis a just of modifier ofform-elementelement. This modifier has only specific styles related to<select>, like arrow for example.- that means, if you need to have smaller select, you have to provide additional modifier for
form-element, likeform-element--small- then you describe new
min-heightproperty or whatever else for selector.form-element--smallinform-text.css- then if it is not enough, you have to write additional styles into
form-select.cssfor selector.form-element--type-select.form-element--smallNow how do add
form-element--smallclass to required select? I guess you have to alter that form and add this class fromolivero.themeComment #10
kostyashupenkoLook at here:

Select is a
form-element. Alsoform-elements are input[type="text"], or textarea for example. It is all has same styles, so if you need smallerform-element, just add modifier, likeform-element--smallorform-element--bigetc :)Comment #11
kostyashupenkoAlso i agree comments library shouldn't be global. If library is not loading somewhere - you can just attach it on needed preprocess hook.
Comment #12
hansa11 commented@kostyashupenko: Thanks for the review and the detailed explanation :)
I'll again take a look into this tomorrow morning.
Comment #13
hansa11 commentedAdded the modifiers & styles for text-format select box and the guidelines, please review.
Thanks!
Comment #14
kostyashupenko@hansa11 thanks for your patch, gonna review it now
Comment #15
kostyashupenko1. Was added
OliveroPreRenderclass and it is implemented in/src/OliveroPreRender.php. Same as Claro theme has actually ) They also did some modifications, related to text_format.2. About selectbox - i reworked it a little bit, i replaced
form-element--type-select--smallclass byform-element--small. Also added Error & Disabled cases for small selectbox.3. About filter guidelines - template of filter module was overriden, and styles for that filter applies now not globally, but from that template. Pretty similar again to how it was done in Claro.
4. Added new variable
--sp0-75: calc(0.75 * var(--sp));since it's pretty good looking with small form-elements and its paddings.I believe we can merge it now
Comment #16
kostyashupenkoSo now if you need somewhere small form-element, just add
form-element--smallclass to expected textable input/selectComment #17
kostyashupenkoCouple screenshots:


1.
2.
Comment #18
kostyashupenkoComment #19
kostyashupenkoMuch improved text formats area, based on Claro.
Comment #20
mherchelRe-roll
Comment #21
mherchelThis looks good! I personally like when multiple background values are each on their own line (and this works with linting), but we can do this later.
Committed!