VS Code only displays 1 row of possible import paths. How do i convert back it to default listbox? - visual-studio-code

I think I made some setting changes in vs code which made my import statements look like this.
The default VS code import preview shows 3 or more paths.
What would be the option I should change to revert it back to the default list box view?
My settings.json

The last vscode update to v1.51 added the ability to change the size, height and width, of the suggestion box. It also seems to have set the box height to one lineHeight for some people. There is a command in the command palette to reset the suggestion widget's dimensions:
Reset Suggest Widget Size that should fix your situation.
You can also drag the lower boundary of the box down (or the right edge left and right) to change its dimensions.
The old setting that set the suggest widget's height to some user-defined number of entries (I believe the default was 12) is now gone. If you change its height or width (as well as the width of the extra info flyout box connected to the suggestion widget) that change should be remembered.

Related

Unexpected unity HorizontalLayout behavior when using spacings and/or paddings

I've build simple chat UI where instead of text input you have options for my game. And it works. Kind of. The problem is when adding elements instead of just shrinking already existing elements to keep spacing and padding HorizontalLayout additionaly expands itself.
With 1 Element
With 2 Element
Sidebar's width with 1 element
Sidebar's width with 2 elements
Chat UI Inspector
Main Section Inspector
Sidebar Inspector
Responses Box Inspector
i.stack.imgur.com/AQSLW.png (Can't upload > 8 links)
As you can see width of sidebar decreased on the second screenshot.
The question: How do i keep HorizontalLayout's width without disabling paddings and spacing?
I have already tried: Messing around with other layout elements, but it seems that problem exists only when paddings and/or spacings are set.

Why does the same exact material-ui text field's height shrink in one spot and not another?

I am using the Material UI Text Field component as a search bar in my app. On one of the pages, I have it in 2 spots, one on the outside of the page, and another inside my DevExtreme Data Grid.
See here
For whatever reason, this shrinks the search bar, despite it being the exact same component being used in 2 spots.
My question is, what causes MUI to shrink the height of their text input field so that I can fix it accordingly inside of my data grid?
I've tried adjusting line-height, padding, margin's, etc all inside the data grid, unfortunately to no avail. The only thing I've noticed is that deep in the inspector tool, the shrunken search bar has a height of 1.435em, and checking that off will cause the search bar to correct itself to the standard height.

Dynamically Resize Controlled TinyMCE React Component

Background: we have TinyMCE React inside a few contexts where the parent element is manually resized by the user (resizable modal dialog, etc.) and we want the TinyMCE component to resize appropriately. In older versions, we did this using the resizeTo functionality documented here. However, that no longer seems to be available after the upgrade.
My previous attempt to resolve this involved using a key based on concatenating the width and height of the editor with a debounce while it was resizing. Basically, whenever the size changed by enough, I tore down the old component and rendered a new one whose config options included the new size. While this is largely effective, it causes an issue where, when you attempt to edit the field after resizing, it flickers and loses focus initially.
Unfortunately, we are using pixel-based size calculations, so specifying the height in percentages instead of pixels won't work.
What is the new official way to do this? Ideally, there would be some new version of editor.theme.resizeTo that we could use instead and dispatch with the key-based solution entirely, but I was unable to find it in any of the documentation.
Just wrap the editor in a div which has the calculated height and width, and then set the editor to height and width of 100%.

CodeMirror: auto-resize horizontally, without scrollbar

I need a CodeMirror editor which starts with a certain width and then grows automatically to the right to match the maximum line length. I.e. roughly what CodeMirror does when height is set to auto, but with width.
Here's a self-contained example. The editor grows automatically along the y-axis fine, but not along the x-axis. By tweaking the CSS, I can either have a fixed width editor with a scrollbar, or one which fills the entire width of the browser, but not one which grows as you type. I assume overflow-x is relevant, but I don't understand how it interacts with other CSS size properties set on parent elements. I also tried setting that property on CodeMirror-scroll, but it didn't help.
I believe this can be done using CSS properties alone. In fact I have this behaviour in my application already, but growing to the left, rather than the right, but I don't understand why it happens, or how to reproduce it in a small example.
This question is essentially the same, but for the vertical scrollbar.
Simply add float:left to the CodeMirror div.
<div id="here" style="float:left"></div>
This is not something CodeMirror supports. You may be able to get something working by setting .CodeMirror's width to (-webkit-)fit-content, but there will likely be corner cases where this breaks the scrollbars or cursor placement.

How to set initial size of a TreeViewer?

I'm using a TreeViewer within a jface WizardPage and the initial input into the tree causes the WizardPage to grow vertically so that it can show all of the tree's values. When expanding one of the tree's values, then the vertical scrollbar works as expected. I'd like to be able to set the tree's size initially so that it is fixed and the scrollbar is already shown when the WizardPage is first drawn, but doing this isn't particularly obvious to me - the setSize method on the TreeViewer's Tree doesn't seem to do anything.
Any help would be appreciated!
Just for the records for this old question:
We solve this problem in our applications by using an own layout manager which we can set fixed sizes for certain controls (with Swing we had done that by using component.setPreferredSize(size)). If no such fixed size is used, we calculate the preferred size of the control while performing the layout. This prevents making controls getting more and more space depending on the control's content when the user resizes the application window or dialog.