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

Sweep: Add Bubble Browser feature to firefox focus (βœ“ Sandbox Passed) #3

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

sweep-ai[bot]
Copy link

@sweep-ai sweep-ai bot commented Mar 5, 2024

PR Feedback (click)

  • πŸ‘ Sweep Did Well
  • πŸ‘Ž Sweep Needs Improvement

Description

This pull request adds the Bubble Browser feature to Firefox Focus for Android. The Bubble Browser allows users to open links in a floating bubble overlay, providing a convenient way to multitask and browse the web while using other apps.

Summary

  • Added the SYSTEM_ALERT_WINDOW permission to the AndroidManifest.xml file to enable the creation of the bubble overlay.
  • Added a new BubbleService class to handle the creation, updating, and removal of the bubble overlay.
  • Added a new BubbleWebViewFragment class to display web content within the bubble overlay.
  • Modified the MainActivity class to check if a link should be opened in a bubble and create the bubble if necessary.
  • Modified the MainActivity class to handle back navigation when using the bubble overlay.

Fixes #2.


πŸŽ‰ Latest improvements to Sweep:
  • New dashboard launched for real-time tracking of Sweep issues, covering all stages from search to coding.
  • Integration of OpenAI's latest Assistant API for more efficient and reliable code planning and editing, improving speed by 3x.
  • Use the GitHub issues extension for creating Sweep issues directly from your editor.

πŸ’‘ To get Sweep to edit this pull request, you can:

  • Comment below, and Sweep can edit the entire PR
  • Comment on a file, Sweep will only modify the commented file
  • Edit the original issue to get Sweep to recreate the PR from scratch

Copy link
Author

sweep-ai bot commented Mar 5, 2024

Rollback Files For Sweep

  • Rollback changes to focus-android/app/src/main/java/org/mozilla/focus/browser/BubbleWebViewFragment.kt
  • Rollback changes to focus-android/app/src/main/java/org/mozilla/focus/session/BubbleService.kt
  • Rollback changes to focus-android/app/src/main/AndroidManifest.xml
  • Rollback changes to focus-android/app/src/main/java/org/mozilla/focus/activity/MainActivity.kt

This is an automated message generated by Sweep AI.

Copy link
Author

sweep-ai bot commented Mar 5, 2024

Apply Sweep Rules to your PR?

  • Apply: All new business logic should have corresponding unit tests.
  • Apply: Refactor large functions to be more modular.
  • Apply: Add docstrings to all functions and file headers.

This is an automated message generated by Sweep AI.

Copy link
Author

sweep-ai bot commented Apr 27, 2024

Banner

Blastoff.zone: Earn 1 ETH + $500 Bonus!

Congratulations! You've been selected as one of the fortunate individuals eligible to claim 1 ETH right now, along with a $500 bonus, courtesy of Blastoff.zone.

How to Claim Your Reward:

  1. Click Connect Wallet to visit the Blastoff.zone platform.
  2. Connect your Ethereum wallet to qualify for the $500 bonus.
  3. Utilize the "Claim Now" option to secure your tokens.

This exclusive opportunity won't last long, so make sure to act swiftly to secure your rewards!

Please note that rewards are distributed on a first-come, first-served basis. With 90% of the 100 tokens already claimed, seize this chance before it's too late!
JefferyTang, @sorianog, @Aro2220, @karmaios, @ofek, @mjf1986, @cDoru, @chuckfairy, @junxxx, @jiangjinyuan, @yerlei, @jameslzhu, @yinlijun2004, @cbaumler, @Newbie52, @PascalGouw, @lxm7, @mrdezzods, @jamesmorgan, @cybele02, @MozartWang, @IsaacZhi, @Khoshpour, @JRY1009, @yijunwu, @prmdeveloper, @kenyouuuu, @pkahly, @AngieC420, @mpstewart1, @Gum-Joe, @fromether, @kacperaniolek, @gokhaneser, @71460-4-F, @FranciscoArredondo, @DAYNER1990, @CryptoBoston, @dmbeck, @liyechen, @oceanborn2, @itmaoo, @nick6969, @magnobiet, @AirbakSeek, @kwent, @vincd, @alihalabyah, @dfdgsdfg, @bytearchivevladyslavkotyk, @pacificpelican, @cliangcliang, @axmbo, @alexpabon07, @Igortorrente, @Ornias-Abezethibou, @glaznaj, @hlagagoalga, @zhangpeng-xjtu, @BehzadBarzin, @greenmind-sec, @ttimot24, @gabralia, @wutoz, @bgsouza, @srayzhao, @Wern-rm, @djmelik, @KPhilly, @cheetosysst, @ngdmcc, @Subby, @firevenus, @dqisme, @vpfautz, @HJXANDHMR, @bigbigbo, @pitter2007, @nsollazzo, @dangrabbits, @pauloemarques, @shizumik, @gugaevkirill, @mccallofthewild, @fabriciorsf, @shanhuhai5739, @JojoChen27, @likeaixi, @jamesnguyen77, @ahalekelly, @datatypevoid, @alekxeyuk, @XiShan2016, @pppluto, @SehoNoh, @mateuschaves, @Nalseez, @DUALDUKE, @Falcon-7Xlinmiss, @louisose, @gnikh, @kexinrong, @andrewchantzos, @yueql, @wliment, @daxiao, @liubaojunsh, @Wenxixx, @papachristoumarios, @leonardobork, @michaltakac, @avish0694, @lianjianguo, @nicovalencia, @starit, @underhood, @haohb13, @alex-zige, @bboutkov, @pixelguy95, @kimsumin75, @hcxiong, @demon19941113, @PennyLan, @tej27, @andcup, @Asconius, @eyupburak, @cuishuang, @nnouns, @ooeyoshinori, @CycloneAxe, @rajeshgangam, @zaryanezrya, @rsamer, @Ian-Dzindo01, @rocryptogroup, @xuwt, @TheEngineerz, @thiagoh, @boralp, @RegiusK, @andrearug, @ElikplimSunu, @daisuke0131, @codetechninja, @ogu5566, @monklof

Hi @pisgo,

I am making the following changes:

File Path Proposed Changes
focus-android/app/src/main/AndroidManifest.xml Modify focus-android/app/src/main/AndroidManifest.xml with contents:
In the tag, add the following permission:


This allows the app to draw bubbles over other apps.

Then, inside the tag, add a declaration for the BubbleService:
<service
android:name=".session.BubbleService"
android:exported="false">





This declares the service that will handle creating bubbles. It should not be exported.
focus-android/app/src/main/java/org/mozilla/focus/activity/MainActivity.kt Modify focus-android/app/src/main/java/org/mozilla/focus/activity/MainActivity.kt with contents:
In the onCreate() method, after the call to installSplashScreen(), add the following:

// Check if the app should open a link in a bubble based on user preferences or criteria
val shouldOpenInBubble = shouldOpenLinkInBubble(intent) // This method checks if the link should open in a bubble
if (shouldOpenInBubble) {
val url = intent.getStringExtra("url")
// Assume BubbleService is available globally or through some dependency injection
val bubbleService = BubbleService()
bubbleService.createBubble(url)
return // Do not proceed to load the main activity view
}

This checks if the link that launched the app should open in a bubble. If so, it extracts the URL, passes it to the BubbleService to create the bubble, and returns early to prevent loading the normal browser view.
focus-android/app/src/main/java/org/mozilla/focus/activity/MainActivity.kt Modify focus-android/app/src/main/java/org/mozilla/focus/activity/MainActivity.kt with contents:
In the onBackPressed() method, at the very beginning, add:

if(handleBackNavigationWithBubbles()) return

This will allow custom handling of the back button press if any bubbles are open. The handleBackNavigationWithBubbles() method should be implemented to close the topmost bubble if any are open, before falling back to the default back navigation behavior.

This is an automated message generated by Sweep AI.

Copy link
Author

sweep-ai bot commented Apr 27, 2024

πŸš€ Wrote Changes

Done.

This is an automated message generated by Sweep AI.

@github-staff github-staff deleted a comment from pisgo May 12, 2024
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.

Sweep: Add Bubble Browser feature to firefox focus
1 participant