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

CLI-624: move alerts out of tab navigation into to settings #255

Conversation

mike-dydx
Copy link
Contributor

@mike-dydx mike-dydx commented Sep 18, 2024

Links (dYdX Internal Use Only)

Linear Ticket: CLI-624: move alerts out of tab navigation into to settings

Figma Design: https://www.figma.com/design/mKevZOfE9nj6MZpiolKYW1/dYdX-%E2%80%BA-Mobile?node-id=9615-982&t=QjiTEfHMhHzJgIrk-4


Description / Intuition

  • moves in-app alerts to settings L2 screen
  • removes news from alerts/news screen (also some renaming to reflect non-news behavior)
  • moves earn/vaults tab to L1 tab navigation screen
  • earn/vaults tab icon replaces news/alerts icon
  • fixes issue where tab bar gradient flashes a color when app theme changes

Before/After Screenshots or Videos

Desc After
hidden - flag off
showing - flag on
smaller device
new alerts screen without news
L1 vaults screen
light/dark mode switching and tab bar scroll behind
Simulator.Screen.Recording.-.iPhone.15.Pro.Mainnet.-.2024-09-23.at.13.31.49.mp4

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring or Technical Debt
  • Documentation update
  • Other (please describe: )

Copy link

linear bot commented Sep 18, 2024

@mike-dydx mike-dydx changed the title move alerts routing to settings screen CLI-624: move alerts out of tab navigation into to settings Sep 18, 2024
@@ -19,7 +19,7 @@ public class dydxMarketInfoViewBuilder: NSObject, ObjectBuilderProtocol {
public func build<T>() -> T? {
let presenter = dydxMarketInfoViewPresenter()
let view = presenter.viewModel?.createView() ?? PlatformViewModel().createView()
let viewController = dydxMarketInfoViewController(presenter: presenter, view: view, configuration: .nav)
let viewController = dydxMarketInfoViewController(presenter: presenter, view: view, configuration: .default)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

nav is exactly the same as default

@@ -33,7 +33,6 @@ public struct HostingViewControllerConfiguration {
public static let `default` = HostingViewControllerConfiguration(ignoreSafeArea: false, fixedHeight: nil, gradientTabbar: false)
public static let ignoreSafeArea = HostingViewControllerConfiguration(ignoreSafeArea: true)
public static let tabbarItemView = HostingViewControllerConfiguration(ignoreSafeArea: false, fixedHeight: nil, gradientTabbar: true)
public static let nav = HostingViewControllerConfiguration(ignoreSafeArea: false, fixedHeight: nil, gradientTabbar: false, disableNavigationController: false)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

see line 21 to confirm nav was same as default

Comment on lines +65 to +66
// offset for tab bar. comes from dydxV4TabBarBuilder's center button height
.padding(.bottom, 30)
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 seems to be how we do it elsewhere 😞 unsure if there's a good solution right now to improve other than adding a comment

@mike-dydx mike-dydx marked this pull request as ready for review September 18, 2024 21:50
@ruixhuang
Copy link
Contributor

The vault tab icon doesn't look like the same size as other tab icons. I think we should increase its size. Also, the icon looks like a "close" button.

Screenshot 2024-09-18 at 14 55 26

@ruixhuang ruixhuang closed this Sep 18, 2024
@ruixhuang ruixhuang reopened this Sep 18, 2024
@mike-dydx mike-dydx enabled auto-merge (squash) September 23, 2024 17:40
@mike-dydx mike-dydx force-pushed the mike/cli-624-move-alerts-out-of-tab-navigation-into-to-settings branch from a378322 to 31c0e5b Compare September 23, 2024 17:49
@mike-dydx mike-dydx force-pushed the mike/cli-624-move-alerts-out-of-tab-navigation-into-to-settings branch from 31c0e5b to 8241c48 Compare September 23, 2024 17:50
@mike-dydx mike-dydx merged commit 9ea44b6 into develop Sep 23, 2024
3 of 4 checks passed
@mike-dydx mike-dydx deleted the mike/cli-624-move-alerts-out-of-tab-navigation-into-to-settings branch September 23, 2024 17:50
mike-dydx added a commit that referenced this pull request Oct 16, 2024
* move alerts routing to settings screen

* showing alerts

* rename & delete old files

* add back button

* conditionally hide/show alerts based on onboarding status and feature flag

* rename

* rename again

* move tab config out of json

* improve tab bar gradient and app theme update propagation

---------

Co-authored-by: Mike <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants