Skip to content
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

Merged
merged 4 commits into from
Feb 7, 2024
Merged

Conversation

vitvakatu
Copy link
Contributor

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:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • All code has been tested:
    • Unit tests have been written where possible.
    • If GUI codebase was changed, the GUI was tested when built using ./run ide build.

@vitvakatu vitvakatu added CI: No changelog needed Do not require a changelog entry for this PR. -gui labels Feb 2, 2024
@vitvakatu vitvakatu self-assigned this Feb 2, 2024
Comment on lines 135 to 137
const childWidgetRef = ref<HTMLElement>()
const childSize = useResizeObserver(childWidgetRef)
const arrowPos = computed(() => (childSize.value != null ? childSize.value.x / 2 : 0))
Copy link
Contributor

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 ?

Copy link
Contributor

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%;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@vitvakatu vitvakatu requested a review from farmaazon February 7, 2024 13:23
@vitvakatu vitvakatu added the CI: Ready to merge This PR is eligible for automatic merge label Feb 7, 2024
@mergify mergify bot merged commit 8517911 into develop Feb 7, 2024
27 checks passed
@mergify mergify bot deleted the wip/vitvakatu/arrow-for-dropdowns branch February 7, 2024 14:59
mergify bot pushed a commit that referenced this pull request Feb 12, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-gui CI: No changelog needed Do not require a changelog entry for this PR. CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants