Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore(site): refactor filter component to be more extendable#13688

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
BrunoQuaresma merged 16 commits intomainfrombq/merge-search-and-search-field
Jul 2, 2024

Conversation

BrunoQuaresma
Copy link
Collaborator

Related to#13035

@BrunoQuaresma
Copy link
CollaboratorAuthor

@aslilac@Parkreiner I would appreciate a QA on this too 🙏

@Parkreiner
Copy link
Member

@BrunoQuaresma I'll definitely start the review later today, but just because this is such a core piece of the app, I'm really going to want to take my time with testing it out locally

Might not be able to start that until tomorrow morning, but I'll try to get review and testing wrapped up by EOD tomorrow

Copy link
Member

@ParkreinerParkreiner 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 so far!
I'm going to try running this tomorrow morning

BrunoQuaresma reacted with thumbs up emoji
Comment on lines 34 to 35
// SelectFilterSearch element
search?: ReactNode;
Copy link
Member

Choose a reason for hiding this comment

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

Could this prop be renamed to make it more clear that it's meant to be used withSelectFilterSearch? It doesn't feel obvious right now, especially with the comment being a private comment

BrunoQuaresma reacted with thumbs up emoji
Copy link
CollaboratorAuthor

Choose a reason for hiding this comment

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

When usingSelectFilterSearch I feel I have to pass the component and not a React Node 🤔 MaybeselectFilterSearch?

Comment on lines 56 to 57
{selectedOption?.label ?? placeholder}
<span css={{ ...visuallyHidden }}>{label}</span>
Copy link
Member

@ParkreinerParkreinerJun 27, 2024
edited
Loading

Choose a reason for hiding this comment

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

Can you explain what you were going for with this? From how I'm reading it, if theselectedOption has a label, then both it and the visually-hidden label in the span will be exposed through the button as an accessible name value. So in that case, a screen-reader user might get double/redundant labels

If it's okay for the main visual label text to be hidden from screen readers, this could be rewritten as

<spanaria-hidden>{selectedOption?.label??placeholder}</span>

This hides it from screen readers, but keeps the content on the page. Normally this is a really bad idea, but as long as we have the backup label guaranteed to be defined, I think it's okay

Edit:aria-hidden, nothidden

Copy link
CollaboratorAuthor

Choose a reason for hiding this comment

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

I didn't notice it 🤦 My idea is, since this is a select component, I think having a label like "Select a user" is better than having the selected value as the label "User 2" for example.

Copy link
CollaboratorAuthor

Choose a reason for hiding this comment

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

I usedaria-label in the button directly.

Co-authored-by: Michael Smith <throwawayclover@gmail.com>
@Parkreiner
Copy link
Member

@BrunoQuaresma Ran through and tested everything. Everything seems to work really well. Only noticed one minor quirk when using the menus via keyboard

When the menu opens up, it would be nice if the first element in the menu gets autofocus (for the list-only dropdowns, that would be the first item, but for the search dropdowns, that would be the search box). Without the auto-focus, trying to hit the arrow keys just makes the menu scroll instead of interacting with the elements

Screen.Recording.2024-06-28.at.10.36.47.AM.mov

Even for non-keyboard users, auto-focusing the search field feels like a pretty good UI improvement, because it means one less click that they need to do

BrunoQuaresma reacted with thumbs up emoji

Copy link
Member

@ParkreinerParkreiner left a comment

Choose a reason for hiding this comment

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

Gonna go ahead and approve this – the core redesign seems really good, and none of the feedback seems big enough to be worth blocking on

@BrunoQuaresma
Copy link
CollaboratorAuthor

@Parkreiner I would appreciate a second round of review if possible 🙏 . Related to autofocus, it does not work locally, but to make sure I'm going to test it on a preview deployment. Thanks for the heads up.

@codercoder deleted a comment fromgithub-actionsbotJul 1, 2024
@github-actionsGitHub Actions
Copy link


🚀 Deploying PR 13688 ...

github-actions[bot] reacted with eyes emoji

Copy link
Member

@ParkreinerParkreiner left a comment

Choose a reason for hiding this comment

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

Did a quick look over the new files, and the code looks pretty good to me. I know you're usingsplice now, but it looked like was still using immutable operations, so we're good

Tentatively giving my rubber stamp – not sure if@aslilac wants to kick the tires a bit more?

@BrunoQuaresma
Copy link
CollaboratorAuthor

Looks like preview deployments are broken so I'm going to merge it and test "auto focus" on dogfood.

Copy link
Member

@aslilacaslilac 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! couple small thoughts

BrunoQuaresma reacted with heart emoji
@BrunoQuaresmaBrunoQuaresma merged commit9ee53e5 intomainJul 2, 2024
29 checks passed
@BrunoQuaresmaBrunoQuaresma deleted the bq/merge-search-and-search-field branchJuly 2, 2024 16:15
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJul 2, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@aslilacaslilacaslilac approved these changes

@ParkreinerParkreinerParkreiner approved these changes

Assignees

@BrunoQuaresmaBrunoQuaresma

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@BrunoQuaresma@Parkreiner@aslilac

[8]ページ先頭

©2009-2025 Movatter.jp