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

DON-384: Adjust place selector text field #1923

Merged
merged 18 commits into from
Mar 28, 2024

Conversation

yurareutskiy
Copy link
Contributor

@yurareutskiy yurareutskiy commented Mar 27, 2024

Figma link

  • Add the new component BPKSearchInputSummary (naming and requirements came from the Design Team) based on BPKTextField with customisable inputPrefix which will allow us to set an additional visual enhancement for different verticals and their place selectors.
  • inputPrefix can be in two state: icon, customText
  • The new component will enable to develop a search input field without adding more complexity to existing BPKTextField
  • (additional) fix setting a light mode for screenshot generating by setting .lightMode in case there is missing "FORCE_DARK_MODE" flag
Light Mode Dark Mode
Simulator Screenshot - iPhone SE (3rd generation) - 2024-03-26 at 22 46 15 Simulator Screenshot - iPhone SE (3rd generation) - 2024-03-26 at 22 47 08
Simulator Screenshot - iPhone SE (3rd generation) - 2024-03-26 at 22 46 38 Simulator Screenshot - iPhone SE (3rd generation) - 2024-03-26 at 22 46 53

Remember to include the following changes:

If you are curious about how we review, please read through the code review guidelines

@yurareutskiy yurareutskiy added swiftui minor Non breaking change labels Mar 27, 2024
@yurareutskiy yurareutskiy force-pushed the donburi/DON-384_adjust_place_selector_text_field branch from 3af3065 to 6de7a46 Compare March 27, 2024 14:57
@@ -54,14 +66,16 @@ class BPKAppSearchModalTests: XCTestCase {
// MARK: - Helpers
private func givenSut(
with results: BPKAppSearchModalResults,
inputState: BPKAppSearchModal.TextFieldState = .default
inputState: BPKAppSearchModal.TextFieldState = .default,
prefixState: BPKTextField.PrefixState? = nil
Copy link
Contributor

Choose a reason for hiding this comment

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

@yurareutskiy the test fails to compile on this line. The naming has probably changed.
This is also the reason the analyze step fails.

Once the tests run again, push an empty commit with Record snapshots to have CI take the snapshots for you. (If the snapshot test fails :D)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! Still not sure why it was failing before I renamed that, but amazing as it's working:)

Copy link
Contributor

Snapshots were updated. Please verify the changes match the expected layout.

' M Backpack-SwiftUI/Tests/AppSearchModal/Snapshots/BPKAppSearchModalTests/test_withContent.dark-mode.png'%0A' M Backpack-SwiftUI/Tests/AppSearchModal/Snapshots/BPKAppSearchModalTests/test_withContent.light-mode.png'%0A' M Backpack-SwiftUI/Tests/AppSearchModal/Snapshots/BPKAppSearchModalTests/test_withContent.rtl.png'%0A' M Backpack-SwiftUI/Tests/AppSearchModal/Snapshots/BPKAppSearchModalTests/test_withContentInputStateClear.dark-mode.png'%0A' M Backpack-SwiftUI/Tests/AppSearchModal/Snapshots/BPKAppSearchModalTests/test_withContentInputStateClear.light-mode.png'%0A' M Backpack-SwiftUI/Tests/AppSearchModal/Snapshots/BPKAppSearchModalTests/test_withContentInputStateClear.rtl.png'%0A' M Backpack-SwiftUI/Tests/AppSearchModal/Snapshots/BPKAppSearchModalTests/test_withContentWhenPrefixIsCustomText.light-mode.png'%0A' M Backpack-SwiftUI/Tests/AppSearchModal/Snapshots/BPKAppSearchModalTests/test_withContentWhenPrefixIsIcon.light-mode.png'%0A' M Backpack-SwiftUI/Tests/AppSearchModal/Snapshots/BPKAppSearchModalTests/test_withLoading.dark-mode.png'%0A' M Backpack-SwiftUI/Tests/AppSearchModal/Snapshots/BPKAppSearchModalTests/test_withLoading.light-mode.png'%0A' M Backpack-SwiftUI/Tests/AppSearchModal/Snapshots/BPKAppSearchModalTests/test_withLoading.rtl.png'%0A' M Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_clearableField_withCustomPrefixText.dark-mode.png'%0A' M Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_clearableField_withCustomPrefixText.light-mode.png'%0A' M Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_clearableField_withCustomPrefixText.rtl.png'%0A' M Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_clearableField_withPrefixIcon.dark-mode.png'%0A' M Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_clearableField_withPrefixIcon.light-mode.png'%0A' M Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_clearableField_withPrefixIcon.rtl.png'%0A' M Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_defaultSettings_withCustomPrefixText.dark-mode.png'%0A' M Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_defaultSettings_withCustomPrefixText.light-mode.png'%0A' M Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_defaultSettings_withCustomPrefixText.rtl.png'%0A' M Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_defaultSettings_withPrefixIcon.dark-mode.png'%0A' M Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_defaultSettings_withPrefixIcon.light-mode.png'%0A' M Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_defaultSettings_withPrefixIcon.rtl.png'%0A' M Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_disabledField_withCustomPrefixText.dark-mode.png'%0A' M Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_disabledField_withCustomPrefixText.light-mode.png'%0A' M Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_disabledField_withCustomPrefixText.rtl.png'%0A' M Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_disabledField_withPrefixIcon.dark-mode.png'%0A' M Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_disabledField_withPrefixIcon.light-mode.png'%0A' M Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_disabledField_withPrefixIcon.rtl.png'%0A' M Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_emptyField_withCustomPrefixText.dark-mode.png'%0A' M Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_emptyField_withCustomPrefixText.light-mode.png'%0A' M Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_emptyField_withCustomPrefixText.rtl.png'%0A' M Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_emptyField_withPrefixIcon.dark-mode.png'%0A' M Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_emptyField_withPrefixIcon.light-mode.png'%0A' M Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_emptyField_withPrefixIcon.rtl.png'%0A' M Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_errorField_withCustomPrefixText.dark-mode.png'%0A' M Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_errorField_withCustomPrefixText.light-mode.png'%0A' M Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_errorField_withCustomPrefixText.rtl.png'%0A' M Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_errorField_withPrefixIcon.dark-mode.png'%0A' M Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_errorField_withPrefixIcon.light-mode.png'%0A' M Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_errorField_withPrefixIcon.rtl.png'%0A' M Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_validField_withCustomPrefixText.dark-mode.png'%0A' M Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_validField_withCustomPrefixText.light-mode.png'%0A' M Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_validField_withCustomPrefixText.rtl.png'%0A' M Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_validField_withPrefixIcon.dark-mode.png'%0A' M Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_validField_withPrefixIcon.light-mode.png'%0A' M Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_validField_withPrefixIcon.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_clearableField_withCustomPrefixText.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_clearableField_withCustomPrefixText.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_clearableField_withCustomPrefixText.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_clearableField_withPrefixIcon.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_clearableField_withPrefixIcon.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_clearableField_withPrefixIcon.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_defaultSettings_withCustomPrefixText.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_defaultSettings_withCustomPrefixText.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_defaultSettings_withCustomPrefixText.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_defaultSettings_withPrefixIcon.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_defaultSettings_withPrefixIcon.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_defaultSettings_withPrefixIcon.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_disabledField_withCustomPrefixText.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_disabledField_withCustomPrefixText.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_disabledField_withCustomPrefixText.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_disabledField_withPrefixIcon.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_disabledField_withPrefixIcon.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_disabledField_withPrefixIcon.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_emptyField_withCustomPrefixText.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_emptyField_withCustomPrefixText.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_emptyField_withCustomPrefixText.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_emptyField_withPrefixIcon.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_emptyField_withPrefixIcon.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_emptyField_withPrefixIcon.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_errorField_withCustomPrefixText.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_errorField_withCustomPrefixText.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_errorField_withCustomPrefixText.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_errorField_withPrefixIcon.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_errorField_withPrefixIcon.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_errorField_withPrefixIcon.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_validField_withCustomPrefixText.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_validField_withCustomPrefixText.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_validField_withCustomPrefixText.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_validField_withPrefixIcon.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_validField_withPrefixIcon.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_validField_withPrefixIcon.rtl.png'

Copy link
Contributor

@gert-janvercauteren gert-janvercauteren left a comment

Choose a reason for hiding this comment

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

Can you make a recording how the prefix sounds with a screen reader? :D

@gert-janvercauteren gert-janvercauteren added minor Non breaking change and removed minor Non breaking change labels Mar 28, 2024
…dd screenshots, fix a layout based on feedback]
@yurareutskiy yurareutskiy marked this pull request as ready for review March 28, 2024 10:02
public struct BPKSearchInputSummary: View {
public enum InputPrefix {
case text(String)
case icon
Copy link
Contributor

Choose a reason for hiding this comment

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

this should receive a BPKIcon as parameter, so that clients can define what icon they use (clients of this component may be within backpack, but at least it would be configurable from outside this very component)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm, that's a good idea I guess to make it more flexible

Comment on lines 71 to 73
.onAppear {
inputFieldIsFocussed.toggle()
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure we want this within the component, for example, hotels does not want this. it should be removed from here and leave it up to the clients defining this

Copy link
Contributor

Choose a reason for hiding this comment

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

(if this is something you want to have)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, 100% should be removed 😅

}

public var body: some View {
HStack {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please specify spacing here using bpk tokens, like so:

Suggested change
HStack {
HStack(spacing: .md) {

BPKText(prefixText, style: .bodyDefault)
.foregroundColor(.textSecondaryColor)
case .icon:
BPKIconView(BPKIcon(name: "search"))
Copy link
Contributor

Choose a reason for hiding this comment

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

the icon should be passed by the ones using this component, shouldnt be hardcoded within. also, you should use the constant for the icon rather than a string for it

Copy link
Contributor

@frugoman frugoman left a comment

Choose a reason for hiding this comment

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

Looks good over all! just a couple of small modifications I think would be good to have

Copy link
Contributor

@frugoman frugoman left a comment

Choose a reason for hiding this comment

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

Looks pretty good!! thanks for contributing!!

Copy link
Contributor

Snapshots were updated. Please verify the changes match the expected layout.

' M Backpack-SwiftUI/Tests/AppSearchModal/Snapshots/BPKAppSearchModalTests/test_withContent.light-mode.png'%0A' M Backpack-SwiftUI/Tests/AppSearchModal/Snapshots/BPKAppSearchModalTests/test_withContentInputStateClear.light-mode.png'%0A' M Backpack-SwiftUI/Tests/AppSearchModal/Snapshots/BPKAppSearchModalTests/test_withContentWhenPrefixIsCustomText.light-mode.png'%0A' M Backpack-SwiftUI/Tests/AppSearchModal/Snapshots/BPKAppSearchModalTests/test_withContentWhenPrefixIsIcon.light-mode.png'%0A' M Backpack-SwiftUI/Tests/AppSearchModal/Snapshots/BPKAppSearchModalTests/test_withLoading.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_clearableField_withCustomPrefixText.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_clearableField_withCustomPrefixText.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_clearableField_withCustomPrefixText.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_clearableField_withPrefixIcon.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_clearableField_withPrefixIcon.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_clearableField_withPrefixIcon.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_defaultSettings_withCustomPrefixText.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_defaultSettings_withCustomPrefixText.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_defaultSettings_withCustomPrefixText.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_defaultSettings_withPrefixIcon.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_defaultSettings_withPrefixIcon.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_defaultSettings_withPrefixIcon.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_disabledField_withCustomPrefixText.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_disabledField_withCustomPrefixText.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_disabledField_withCustomPrefixText.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_disabledField_withPrefixIcon.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_disabledField_withPrefixIcon.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_disabledField_withPrefixIcon.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_emptyField_withCustomPrefixText.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_emptyField_withCustomPrefixText.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_emptyField_withCustomPrefixText.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_emptyField_withPrefixIcon.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_emptyField_withPrefixIcon.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_emptyField_withPrefixIcon.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_errorField_withCustomPrefixText.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_errorField_withCustomPrefixText.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_errorField_withCustomPrefixText.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_errorField_withPrefixIcon.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_errorField_withPrefixIcon.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_errorField_withPrefixIcon.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_validField_withCustomPrefixText.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_validField_withCustomPrefixText.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_validField_withCustomPrefixText.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_validField_withPrefixIcon.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_validField_withPrefixIcon.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_validField_withPrefixIcon.rtl.png'

@frugoman frugoman enabled auto-merge (squash) March 28, 2024 14:09
} else {
BPKIconView(icon.icon)
.foregroundColor(icon.color)
.accessibilityHidden(true)
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

.focused($focused)
accessory
}
.padding(.md)
Copy link
Contributor

Choose a reason for hiding this comment

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

Based on the design I think the padding is:
.padding(.left, .base)
.padding(.right, .md)
.padding(.vertical, .md)

Copy link
Contributor

Choose a reason for hiding this comment

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

I thin it's actually .padding(.horizontal, .base).padding(.vertical, BPKSpacing.md.value + BPKSpacing.sm.value) (we don't have a token for value 12 hehe) could you raise the pr so I can approve it myself?

Copy link
Contributor

Choose a reason for hiding this comment

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

The padding is 16 (.base) from left [leading], and 12 (.md + .sm) for all other sides.
Screenshot 2024-03-28 at 16 42 37
Screenshot 2024-03-28 at 16 42 24

Please correct me if I read the Figma file incorrectly. we will make the PR for this change after that, no worries

@frugoman frugoman merged commit 9abad5c into main Mar 28, 2024
14 checks passed
@frugoman frugoman deleted the donburi/DON-384_adjust_place_selector_text_field branch March 28, 2024 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants