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

Bugfix FXIOS-8364 [v123] Add confirmation dialog #18581

Merged
merged 2 commits into from
Feb 7, 2024

Conversation

OrlaM
Copy link
Contributor

@OrlaM OrlaM commented Feb 5, 2024

📜 Tickets

Jira ticket
Github issue

💡 Description

Adds the confirmation dialog to the close all tabs action

📝 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

@OrlaM OrlaM requested a review from a team as a code owner February 5, 2024 21:34
@OrlaM OrlaM requested a review from dataports February 5, 2024 21:34
accessibilityIdentifier: AccessibilityIdentifiers.TabTray.deleteCancelButton)
controller.popoverPresentationController?.barButtonItem = deleteButton
present(controller, animated: true, completion: nil)
}
Copy link
Contributor

@dataports dataports Feb 6, 2024

Choose a reason for hiding this comment

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

Just curious, we don't have any existing Alert Controller designs for destructive actions? The UX of this to me doesn't emphasize the fact that this is to delete a bunch of data (for example, using red in the text of the confirmation)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Improving the UX is mostly out of scope for this project so I think it's fine to keep it the same for now but this is a very good point, would you mind creating a bug for it and we can tackle it through our regular triage process since it' needs UX input.

Copy link
Contributor

Choose a reason for hiding this comment

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

@dataports
Copy link
Contributor

Works well, but seems like the undo toast for undo-ing the delete all does not update the tab count until you enter the tab tray again and add a tab there. Probably fine to make a ticket for it in the epic and address it after?

Simulator.Screen.Recording.-.iPhone.15.Plus.-.2024-02-06.at.15.38.53.mp4

@@ -134,14 +138,25 @@ struct TabTrayState: ScreenState, Equatable {
// Only update the nomal tab count if the tabs being refreshed are not private
let tabModel = context.tabDisplayModel
let isPrivate = tabModel.tabs.first?.isPrivate ?? false
let tabCount = tabModel.normalTabsCount
let tabCount = isPrivate ? state.normalTabsCount : tabModel.normalTabsCount
Copy link
Contributor

Choose a reason for hiding this comment

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

what's the difference between state.normalTabsCount and tabModel.normalTabsCount?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's possible tabModel.normalTabsCount might not be calculated in certain cases if it's updating the private window so just safer to keep the value the same as it's current value since the private screen cannot impact this number for the normal screen.

@OrlaM
Copy link
Contributor Author

OrlaM commented Feb 7, 2024

Added a ticket for the undo tab count issue #18612

@OrlaM OrlaM force-pushed the om/FXIOS-8364-confirmation branch from 84be214 to ee27544 Compare February 7, 2024 15:21
@mobiletest-ci-bot
Copy link

Warnings
⚠️ Variable 'notificationDotFill' in Large is out of alphabetical order.
⚠️ Variable 'notificationDot' in Large is out of alphabetical order.
Messages
📖 Project coverage: 33.13%
📖 Edited 5 files
📖 Created 0 files

Client.app: Coverage: 31.85

File Coverage
TabManagerMiddleware.swift 22.61% ⚠️
TabsPanelState.swift 50.0% ⚠️
TabPanelAction.swift 44.93% ⚠️
TabTrayState.swift 57.94%
TabTrayViewController.swift 67.97%

Generated by 🚫 Danger Swift against ee27544

@OrlaM OrlaM merged commit e7dae22 into mozilla-mobile:main Feb 7, 2024
9 of 10 checks passed
@OrlaM
Copy link
Contributor Author

OrlaM commented Feb 7, 2024

@Mergifyio backport release/v123

@OrlaM OrlaM deleted the om/FXIOS-8364-confirmation branch February 7, 2024 19:20
Copy link
Contributor

mergify bot commented Feb 7, 2024

backport release/v123

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Feb 7, 2024
* Add confirmation dialog

* Fix swiftlint

(cherry picked from commit e7dae22)
OrlaM added a commit that referenced this pull request Feb 7, 2024
* Add confirmation dialog

* Fix swiftlint

(cherry picked from commit e7dae22)

Co-authored-by: OrlaM <[email protected]>
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.

3 participants