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

Emoji picker example improvements #833

Merged

Conversation

jaredoconnell
Copy link
Contributor

This PR includes improvements to page selector.

Specifically it now shows the full percentage range instead of just the start of it, and it hides the buttons when you reach the end of the range.

For some reason it panics when I get to the end.

@jaredoconnell jaredoconnell requested a review from DJMcNab January 17, 2025 18:00
@DJMcNab
Copy link
Member

DJMcNab commented Jan 17, 2025

The panic is as discussed in #831, and is unrelated. It's the equivalent of #761 but for hover

@PoignardAzur
Copy link
Contributor

Panic should be fixed by #834.

@jaredoconnell jaredoconnell force-pushed the emoji-picker-improvements branch from 5405e6d to 53af04e Compare January 19, 2025 22:36
@jaredoconnell jaredoconnell marked this pull request as ready for review January 19, 2025 22:36
Copy link
Member

@DJMcNab DJMcNab left a comment

Choose a reason for hiding this comment

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

Thanks! This is nice


flex((
// TODO: Expose that this is a previous page button to accessibility
button("<-", move |data| {
*data = current_start.saturating_sub(count_per_page);
(current_start != 0).then(|| {
Copy link
Member

Choose a reason for hiding this comment

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

Ideally, we'd disable the button instead of hiding it, but that's not currently exposed to Xilem (it will likely end up looking similar to transform)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had the same thought. Hopefully it won't be too much overhead to implement disabling widgets in the future.

Copy link
Member

Choose a reason for hiding this comment

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

Whilst we're here, could we increase the font size on the buttons (which is possible since #797)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. It looked bad so I got the idea of using emoji. This isn't great for universal compatibility, but of all examples this is the most appropriate. This may even help with default accessibility.
image

Copy link
Member

Choose a reason for hiding this comment

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

(I also meant the buttons associated with each option)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That makes sense. Pushed. It's definitely even better now.

Copy link
Member

@DJMcNab DJMcNab left a comment

Choose a reason for hiding this comment

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

This breaks down a little bit on horizontal Android, but overall that's not worth worrying about. Thanks!

@jaredoconnell
Copy link
Contributor Author

This breaks down a little bit on horizontal Android, but overall that's not worth worrying about. Thanks!

Good to know. A long-term goal is definitely to improve responsiveness. I'll be available to review a follow up PR if you choose to do that.

@jaredoconnell jaredoconnell added this pull request to the merge queue Jan 20, 2025
Merged via the queue into linebender:main with commit a6ba563 Jan 20, 2025
17 checks passed
@jaredoconnell jaredoconnell deleted the emoji-picker-improvements branch January 20, 2025 17:05
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.

3 participants