Skip to content

Comments

fix: align text and icon in Write NFC Tags#319

Open
shraavv wants to merge 1 commit intofossasia:mainfrom
shraavv:246-center-text-NFC-tags
Open

fix: align text and icon in Write NFC Tags#319
shraavv wants to merge 1 commit intofossasia:mainfrom
shraavv:246-center-text-NFC-tags

Conversation

@shraavv
Copy link

@shraavv shraavv commented Jan 7, 2026

Fixes #246

Changes made:

  • Added minLines: 1 so the field renders as a single-line input by default
  • Ensured the field expands to a second line only when the user types

Screenshots:

image image

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Sorry @shraavv, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@mariobehling mariobehling requested a review from Copilot February 9, 2026 17:42
@mariobehling
Copy link
Member

Small process note.

We have automatic Copilot PR reviews enabled on this repository. These reviews are only triggered if the contributor has GitHub Copilot enabled and an active license on their own account.

Please enable Copilot in your GitHub settings if you have access. In many regions, free licenses are available through educational institutions or developer programs. Enabling Copilot helps us speed up the auto review process and reduces manual review overhead for the core team.

The team will review your PR. Thank you for your contribution and cooperation.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR primarily targets a UI alignment issue in the “Write NFC Tags” screen by adjusting the behavior of the multiline text input, and it also includes a broader regeneration/update of Flutter-generated artifacts (localizations, plugin registrant) and the dependency lockfile.

Changes:

  • Adjusted the “Write NDEF Records” text field to render as single-line by default and expand up to the configured max lines.
  • Regenerated localizations to add new strings and adjust supported locale handling (notably Norwegian Bokmål locale handling).
  • Updated pubspec.lock SDK constraints/dependency classification and regenerated the macOS plugin registrant.

Reviewed changes

Copilot reviewed 17 out of 18 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pubspec.lock Updates dependency lock metadata and SDK minimums (Dart/Flutter).
macos/Flutter/GeneratedPluginRegistrant.swift Regenerated macOS plugin registration list (adds mobile_scanner, removes device_info_plus).
lib/ndef_screen/widgets/nfc_write_card.dart Tweaks TextField line behavior to improve initial alignment and expansion.
lib/l10n/app_localizations.dart Adds new localization keys and updates supported locale/lookup logic.
lib/l10n/app_localizations_de.dart Regenerated localization outputs to include new keys.
lib/l10n/app_localizations_en.dart Regenerated localization outputs to include new keys.
lib/l10n/app_localizations_es.dart Regenerated localization outputs to include new keys.
lib/l10n/app_localizations_fr.dart Regenerated localization outputs to include new keys.
lib/l10n/app_localizations_he.dart Regenerated localization outputs (includes multiple updated Hebrew strings + new keys).
lib/l10n/app_localizations_hi.dart Regenerated localization outputs (includes updated Hindi strings + new keys).
lib/l10n/app_localizations_id.dart Regenerated localization outputs to include new keys.
lib/l10n/app_localizations_ja.dart Regenerated localization outputs to include new keys.
lib/l10n/app_localizations_nb.dart Regenerated localization outputs to include new keys and simplify nb locale handling.
lib/l10n/app_localizations_pt.dart Regenerated localization outputs to include new keys.
lib/l10n/app_localizations_ru.dart Regenerated localization outputs to include new keys.
lib/l10n/app_localizations_uk.dart Regenerated localization outputs to include new keys.
lib/l10n/app_localizations_vi.dart Regenerated localization outputs to include new keys.
lib/l10n/app_localizations_zh.dart Regenerated localization outputs to include new keys.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 17 out of 18 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

lib/ndef_screen/widgets/nfc_write_card.dart:342

  • PR description mentions fixing multiline hint alignment via alignLabelWithHint: true, but this TextField only uses hintText (no labelText) and doesn't set alignLabelWithHint. If alignment is still an issue, either update the PR description to match the actual change, or adjust the relevant InputDecoration/TextField properties that affect hint/prefix icon vertical alignment (since alignLabelWithHint won't have any effect here).
    return TextField(
      onChanged: onChanged,
      maxLines: maxLines,
      minLines: 1,
      obscureText: obscureText,
      style: const TextStyle(fontSize: 14),
      decoration: InputDecoration(
        hintText: hintText,
        hintStyle: TextStyle(color: Colors.grey[500], fontSize: 14),
        prefixIcon: Icon(prefixIcon, color: colorAccent, size: 20),
        border: OutlineInputBorder(

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@shraavv
Copy link
Author

shraavv commented Feb 12, 2026

@mariobehling
I have made the requested changes, could you please review this?

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.

Center text in Write NFC Tags

2 participants