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

Refactor/refactor tag selection create tribe #422

Conversation

Korede612
Copy link

Pull Request Title

Refactor Create Tribe Selected Tags Box #415

Description

This pull request addresses the Create Tribe Selected Tags Box in Issue #415.

The following are the addressed issues:

  • Remove tags icon from selected tag rounded boxes
  • Change background color of each selected tag box (color = PrimaryText)
  • Change text color of each selected tag (color = Body)
  • Add X button on each tag and logic to remove it when tapping on it (color = Body, transparency = 50%)
  • Add + Add Tags inside selected tags Box as on screenshot (font = Roboto-Medium 14, color = SecondaryText)

Changes Made

  • Created a file calledUIView + Constraints.swift for easy auto layout programmatically
  • Remove the previous button for adding the tags on Groups.storyboard
  • Added a footer view to the collection view of the selected tags
  • Improved on the TagsAddedDataSource.swift to handle the selection of the add button and the removal of a tag
  • New view for the collection view cell called AddedTagCell.swift
  • New view for the footer cell called AddTagsButtonCell.swift

@tomastiminskas
Copy link
Contributor

@Korede612 I was reviewing and testing your changes. They all worked great overall based on the designs, but to be consistent with how the project is built the AddedTagCell and the AddTagsButtonCell view should be built in xibs instead of just building the UI elements from the code and adding the constraints from the code as well. At the time of needing to modify those layouts it's much easier to do it from an xib than from the code (which doesn't provide a preview of the UI). In the other hand I would rename those to AddedTagView and AddTagsButtonView since they are views, not cells and I would move them to Custom Views folder instead of having them in View Cells directory

Just as a reference, when creating an xib for a custom UIView class, you need to set the UIView class on the File's Owner of the xib. Screenshot attached as a example

Screenshot 2024-03-25 at 09 32 14

Let me know if the requested changes make sense to you. Thanks in advance

@Korede612
Copy link
Author

@Korede612 I was reviewing and testing your changes. They all worked great overall based on the designs, but to be consistent with how the project is built the AddedTagCell and the AddTagsButtonCell view should be built in xibs instead of just building the UI elements from the code and adding the constraints from the code as well. At the time of needing to modify those layouts it's much easier to do it from an xib than from the code (which doesn't provide a preview of the UI). In the other hand I would rename those to AddedTagView and AddTagsButtonView since they are views, not cells and I would move them to Custom Views folder instead of having them in View Cells directory

Just as a reference, when creating an xib for a custom UIView class, you need to set the UIView class on the File's Owner of the xib. Screenshot attached as a example

Screenshot 2024-03-25 at 09 32 14 Let me know if the requested changes make sense to you. Thanks in advance

Yes, the changes makes sense to me.
And thanks for the feedback on xib and programmatic UI. I will put that into consideration henceforth.

@Korede612
Copy link
Author

Update based on feedback "view should be built in xibs instead of just building the UI elements from the code"

  • Helper function used for programmatic UI layout has been deleted
  • Files has been renamed based on feedback
  • Programmatic UIs has been converted to xib for easy update/fix
    • AddedTagCell has been deleted
    • AddedTagView was created using xib

@tomastiminskas tomastiminskas changed the base branch from test-flight to tt/feature/tags-selection-ui March 26, 2024 13:35
@tomastiminskas tomastiminskas merged commit 6ef2886 into stakwork:tt/feature/tags-selection-ui Mar 26, 2024
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.

2 participants