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 FXIOS-10669, Subtask FXIOS-10820 [Sent from Firefox] Improve share "extension" type names and add documentation #23542

Merged
merged 12 commits into from
Dec 4, 2024

Conversation

ih-codes
Copy link
Collaborator

@ih-codes ih-codes commented Dec 3, 2024

📜 Tickets

Jira ticket
Github issue

Jira Subtask FXIOS-10820

💡 Description

This PR is part of the Sent from Firefox / Info Card Referral experiment work, which involves refactoring our old share sheet code.

This PR:

  • Renames ShareExtensionHelper -> ShareManager
  • Renames ShareExtensionCoordinator -> ShareSheetCoordinator
  • Updates related naming for any variables, properties, functions, etc. with the word "shareExtension"
  • Adds documentation
  • Updates the sharesheet route to take a ShareType and ShareMessage instead of a URL and title

Note: The .sharesheet route was only just added for the Info Card Referral experiment here (https://github.com/mozilla-mobile/firefox-ios/pull/23094/files) and isn't in use yet. My next PR will hook things up again, I just didn't want too much clutter.

📝 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)

@ih-codes ih-codes requested a review from a team as a code owner December 3, 2024 20:00
@ih-codes
Copy link
Collaborator Author

ih-codes commented Dec 3, 2024

Updated PR description.

@ih-codes ih-codes changed the title Refactor FXIOS-10669 Improve share "extension" type names and add documentation Refactor FXIOS-10669 [Sent from Firefox] Improve share "extension" type names and add documentation Dec 3, 2024
@@ -537,37 +541,6 @@ class BrowserCoordinator: BaseCoordinator,
showShareSheet(with: url, title: nil)
}

func showShareSheet(with url: URL?, title: String?) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

(This was just moved lower in the file)

@ih-codes
Copy link
Collaborator Author

ih-codes commented Dec 3, 2024

Fixing 1 thing on the branch atm, getting infinite recursion from one of the renaming! 😆

@ih-codes
Copy link
Collaborator Author

ih-codes commented Dec 3, 2024

Fixing 1 thing on the branch atm, getting infinite recursion from one of the renaming! 😆

Alright this has been fixed! There was a protocol with default implementation that was just calling itself since I didn't rename it and/or remove it properly.

@mobiletest-ci-bot
Copy link

mobiletest-ci-bot commented Dec 3, 2024

Messages
📖 Project coverage: 33.63%
📖 Edited 22 files
📖 Created 0 files

Client.app: Coverage: 31.51

File Coverage
BrowserViewController.swift 3.54% ⚠️
BrowserCoordinator.swift 69.15%
HomepageContextMenuHelper.swift 3.19% ⚠️
LibraryCoordinator.swift 86.9%
MainMenuActionHelper.swift 0.0% ⚠️
BrowserNavigationHandler.swift 0.0% ⚠️
ShareManager.swift 75.63%
RouteBuilder.swift 88.7%
ShareSheetCoordinator.swift 32.3% ⚠️
ActionProviderBuilder.swift 0.0% ⚠️
DownloadsPanel.swift 36.94% ⚠️
DownloadsCoordinator.swift 65.12%
Route.swift 100.0%

Generated by 🚫 Danger Swift against cb01346

Copy link
Contributor

mergify bot commented Dec 3, 2024

This pull request has conflicts when rebasing. Could you fix it @ih-codes? 🙏

Copy link
Collaborator

@MattLichtenstein MattLichtenstein 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 👍

Only thing I would change is the following in the PR description:

Renames ShareExtensionCoordinator -> ShareCoordinator

Renames ShareExtensionCoordinator -> ShareSheetCoordinator

@ih-codes
Copy link
Collaborator Author

ih-codes commented Dec 3, 2024

Looks good 👍

Only thing I would change is the following in the PR description:

Renames ShareExtensionCoordinator -> ShareCoordinator

Renames ShareExtensionCoordinator -> ShareSheetCoordinator

Thanks @MattLichtenstein, done! I missed that when I had to write up the PR description a second time after the GitHub incident. 😭

@ih-codes ih-codes force-pushed the ih/FXIOS-10669-rename-share-extension-types branch from 7601e25 to cb01346 Compare December 3, 2024 21:59
@ih-codes ih-codes merged commit 3d02ea6 into main Dec 4, 2024
10 checks passed
@ih-codes ih-codes deleted the ih/FXIOS-10669-rename-share-extension-types branch December 4, 2024 15:04
@ih-codes ih-codes changed the title Refactor FXIOS-10669 [Sent from Firefox] Improve share "extension" type names and add documentation Refactor FXIOS-10669, Subtask FXIOS-10820 [Sent from Firefox] Improve share "extension" type names and add documentation Dec 6, 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.

3 participants