Skip to content

Conversation

@alanmoo
Copy link
Contributor

@alanmoo alanmoo commented Sep 29, 2025

What type of PR is this?

  • bug

What this PR does / why we need it:

Currently, when using Homebox on iOS, tapping ton an input field zooms in and forces users to pan around the page or zoom out again. This is caused by the input font size being less than 16px. This PR increases all input areas to 16px to prevent this. Another approach involved changing the meta viewport tag, but that would have been worse for accessibility, preventing users from zooming altogether.

Which issue(s) this PR fixes:

N/A

Special notes for your reviewer:

I couldn't actually test this on my device comprehensively as it doesn't seem possible to access a development backend from a different device and I'm primarily a front-end developer.

Frontend CI is failing, but that's fixed in #1028, as it's unrelated to this PR

Testing

task go:run and task ui:dev with some changes to hosts allowed me to open this on my iPhone and see the login screen, verifying that it was fixed. Otherwise, this is a Claude Code run of the codebase to clear text-sm on all inputs.

Summary by CodeRabbit

  • Style
    • Increased default text size across form controls by replacing small-text styling with base text on inputs, textareas (including autosize), select trigger, command input, and tags input.
    • Enhances readability and visual consistency while preserving layout, spacing, interactions, and component behavior.
    • No changes to public APIs, props, or exported interfaces.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 29, 2025

Walkthrough

Replaces Tailwind text-sm with text-base across several Vue UI form components (input, textarea, select, command, tags-input). Changes are purely presentational class-string edits; no props, events, exports, or control flow were modified.

Changes

Cohort / File(s) Summary
UI form controls typography
frontend/components/ui/command/CommandInput.vue, frontend/components/ui/input/Input.vue, frontend/components/ui/select/SelectTrigger.vue, frontend/components/ui/tags-input/TagsInputInput.vue, frontend/components/ui/textarea/Textarea.vue
Replaced text-sm with text-base (or adjusted class composition/order) in component class strings. Textarea updated in both autosize and non-autosize branches. Purely CSS/class changes; no API or logic edits.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • tankerkiller125
  • katosdev

Security recommendations

  • Verify no accessibility regressions: confirm font size, line-height, and focus outlines meet WCAG contrast/readability and keyboard focus requirements across components.
  • Run visual regression tests (snapshots/screenshots) for default, focus, hover, disabled states and across breakpoints.
  • Check layout in Chromium, Firefox, and Safari for wrapping, overflow, or layout shift caused by larger text.
  • Update any tests or snapshots that assert exact class lists.

Poem

A tiny class took off its shoe,
text-base stepped in to stretch the view.
No logic stirred, no props set free,
Just letters growing quietly. ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title “Fix auto-zoom on iOS devices” concisely and accurately reflects the primary purpose of the changeset, which is to adjust input font sizes to prevent iOS from automatically zooming; it avoids extraneous detail while clearly indicating the bug being addressed.
Description Check ✅ Passed The description follows the repository’s template, providing the required sections for PR type, rationale, and testing, and clearly explains why font sizes were increased to avoid iOS auto-zoom; it also acknowledges that no existing issue is being closed and includes relevant special notes.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4f7e34d and 1e3a6ff.

📒 Files selected for processing (1)
  • frontend/components/ui/input/Input.vue (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,vue}

⚙️ CodeRabbit configuration file

**/*.{ts,vue}: Check for hardcoded strings in UI components that should be translatable.
Look for:

  • String literals in Vue components (e.g. Click me)
  • Alert messages, error messages, and user-facing text
  • Placeholder text and labels

Files:

  • frontend/components/ui/input/Input.vue
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (13)
  • GitHub Check: build (linux/arm64)
  • GitHub Check: build (linux/arm/v7)
  • GitHub Check: build (linux/arm/v7)
  • GitHub Check: build (linux/amd64)
  • GitHub Check: build (linux/arm64)
  • GitHub Check: End-to-End Playwright Tests / E2E Playwright Testing 4/4
  • GitHub Check: End-to-End Playwright Tests / E2E Playwright Testing 3/4
  • GitHub Check: End-to-End Playwright Tests / E2E Playwright Testing 1/4
  • GitHub Check: End-to-End Playwright Tests / E2E Playwright Testing 2/4
  • GitHub Check: Frontend Tests / Integration Tests PGSQL 15
  • GitHub Check: build (linux/amd64)
  • GitHub Check: build (linux/arm64)
  • GitHub Check: build (linux/arm/v7)
🔇 Additional comments (1)
frontend/components/ui/input/Input.vue (1)

27-27: File control now matches the 16 px target—nice cleanup

file:text-base keeps the upload button aligned with the rest of the input, preventing the lingering zoom case on iOS. No new security considerations here; just ensure file uploads continue to enforce server-side validation.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai bot added the ⬆️ enhancement New feature or request label Sep 29, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1f746ef and 04c2e99.

📒 Files selected for processing (5)
  • frontend/components/ui/command/CommandInput.vue (1 hunks)
  • frontend/components/ui/input/Input.vue (1 hunks)
  • frontend/components/ui/select/SelectTrigger.vue (1 hunks)
  • frontend/components/ui/tags-input/TagsInputInput.vue (1 hunks)
  • frontend/components/ui/textarea/Textarea.vue (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,vue}

⚙️ CodeRabbit configuration file

**/*.{ts,vue}: Check for hardcoded strings in UI components that should be translatable.
Look for:

  • String literals in Vue components (e.g. Click me)
  • Alert messages, error messages, and user-facing text
  • Placeholder text and labels

Files:

  • frontend/components/ui/tags-input/TagsInputInput.vue
  • frontend/components/ui/command/CommandInput.vue
  • frontend/components/ui/select/SelectTrigger.vue
  • frontend/components/ui/textarea/Textarea.vue
  • frontend/components/ui/input/Input.vue
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Backend Server Tests / Go
  • GitHub Check: build (linux/arm/v7)
  • GitHub Check: build (linux/amd64)
🔇 Additional comments (1)
frontend/components/ui/input/Input.vue (1)

27-29: Explicitly set text-base to guarantee the 16 px target

Dropping text-sm lets the input inherit whatever font size the parent uses. In several screens we wrap form controls in text-sm containers, so the element will still compute to 14 px and iOS will continue to auto-zoom. Please set the input’s class to include an explicit 16 px size (e.g. Tailwind’s text-base) so we meet the stated goal everywhere.

-        'flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-muted-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
+        'flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-base file:font-medium file:text-muted-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',

Likely an incorrect or invalid review comment.

alanmoo and others added 3 commits September 28, 2025 23:59
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@coderabbitai coderabbitai bot added the 🕷️ bug Something isn't working label Sep 29, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (2)
frontend/components/ui/tags-input/TagsInputInput.vue (2)

18-18: Verify visible focus indication

focus:outline-none is present. Confirm the wrapper supplies a visible focus style (ring/border) for keyboard users; otherwise add a focus-visible indicator here.

Example:

-  :class="cn('min-h-6 focus:outline-none flex-1 bg-transparent px-1', props.class, 'text-base')"
+  :class="cn('min-h-6 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 flex-1 bg-transparent px-1', props.class, 'text-base')"

18-18: Security note

No new attack surface. Keep props.class strictly internal (not user-provided) to avoid style injection surprises, and avoid adding user-scalable=no in meta viewport (accessibility and security ergonomics).

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 04c2e99 and da5bb43.

📒 Files selected for processing (3)
  • frontend/components/ui/command/CommandInput.vue (1 hunks)
  • frontend/components/ui/select/SelectTrigger.vue (1 hunks)
  • frontend/components/ui/tags-input/TagsInputInput.vue (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • frontend/components/ui/select/SelectTrigger.vue
  • frontend/components/ui/command/CommandInput.vue
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,vue}

⚙️ CodeRabbit configuration file

**/*.{ts,vue}: Check for hardcoded strings in UI components that should be translatable.
Look for:

  • String literals in Vue components (e.g. Click me)
  • Alert messages, error messages, and user-facing text
  • Placeholder text and labels

Files:

  • frontend/components/ui/tags-input/TagsInputInput.vue
🔇 Additional comments (1)
frontend/components/ui/tags-input/TagsInputInput.vue (1)

18-18: i18n check

No user-facing strings introduced; nothing to translate here. LGTM.

alanmoo and others added 2 commits September 29, 2025 04:04
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
:class="cn(
'min-h-6 focus:outline-none flex-1 bg-transparent px-1',
props.class,
'text-base'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is at the end because Coderrabbit suggested it in case props.class sets the font-size again.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I dont think the text size is overwritten anywhere tagsinputinput is used and i think it should be at the start so it can be overwritten by props

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between da5bb43 and 8fd0f7a.

📒 Files selected for processing (4)
  • frontend/components/ui/input/Input.vue (1 hunks)
  • frontend/components/ui/select/SelectTrigger.vue (1 hunks)
  • frontend/components/ui/tags-input/TagsInputInput.vue (1 hunks)
  • frontend/components/ui/textarea/Textarea.vue (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • frontend/components/ui/select/SelectTrigger.vue
  • frontend/components/ui/textarea/Textarea.vue
  • frontend/components/ui/tags-input/TagsInputInput.vue
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,vue}

⚙️ CodeRabbit configuration file

**/*.{ts,vue}: Check for hardcoded strings in UI components that should be translatable.
Look for:

  • String literals in Vue components (e.g. Click me)
  • Alert messages, error messages, and user-facing text
  • Placeholder text and labels

Files:

  • frontend/components/ui/input/Input.vue
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (16)
  • GitHub Check: End-to-End Playwright Tests / E2E Playwright Testing 4/4
  • GitHub Check: End-to-End Playwright Tests / E2E Playwright Testing 3/4
  • GitHub Check: End-to-End Playwright Tests / E2E Playwright Testing 2/4
  • GitHub Check: Frontend Tests / Integration Tests PGSQL 17
  • GitHub Check: End-to-End Playwright Tests / E2E Playwright Testing 1/4
  • GitHub Check: Frontend Tests / Integration Tests PGSQL 15
  • GitHub Check: Frontend Tests / Integration Tests PGSQL 16
  • GitHub Check: build (linux/arm/v7)
  • GitHub Check: build (linux/arm/v7)
  • GitHub Check: build (linux/amd64)
  • GitHub Check: build (linux/arm64)
  • GitHub Check: build (linux/arm64)
  • GitHub Check: build (linux/amd64)
  • GitHub Check: build (linux/arm/v7)
  • GitHub Check: build (linux/arm64)
  • GitHub Check: build (linux/amd64)

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@alanmoo
Copy link
Contributor Author

alanmoo commented Sep 29, 2025

I'm baffled as to why this is failing, I'll take a look at it again this evening.

@tankerkiller125
Copy link
Contributor

If failing you mean the integration test with SQLite, it's a known issue, and one we basically ignore so long as it's the specific error we regularly see from it.

@alanmoo
Copy link
Contributor Author

alanmoo commented Oct 4, 2025

@tankerkiller125 Looks like it was that one- I rebased and it's fine now.

@katosdev
Copy link
Contributor

katosdev commented Oct 8, 2025

LGTM but I'd value a second opinion. @tonyaellie ? :)

@katosdev katosdev removed the request for review from tankerkiller125 October 8, 2025 18:22
@katosdev katosdev requested a review from tonyaellie October 8, 2025 18:22
@tonyaellie
Copy link
Collaborator

will review tomorrow :)

Copy link
Collaborator

@tonyaellie tonyaellie left a comment

Choose a reason for hiding this comment

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

I would be tempted to have something like text-base sm:text-sm so that on non mobile devices it uses the original text size, this is just personal preference for the smaller text though 🤷‍♀️

@alanmoo
Copy link
Contributor Author

alanmoo commented Oct 13, 2025

I would be tempted to have something like text-base sm:text-sm so that on non mobile devices it uses the original text size, this is just personal preference for the smaller text though 🤷‍♀️

I would have thought that would cause issues on iPads, but it turns out it doesn't for some reason. Maybe iPad OS doesn't have the auto-zoom behavior. However, it does keep the auto-zoom in place on iPhones in landscape, so I'm inclined to keep this. The alternative seems to be to prevent users from being able to zoom altogether but that seems problematic in its own way.

@tonyaellie
Copy link
Collaborator

Alternatively you could add a check for iPhones and if so enable it

@tonyaellie
Copy link
Collaborator

We could do something like this:

default.vue

<div id="app" class="group/iphone" :data-iphone="isIphone">
const isIphone = computed(
  () => navigator && (/iPhone/i.test(navigator.userAgent) || /iPhone/i.test(navigator.platform))
);

input text

group-data-[iphone=true]/iphone:text-base text-sm

@alanmoo
Copy link
Contributor Author

alanmoo commented Oct 22, 2025

My concern there is that device detection is inherently fragile, evolving over time and creating maintenance cost. It also looks like that suggestion would leverage some sort of runtime detection, possibly causing a reflow after the page has been rendered and impacting performance/user experience. For a feature that runs on every page load and affects every form input, these costs can add up.

I think the root problem is that the input text is too small by default and Apple/Android's differing handling of that shouldn't be the thing we target in a solution. If you look around the web, this is a common problem and making the text bigger seems to be the agreed upon solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🕷️ bug Something isn't working ⬆️ enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants