Open carlosrovira opened 5 years ago
I'm using the following media query as a workaround:
@media only screen and (max-width: 600px) {
.algolia-autocomplete .ds-dropdown-menu {
box-shadow: none;
}
.algolia-autocomplete .ds-dropdown-menu [class^=ds-dataset-] {
max-width: 75%;
}
}
This works well with my layout where for screens <= 600px I have the search bar on the top left. May need further modifications for different layouts.
Thanks @radusuciu It worked for the size. But popup is getting off the screen. In iPhone I can only see 30%. I'll need to center it. Do you find that problem? thanks for your solution :)
@carlosrovira is https://github.com/algolia/docsearch/issues/181#issuecomment-301730219 helping with your issue?
Hi @s-pace, locally resizing I can see the solution but trying from mobile (iPhone) I'm not seeing the changes. Can you try this url [1] and let me know if it works for you?
Thanks
Thanks @radusuciu It worked for the size. But popup is getting off the screen. In iPhone I can only see 30%. I'll need to center it. Do you find that problem? thanks for your solution :)
You're using Safari I assume? I don't have an iPhone and so can't test on the actual device.. my guess is that some css property is not supported on Safari. Screenshots would help.
Hi @radusuciu, right, I'm using Safari on iPhone. I tried right now on iPhone Chrome, and results are the same in our site [1].
Thanks
For the TypeScript site I reduced the min-width
on .algolia-autocomplete .ds-dropdown-menu
to be 400px
. It still works reasonably well if a little tight occasionally
Hi @orta, did you try it in iOS device? your screenshot is from safari. That works ok for me. The problem comes when browsing from an iPhone. Thanks!
Yep, I just had that screenshot laying around. Here's my PR adding it - https://github.com/microsoft/TypeScript-Website/pull/106
This is a good solution for mobile:
.algolia-autocomplete {
width: 100%!important;
}
.algolia-autocomplete .ds-dropdown-menu {
width: 100%!important;
max-width: 100%!important;
min-width: 0!important;
}
Do you want to request a feature or report a bug?
This can be both, since don't know how much responsiveness is implemented in UI code.
What is the current behavior?
I'm trying to improve usability in docs pop out list for mobile versions. The popuout is too width and overflows the mobile screen by the left side. So I need to improve that. But don't know how I can do, or if there's some guide or styles that I can use. If you have something please let me know.
You can see It at: https://apache.github.io/royale-docs
You must reduce browser width below 600px to see mobile version (with a black right panel that can be open in the right)
The main problem is that I see a span element is created with style attribute in html. And I think I have no control over it
This is the code generated, in red the style that I assume I have no control over it:
Thanks in advance for your help!! :)
If the current behavior is a bug, please provide all the steps to reproduce and a minimal JSFiddle example or a repository on GitHub that we can
npm install
andnpm start
.I think more easy is just see It at: https://apache.github.io/royale-docs
You must reduce browser width below 600px to see mobile version (with a black right panel that can be open in the right)
What is the expected behavior?
Pop out list adapt to screen width and looks good instead of overflow