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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FXIOS-8946 - Show lock icon when url is displayed #20265

Conversation

PARAIPAN9
Copy link
Collaborator

@PARAIPAN9 PARAIPAN9 commented May 15, 2024

馃摐 Tickets

Jira ticket
Github issue

馃挕 Description

  • This PR adds the lock icon when the urlTextField is not in editing mode.

馃摑 Checklist

You have to check all boxes before merging

  • Filled in the above information (tickets numbers and description of your work)
  • Updated the PR name to follow our PR naming guidelines
  • Wrote unit tests and/or ensured the tests suite is passing
  • When working on UI, I checked and implemented accessibility (minimum Dynamic Text and VoiceOver)
  • If needed, I updated documentation / comments for complex code and public methods
  • If needed, added a backport comment (example @Mergifyio backport release/v120)

@PARAIPAN9 PARAIPAN9 requested a review from a team as a code owner May 15, 2024 12:00
@@ -21,6 +21,7 @@ public struct StandardImageIdentifiers {
public static let bookmarkBadgeFillBlue50 = "bookmarkBadgeFillMediumBlue50"
public static let crossCircleFill = "crossCircleFillMedium"
public static let cross = "crossMedium"
public static let lock = "lockMedium"
Copy link
Contributor

Choose a reason for hiding this comment

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

If you add the lock icon name here you should also add the image to Client.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's already there.

let shouldAdjustForNonEmpty = !isURLTextFieldEmpty && !isTextFieldFocused

if shouldAdjustForOverflow {
updateURLTextFieldLeadingConstraint(equalTo: iconContainerStackView.leadingAnchor, constant: iconContainerStackView.frame.width * 0.5)
Copy link
Contributor

Choose a reason for hiding this comment

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

Where is the magic number of 0.5 coming from?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's for setting the leading constraint of the urlTextField to the middle of iconContainerStackView, in order to hide de elipsis. Equivalent would be iconContainerStackView.frame.width / 2.

Copy link
Contributor

Choose a reason for hiding this comment

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

Does that work when the user is using a tiny or huge font size as well??

@mobiletest-ci-bot
Copy link

mobiletest-ci-bot commented May 22, 2024

Warnings
鈿狅笍 Variable 'crossCircleFill' in Medium is out of alphabetical order.
鈿狅笍 Variable 'cross' in Medium is out of alphabetical order.
Messages
馃摉 Project coverage: 32.41%
馃摉 Edited 4 files
馃摉 Created 4 files

Client.app: Coverage: 31.06

File Coverage
AddressToolbarContainerModel.swift 0.0% 鈿狅笍

Generated by 馃毇 Danger Swift against f506aef

Copy link
Contributor

mergify bot commented May 22, 2024

This pull request has conflicts when rebasing. Could you fix it @PARAIPAN9? 馃檹

@PARAIPAN9 PARAIPAN9 merged commit 0aebe36 into mozilla-mobile:main May 22, 2024
13 checks passed
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.

None yet

3 participants