-
Notifications
You must be signed in to change notification settings - Fork 3
Mobile search form styling #91
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
Changes from all commits
afa6988
54ddb63
dbef0ca
4dfd165
696f11f
2e21059
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,10 +39,11 @@ export function SearchBar({ | |
| <Form | ||
| method="GET" | ||
| action={action} | ||
| className="flex flex-wrap items-center justify-center gap-2" | ||
| className="flex flex-col gap-3 sm:flex-row sm:flex-wrap sm:items-end sm:justify-between" | ||
| onChange={(e) => autoSubmit && handleFormChange(e.currentTarget)} | ||
| > | ||
| <div className="flex-1"> | ||
| <div className="flex w-full items-center gap-2 sm:flex-1"> | ||
| <div className="min-w-0 flex-1"> | ||
| <Label htmlFor={id} className="sr-only"> | ||
| Search | ||
| </Label> | ||
|
|
@@ -54,14 +55,22 @@ export function SearchBar({ | |
| placeholder="Search" | ||
| className="w-full" | ||
| autoFocus={autoFocus} | ||
| /> | ||
| /> | ||
| </div> | ||
| <StatusButton | ||
| type="submit" | ||
| size="icon-lg" | ||
| status={isSubmitting ? 'pending' : status} | ||
| className="shrink-0" | ||
| > | ||
| <Icon name="magnifying-glass" size="md" /> | ||
| <span className="sr-only">Search</span> | ||
| </StatusButton> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. StatusButton icon-lg size may overflow during pending stateMedium Severity The search button uses |
||
| </div> | ||
| {showDateFilter ? ( | ||
| <div className="flex w-full flex-col gap-2 sm:w-auto sm:flex-row"> | ||
| <div className="w-full sm:w-[160px]"> | ||
| <Label htmlFor={startDateId} className="sr-only"> | ||
| Start date | ||
| </Label> | ||
| <div className="grid w-full grid-cols-2 gap-2 sm:flex sm:w-auto sm:items-end"> | ||
| <div className="min-w-0 space-y-1 sm:w-[160px]"> | ||
| <Label htmlFor={startDateId}>Start date</Label> | ||
| <Input | ||
| type="date" | ||
| name="startDate" | ||
|
|
@@ -70,10 +79,8 @@ export function SearchBar({ | |
| className="w-full" | ||
| /> | ||
| </div> | ||
| <div className="w-full sm:w-[160px]"> | ||
| <Label htmlFor={endDateId} className="sr-only"> | ||
| End date | ||
| </Label> | ||
| <div className="min-w-0 space-y-1 sm:w-[160px]"> | ||
| <Label htmlFor={endDateId}>End date</Label> | ||
| <Input | ||
| type="date" | ||
| name="endDate" | ||
|
|
@@ -84,16 +91,6 @@ export function SearchBar({ | |
| </div> | ||
| </div> | ||
| ) : null} | ||
| <div> | ||
| <StatusButton | ||
| type="submit" | ||
| status={isSubmitting ? 'pending' : status} | ||
| className="flex w-full items-center justify-center" | ||
| > | ||
| <Icon name="magnifying-glass" size="md" /> | ||
| <span className="sr-only">Search</span> | ||
| </StatusButton> | ||
| </div> | ||
| </Form> | ||
| ) | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -187,7 +187,8 @@ export default function ForgotPasswordRoute() { | |
| </div> | ||
| <ErrorList errors={form.errors} id={form.errorId} /> | ||
| <StatusButton | ||
| className="w-full bg-[hsl(var(--palette-hot-fire-red))] text-[hsl(var(--palette-cream))] hover:bg-[hsl(var(--palette-fire-red))]" | ||
| variant="destructive" | ||
| className="w-full" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Destructive variant may not match original palette colorsLow Severity The "Recover password" button originally used specific palette colors ( |
||
| status={ | ||
| forgotPassword.state === 'submitting' | ||
| ? 'pending' | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -289,7 +289,8 @@ function MobileMenu() { | |
| <Button | ||
| asChild | ||
| size="lg" | ||
| className="mt-6 w-full bg-[hsl(var(--palette-orange))] text-[hsl(var(--palette-cream))] hover:bg-[hsl(var(--palette-chestnut))]" | ||
| variant="warm" | ||
| className="mt-6 w-full" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Warm variant uses wrong base color for mobile menuMedium Severity The mobile menu "Start 14-day FREE Trial" button originally used Additional Locations (1) |
||
| > | ||
| <Link to="/login" onClick={() => setOpen(false)}> | ||
| <Icon name="star" size="sm" aria-hidden="true"> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -643,30 +643,31 @@ export default function RecipientRoute() { | |
| </div> | ||
| )} | ||
| </section> | ||
| <div className="flex flex-col gap-2"> | ||
| <div className="flex flex-col gap-2 pb-8 sm:pb-10"> | ||
| <newMessageFetcher.Form | ||
| method="POST" | ||
| action="new" | ||
| className="border-border/60 rounded-full border bg-white p-2 shadow-sm transition focus-within:rounded-[28px] focus-within:p-3" | ||
| className="border-border/40 rounded-full border bg-white p-2 shadow-sm transition focus-within:rounded-[28px] focus-within:border-border/60 focus-within:shadow-md" | ||
| > | ||
| <label htmlFor="new-message" className="sr-only"> | ||
| Add a new message | ||
| </label> | ||
| <div className="flex items-center gap-3"> | ||
| <div className="flex items-center gap-2"> | ||
| <textarea | ||
| id="new-message" | ||
| name="content" | ||
| ref={newMessageInputRef} | ||
| placeholder="Aa" | ||
| className="text-foreground placeholder:text-muted-foreground min-h-[44px] flex-1 resize-none rounded-full bg-transparent px-4 py-2 text-sm leading-relaxed focus-visible:outline-none" | ||
| className="text-foreground placeholder:text-muted-foreground min-h-[48px] flex-1 resize-none rounded-full bg-transparent px-4 py-2 text-sm leading-relaxed focus-visible:outline-none" | ||
| rows={1} | ||
| required | ||
| /> | ||
| <StatusButton | ||
| status={isCreating ? 'pending' : 'idle'} | ||
| type="submit" | ||
| size="pill" | ||
| className="shrink-0 bg-[hsl(var(--palette-green-500))] text-[hsl(var(--palette-cream))] hover:bg-[hsl(var(--palette-green-700))]" | ||
| variant="brand-soft" | ||
| className="shrink-0 px-6" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Brand-soft variant uses wrong base color for Add buttonMedium Severity The message composer "Add" button originally used |
||
| > | ||
| <Icon name="check">Add</Icon> | ||
| </StatusButton> | ||
|
|
@@ -773,9 +774,9 @@ function MessageForms({ message }: { message: FutureMessage }) { | |
| <StatusButton | ||
| form={updateContentForm.id} | ||
| status={updateIsPending ? 'pending' : 'idle'} | ||
| className="h-9 w-9 gap-0 text-[hsl(var(--palette-cream))] hover:bg-[hsl(var(--palette-cream))/0.15]" | ||
| className="h-9 w-9 gap-0" | ||
| size="icon" | ||
| variant="ghost" | ||
| variant="ghost-inverse" | ||
| type="submit" | ||
| name="intent" | ||
| value={updateMessageContentActionIntent} | ||
|
|
@@ -791,9 +792,9 @@ function MessageForms({ message }: { message: FutureMessage }) { | |
| > | ||
| <DropdownMenuTrigger asChild> | ||
| <Button | ||
| variant="ghost" | ||
| variant="ghost-inverse" | ||
| size="icon" | ||
| className="h-9 w-9 text-[hsl(var(--palette-cream))] hover:bg-[hsl(var(--palette-cream))/0.15]" | ||
| className="h-9 w-9" | ||
| aria-label="Message actions" | ||
| > | ||
| <Icon name="dots-horizontal" size="sm" /> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,7 +42,7 @@ export default function RecipientsIndexRoute() { | |
| variant="outline" | ||
| size="icon" | ||
| aria-label="Add recipient" | ||
| className="bg-muted hover:bg-card h-14 w-14 shadow-sm" | ||
| className="h-14 w-14 shadow-sm" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ButtonLink background states reversed after removing overridesLow Severity Removing |
||
| > | ||
| <Icon name="plus" size="xl" /> | ||
| </ButtonLink> | ||
|
|
@@ -148,7 +148,8 @@ export default function RecipientsIndexRoute() { | |
| </div> | ||
| <ButtonLink | ||
| to="new" | ||
| className="flex w-full items-center justify-center gap-2 bg-[hsl(var(--palette-green-500))] text-[hsl(var(--palette-cream))] hover:bg-[hsl(var(--palette-green-700))] sm:w-auto" | ||
| variant="brand" | ||
| className="flex w-full items-center justify-center gap-2 sm:w-auto" | ||
| > | ||
| <Icon name="plus">Add Recipient</Icon> | ||
| </ButtonLink> | ||
|
|
||


Uh oh!
There was an error while loading. Please reload this page.