You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[EuiFormControlLayoutDelimited] Compressed layout breaks text inputs #5958
Hi @Zacqary According to the examples in our docs, using the raw EuiFormControlLayoutDelimited requires passing raw <input /> elements, not our fully fledged EuiFieldText/Number components:
Example:
<EuiFormControlLayoutDelimitedprepend={<EuiFormLabel>Add</EuiFormLabel>}compressedstartControl={<inputtype="number"placeholder="0"className="euiFieldNumber"aria-label="Use aria labels when no actual label is in use"/>}delimiter="+"endControl={<inputtype="number"placeholder="100"className="euiFieldNumber"aria-label="Use aria labels when no actual label is in use"/>}/>
No worries! I'm on FF 101.0.1 on macOS 11.6 and the CodeSandbox that Caroline linked is fine for me. My best guess is that there may be some custom CSS overrides in your app causing the alignment or height issues, or possibly even a custom browser extension. If not, then a CodeSandbox repro would be great.
It's not occurring in latest main because I wrapped the EuiFormControlLayoutDelimited in a div with some workaround CSS. You can get it to occur on main by commenting out that workaround.
I've been sitting here for the last half hour or so comparing @cchaos's CodeSandbox against Kibana and I gotta say it's been a very long time since I've been this absolutely baffled. The CSS and markup is pretty much exactly the same, FF is reporting the same box model and computed info.... I actually literally have no idea why this is working on our Codesandbox in native EUI - it shouldn't be. (EDIT: To clarify, I can repro the issue in Kibana on MacOS Firefox as well as Chrome and Safari)
Honestly, looking at the output DOM and CSS, I'm seeing a lot of unnecessary repetition and nesting (e.g., .euiFormControlLayout__childrenWrapper present twice, height: 100% present twice and unnecessarily overriding height: 40px, etc.). Since @Zacqary has a CSS workaround/override in the meanwhile, I'm tempted to say we should address this in our conversion of EuiFormControlLayoutDelimited to Emotion and clean up a good deal of the markup and CSS then.
I took a pass but also cannot find a root issue. I did compare the computed styles on .euiFormControlLayout__childrenWrapper between the code sandbox & kibana which found these differences:
@Zacqary I'm not seeing the workaround in Kibana at this point, so I'm assuming a different UI/UX was taken that no longer necessitates it? This behavior should now be fixed as of the EuiForm Emotion conversion and once elastic/kibana#190752 merges in, but please let us know if that's not the case!
👋 This issue hasn't seen activity in 3 days, so we're automatically closing this issue as answered. Please leave a comment if that's not the case, or if you have any remaining questions or issues.
Activity
cchaos commentedon Jun 7, 2022
Hi @Zacqary According to the examples in our docs, using the raw EuiFormControlLayoutDelimited requires passing raw
<input />elements, not our fully fledged EuiFieldText/Number components:Example:
cchaos commentedon Jun 7, 2022
Though, I also just tested in a CodeSandbox using our field components directly, and they work just fine. https://codesandbox.io/s/agitated-water-bbfo96?file=/demo.tsx
Can you possibly provide more context on your implementation or alter the above codesandbox to reproduce what you ran into?
cee-chen commentedon Jun 8, 2022
Looks like it may possibly be a cross browser input rendering issue? Do you mind specifying your OS and browser?
Zacqary commentedon Jun 17, 2022
Sorry for the delay on responding. Saw this issue on Firefox 102.0b9 for Mac. Will add more context after the weekend.
cee-chen commentedon Jun 20, 2022
No worries! I'm on FF 101.0.1 on macOS 11.6 and the CodeSandbox that Caroline linked is fine for me. My best guess is that there may be some custom CSS overrides in your app causing the alignment or height issues, or possibly even a custom browser extension. If not, then a CodeSandbox repro would be great.
Zacqary commentedon Jun 20, 2022
Testing again and the issue seems to have resolved itself. Not sure what was going on, but I can close this for now.
Zacqary commentedon Jul 8, 2022
So actually this is still in fact happening, I was mistaken. Here's how to reproduce:
RepeattoCustomcee-chen commentedon Jul 8, 2022
@Zacqary Just to confirm, has the linked commit been merged in / is this occurring on latest Kibana main?
Zacqary commentedon Jul 8, 2022
It's not occurring in latest main because I wrapped the
EuiFormControlLayoutDelimitedin a div with some workaround CSS. You can get it to occur on main by commenting out that workaround.cee-chen commentedon Jul 9, 2022
I've been sitting here for the last half hour or so comparing @cchaos's CodeSandbox against Kibana and I gotta say it's been a very long time since I've been this absolutely baffled. The CSS and markup is pretty much exactly the same, FF is reporting the same box model and computed info.... I actually literally have no idea why this is working on our Codesandbox in native EUI - it shouldn't be. (EDIT: To clarify, I can repro the issue in Kibana on MacOS Firefox as well as Chrome and Safari)
Honestly, looking at the output DOM and CSS, I'm seeing a lot of unnecessary repetition and nesting (e.g.,
.euiFormControlLayout__childrenWrapperpresent twice,height: 100%present twice and unnecessarily overridingheight: 40px, etc.). Since @Zacqary has a CSS workaround/override in the meanwhile, I'm tempted to say we should address this in our conversion ofEuiFormControlLayoutDelimitedto Emotion and clean up a good deal of the markup and CSS then.chandlerprall commentedon Jul 11, 2022
I took a pass but also cannot find a root issue. I did compare the computed styles on
.euiFormControlLayout__childrenWrapperbetween the code sandbox & kibana which found these differences:console.log(JSON.stringify(window.getComputedStyle($0), null, 2))Doesn't point to what is causing the difference, but the perspective/transform origin might be interesting? The 20px/8.5px ratio matches 40px/17px.
I moved things around, disabled various style & link elements, added & removed rules, but nothing stands out to me 😕
daveyholler commentedon Dec 5, 2022
@constancecchen recommends addressing this in the Emotion conversion
cee-chen commentedon Aug 27, 2024
@Zacqary I'm not seeing the workaround in Kibana at this point, so I'm assuming a different UI/UX was taken that no longer necessitates it? This behavior should now be fixed as of the EuiForm Emotion conversion and once elastic/kibana#190752 merges in, but please let us know if that's not the case!
github-actions commentedon Aug 31, 2024
👋 This issue hasn't seen activity in 3 days, so we're automatically closing this issue as answered. Please leave a comment if that's not the case, or if you have any remaining questions or issues.