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

Improve Seekbar mouse handling #658

Merged

Conversation

stonko1994
Copy link
Collaborator

@stonko1994 stonko1994 commented Dec 10, 2024

Description

Revert Seekbar to its current state on development and apply new style by adding a new container element for all bars.

Problem

Currently, the mouse interactions are bound to the container element of the seekbar. This comes with a problem that the mouse events are also applied to the SeekbarLabel, which should not be the case. Also, the hitbox for seeking becomes smaller and the playback position marker no longer acts as a seeking handle.

Changes

To fix this problem while keeping the new design approach, I added another container around all 'bars' inside the seekbar. Therefore the mouse events can stay where they are and this new container can be used for the new styling (mainly for the rounded corners)

Checklist (for PR submitter and reviewers)

  • CHANGELOG entry A general entry will be added at the end

@stonko1994 stonko1994 force-pushed the feature/improve-seekbar-interaction branch from ef2ce06 to 0f1d5ec Compare December 10, 2024 20:38
cursor: pointer;
font-size: 1em;
height: $seekbar-height;
margin: calc((1em - $seekbar-height) / 2) 0;
overflow: hidden;
Copy link
Collaborator Author

@stonko1994 stonko1994 Dec 10, 2024

Choose a reason for hiding this comment

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

Having the overflow hidden here breaks the playback position marker as it is bigger than this container. As a workaround initially we rendered the position marker outside of the seekbar and added the mouse handler to the container as well. This breaks some other UX functionalities. See details in the PR description.

@stonko1994 stonko1994 marked this pull request as ready for review December 10, 2024 20:39
@Andr3wid Andr3wid self-requested a review December 11, 2024 08:23
Copy link
Contributor

@Andr3wid Andr3wid left a comment

Choose a reason for hiding this comment

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

Looks good 👌

Base automatically changed from feature/super-modern-ui-for-web to feature/modern-ui-base December 11, 2024 16:34
@stonko1994 stonko1994 merged commit 67735c4 into feature/modern-ui-base Dec 11, 2024
3 checks passed
@stonko1994 stonko1994 deleted the feature/improve-seekbar-interaction branch December 11, 2024 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants