-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a small arrow for dropdowns #8950
Conversation
const childWidgetRef = ref<HTMLElement>() | ||
const childSize = useResizeObserver(childWidgetRef) | ||
const arrowPos = computed(() => (childSize.value != null ? childSize.value.x / 2 : 0)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't quite like that we position this arrow in a programmatic way. Perhaps we could do some CSS trick here @Frizi ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could. The arrow could be centered by CSS in many ways. Here probably the esasiest would be margin: 0 auto;
, or left: 50%; margin-left: -50%;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Closes #8932 Now we use a bit more robust mechanism for passing dynamic configuration down the widget tree inside dropdowns, no longer relying on the `label`s used for dropdown items. Curiously, we still need to use a hotfix implemented earlier, as we won’t have info about the currently selected item otherwise. Highlight for the currently selected item is not crucial as proper dynamic config, so we can leave with the current solution in the meantime. No visual changes to the IDE, apart from fixed highlight for currently selected item. # Important Notes Target branch: #8950, for easier testing.
Pull Request Description
A temporary solution for #8949. Not pretty, but it solves the issue for now.
arrows.for.dropdowns.mp4
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
./run ide build
.