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 style for the Select component #4405

Merged
merged 4 commits into from
Jan 3, 2024

Conversation

pkrasicki
Copy link
Contributor

Fix style for the Select component

Pull Request Type

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Related issue

Fixes #1804

Description

Fixes the width of dropdowns and changes their style a little bit.

Screenshots

light theme

dark theme

Testing

Testing dropdowns manually on settings page, channel view and in comment section with different window sizes.

Desktop

  • OS: Any
  • OS Version: Any
  • FreeTube version: 0.19.1 dev

Additional context

None.

Fixes FreeTubeApp#1804

Fixes the width of dropdowns and changes their style a little bit
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) November 29, 2023 13:26
@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Nov 29, 2023
@kommunarr
Copy link
Collaborator

I'll check this out. FYI, you can run npm run lint-fix to resolve the linting issues.

Copy link
Collaborator

@kommunarr kommunarr left a comment

Choose a reason for hiding this comment

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

praise: I think it's a positive change. It is more visually prominent, which some may not like, but I think that's ultimately a better choice for accessibility. It was sometimes difficult to see how wide the dropdown & its click area was before. I also did not encounter the original bug, so that looks good as well.

issue (pre-existing): This isn't a new issue with the ft-select component, but I do see that this particular one is unclickable on its bottom half (it's at the top of the comments section for a given video). This is most likely related to its placement rather than the component itself, but take a jab at this if you don't mind.
Screenshot_20231129_075853

chore (blocking): Just run the npm run lint-fix command (may have to do a soft git reset first) to resolve the linting issues.

auto-merge was automatically disabled November 29, 2023 14:26

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) November 29, 2023 14:26
@pkrasicki
Copy link
Contributor Author

I fixed the linting issues and the problem with sort dropdown in the comments section.

Copy link
Member

Choose a reason for hiding this comment

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

Noticed that the tooltip placement moved from just above the dropdown arrow.

ft

Capture

@pkrasicki
Copy link
Contributor Author

It's still at the end of the visible boundary. I think it would be a bit weird to move it:

dropdown-tooltip-moved

@efb4f5ff-1298-471a-8973-3d47447115dc

Maybe im a bit biased because i got used to that alignment but to me it looks more visually pleasing. If this is the better way to do it than we should definitely keep this. Lets wait for others to have a say in it.

@pkrasicki
Copy link
Contributor Author

Btw, I think it should be in the same position for dropdowns and input fields.

@kommunarr
Copy link
Collaborator

I think both look fine, although after looking at it for too long, the difference in right alignment is actually quite vexing to me. I'd probably prefer changing it, and see if making the left-aligned label have the same margin as the right makes things better or worse (probably worse, if I were to wager). I think the differing placement of the tooltips compared to ft-input is fine and makes sense based on width if the item below is addressed, but you can experiment with that.

nitpick (pre-existing): These should probably have a max-inline-size to prevent this type of stretching behavior. Ideally, this would be configurable as a prop to allow overrides.

Screenshot_20231130_073016

@pkrasicki
Copy link
Contributor Author

I think both look fine, although after looking at it for too long, the difference in right alignment is actually quite vexing to me. I'd probably prefer changing it, and see if making the left-aligned label have the same margin as the right makes things better or worse (probably worse, if I were to wager). I think the differing placement of the tooltips compared to ft-input is fine and makes sense based on width if the item below is addressed, but you can experiment with that.

I'm not sure I understand. What do you want me to do exactly?

nitpick (pre-existing): These should probably have a max-inline-size to prevent this type of stretching behavior.

They do. But someone wanted all dropdowns to be full-width on smaller resolutions: https://github.com/FreeTubeApp/FreeTube/blob/development/src/renderer/components/ft-select/ft-select.css#L156. I think it's a good thing, but maybe I would move the breakpoint to 680px. It's an issue of mobile layout, though.

@kommunarr
Copy link
Collaborator

Thanks for checking on that! I would trust @MarmadileManteater on that more than me, so you can keep that the same. For the first part, yes, I'm leaning towards @efb4f5ff-1298-471a-8973-3d47447115dc's suggestion.

@kommunarr
Copy link
Collaborator

Hi @pkrasicki, are you still good to implement that final suggestion?

@absidue absidue added PR: changes requested and removed PR: waiting for review For PRs that are complete, tested, and ready for review labels Dec 19, 2023
auto-merge was automatically disabled December 22, 2023 19:53

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) December 22, 2023 19:54
@pkrasicki
Copy link
Contributor Author

@jasonhenriquez done.

moved tooltip

@PikachuEXE
Copy link
Collaborator

Issue spotted but already exists in dev branch (i.e. not introduced by this PR)

at width ~901px
image

So the only diff is the select got a box like style?

@kommunarr
Copy link
Collaborator

kommunarr commented Jan 3, 2024

@PikachuEXE It also fixes the click area to match its visual area. Like when trying to click between the area between the bottom border and the arrow here.

Screenshot_20240102_185221

@PikachuEXE PikachuEXE mentioned this pull request Jan 3, 2024
4 tasks
@FreeTubeBot FreeTubeBot merged commit ead8fc2 into FreeTubeApp:development Jan 3, 2024
6 checks passed
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.

Dropdowns arent working properly
6 participants