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

feat(web): search filter form #6651

Merged
merged 37 commits into from Feb 2, 2024
Merged

feat(web): search filter form #6651

merged 37 commits into from Feb 2, 2024

Conversation

alextran1502
Copy link
Contributor

@alextran1502 alextran1502 commented Jan 26, 2024

Dark

Light

Copy link

cloudflare-pages bot commented Jan 26, 2024

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5a4869a
Status: ✅  Deploy successful!
Preview URL: https://653f9f53.immich.pages.dev
Branch Preview URL: https://feat-new-search-form.immich.pages.dev

View logs

@alextran1502 alextran1502 marked this pull request as ready for review February 2, 2024 04:18
@@ -2,27 +2,37 @@
// Necessary for eslint
/* eslint-disable @typescript-eslint/no-explicit-any */
type T = any;

export type Type = 'button' | 'submit' | 'reset';
Copy link
Contributor

Choose a reason for hiding this comment

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

there is probably a provided type for this already. HtmlButtonElement['type'] or something

<!-- SEARCH HISTORY BOX -->
{#if showHistory}
<SearchHistoryBox
on:clearAllSearchTerms={clearAllSearchTerms}
Copy link
Contributor

Choose a reason for hiding this comment

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

I would probably prefer an interface of:

clear: string?

Omitting the term implies clear all. And then just have on:clear={({ detail: term }) => handleClear(term)}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

One is for clearing the individual search term, one is for clearing all of the terms.

Are you thinking that if we do not pass in the term, we will clear all?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes

Copy link
Contributor

@jrasm91 jrasm91 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@danieldietzler danieldietzler left a comment

Choose a reason for hiding this comment

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

LGTM!

@alextran1502 alextran1502 merged commit 2d278d9 into main Feb 2, 2024
24 checks passed
@alextran1502 alextran1502 deleted the feat/new-search-form branch February 2, 2024 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants