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

fix(select): vertically center arrow #178

Merged
merged 2 commits into from
Jun 11, 2024

Conversation

tczhao
Copy link
Member

@tczhao tczhao commented Feb 10, 2022

fixes argoproj/argo-workflows#7789

center align select arrow, fixes hidden arrow on no text selection

left(old) -> right(new)
argo-workflow:
argo-workflow

argo-cd:
argocd

Signed-off-by: Tianchu Zhao <[email protected]>
Copy link
Member

@terrytangyuan terrytangyuan left a comment

Choose a reason for hiding this comment

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

Thank you! I'll let others to double check as I am not familiar with this repo.

@github-actions
Copy link

Stale pull request message

@github-actions github-actions bot added the problem/stale This has not had a response in some time label Apr 12, 2022
@github-actions github-actions bot closed this Apr 19, 2022
@agilgur5
Copy link
Contributor

agilgur5 commented Jun 8, 2024

@tczhao does the Workflows UI still have this issue? If so we can re-open and merge this

@tczhao
Copy link
Member Author

tczhao commented Jun 10, 2024

Hi @agilgur5 ,

Thanks for looking into this,
we still have this issue,
image

Let me test with the suggested changes

@tczhao tczhao reopened this Jun 10, 2024
@tczhao
Copy link
Member Author

tczhao commented Jun 10, 2024

We have the following

        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);

image


        position: absolute;
        top: 37%;
        right: 0;

image


        position: absolute;
        top: 0;
        right: 0;

image

@agilgur5
Copy link
Contributor

Oh boy, on my monitor, it turns out I've never even seen this arrow, which is probably why I was a little confused when I first looked at your screenshot.

top: 8px; -- the original. invisible/below the fold

top 8px original - Screenshot 2024-06-10 at 9 16 36 PM

top: 0; -- too low

top 0 - Screenshot 2024-06-10 at 9 13 17 PM

top: 50%; transform: translateY(-50%); -- just right

top 50 plus translate -50 -- Screenshot 2024-06-10 at 9 15 21 PM

@agilgur5 agilgur5 changed the title fix: center select arrow fix: vertically center select arrow Jun 11, 2024
@agilgur5
Copy link
Contributor

agilgur5 commented Jun 11, 2024

Gosh, my CSS is definitely a bit rusty; this is vertical centering, right, which is one of the most hacky CSS things, and this is a classic "technique" or workaround to achieve vertical centering.
top: 50%; transform: translateY(-50%); means half-way down, and then half of the element's own height back up -- see also this SO answer.

@agilgur5 agilgur5 changed the title fix: vertically center select arrow fix(select): vertically center arrow Jun 11, 2024
Signed-off-by: Anton Gilgur <[email protected]>
Copy link
Contributor

@agilgur5 agilgur5 left a comment

Choose a reason for hiding this comment

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

Thanks for fixing and double-checking!

@agilgur5 agilgur5 merged commit 00a8b57 into argoproj:master Jun 11, 2024
5 checks passed
@agilgur5 agilgur5 removed the problem/stale This has not had a response in some time label Jun 11, 2024
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.

UI: filter dropdown bar arrow is half hidden
3 participants